@lovrabet/cli 1.1.1 → 1.1.2

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 (43) hide show
  1. package/README.md +289 -14
  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-pull-ui.js +1 -1
  6. package/lib/api/format-dataset.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/api/pull.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/logout.js +1 -1
  17. package/lib/cli.js +1 -1
  18. package/lib/cmd/build-watch.js +1 -1
  19. package/lib/cmd/build.js +1 -1
  20. package/lib/cmd/logs.js +1 -1
  21. package/lib/cmd/preview.js +1 -1
  22. package/lib/cmd/start.js +1 -1
  23. package/lib/config/config-help.js +1 -1
  24. package/lib/config/main.js +1 -1
  25. package/lib/constant/domain.js +1 -1
  26. package/lib/constant/env.js +1 -1
  27. package/lib/create-app/enhanced-guided-create.js +1 -1
  28. package/lib/create-app/format-elapsed.js +1 -1
  29. package/lib/create-app/main.js +1 -1
  30. package/lib/create-app/task-finished.js +1 -1
  31. package/lib/create-app/task-loading.js +1 -1
  32. package/lib/create-app/task-running.js +1 -1
  33. package/lib/create-app/task-time.js +1 -1
  34. package/lib/create-app/use-copy-project-template.js +1 -1
  35. package/lib/create-app/use-format-code.js +1 -1
  36. package/lib/create-app/use-install-dependencies.js +1 -1
  37. package/lib/help.js +1 -1
  38. package/lib/utils/config.js +1 -1
  39. package/lib/utils/copy-directory.js +1 -1
  40. package/lib/utils/logger.js +1 -1
  41. package/lib/utils/router-updater.js +1 -1
  42. package/lib/utils/template-replacer.js +1 -1
  43. package/package.json +1 -1
package/lib/api/pull.js CHANGED
@@ -1 +1 @@
1
- (function(_0xed3893,_0x3aacbd){const _0x48a3cc=a8_0x3b95,_0x14fc2d=_0xed3893();while(!![]){try{const _0x477e3d=parseInt(_0x48a3cc(0x1cc))/0x1*(parseInt(_0x48a3cc(0x1bb))/0x2)+-parseInt(_0x48a3cc(0x1de))/0x3*(parseInt(_0x48a3cc(0x1b9))/0x4)+-parseInt(_0x48a3cc(0x1df))/0x5*(parseInt(_0x48a3cc(0x1cd))/0x6)+-parseInt(_0x48a3cc(0x1ba))/0x7+parseInt(_0x48a3cc(0x1e8))/0x8+-parseInt(_0x48a3cc(0x1e6))/0x9*(parseInt(_0x48a3cc(0x1cb))/0xa)+parseInt(_0x48a3cc(0x1c6))/0xb;if(_0x477e3d===_0x3aacbd)break;else _0x14fc2d['push'](_0x14fc2d['shift']());}catch(_0x46bb45){_0x14fc2d['push'](_0x14fc2d['shift']());}}}(a8_0x47da,0x9fbd6));function a8_0x3b95(_0x17a2f4,_0x2d4970){const _0x47da96=a8_0x47da();return a8_0x3b95=function(_0x3b95c5,_0x23ddb4){_0x3b95c5=_0x3b95c5-0x1b7;let _0xd66b19=_0x47da96[_0x3b95c5];return _0xd66b19;},a8_0x3b95(_0x17a2f4,_0x2d4970);}import{createInterface}from'node:readline/promises';import{readConfig}from'../utils/config.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';export async function initApi(_0x5f38da){const _0x65214=a8_0x3b95,_0x583fe1=readConfig(),_0x5a4e6=_0x5f38da||_0x583fe1?.['app'];(typeof _0x5a4e6!==_0x65214(0x1d2)||!_0x5a4e6)&&(_0x5f38da?console[_0x65214(0x1d5)](_0x65214(0x1d4)+_0x5f38da+_0x65214(0x1e4)):(console['error'](_0x65214(0x1e0)),console['log']('!\x20请使用以下方式之一:'),console['log'](_0x65214(0x1b8)),console[_0x65214(0x1e5)](_0x65214(0x1da))),process[_0x65214(0x1dd)](0x1));_0x5f38da?console[_0x65214(0x1e5)]('*\x20使用指定的应用AppCode:\x20'+_0x5a4e6):console[_0x65214(0x1e5)](_0x65214(0x1db)+_0x5a4e6+_0x65214(0x1c2));const _0x9d2cae=createInterface({'input':process['stdin'],'output':process[_0x65214(0x1d6)]});let _0x41025c;try{const _0x44a34c=await _0x9d2cae[_0x65214(0x1c4)]('!\x20请输入文件前缀\x20\x1b[90m[留空表示无前缀]\x1b[0m:\x20');_0x41025c=_0x44a34c['trim']();if(_0x41025c){const _0x112df0=/^[a-zA-Z][a-zA-Z0-9_-]*$/;!_0x112df0[_0x65214(0x1dc)](_0x41025c)&&(console[_0x65214(0x1d5)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),process[_0x65214(0x1dd)](0x1));}}finally{_0x9d2cae[_0x65214(0x1bf)]();}console[_0x65214(0x1e5)](_0x65214(0x1d7));const _0x5f2b6e=await fetch(getApiDomain()+_0x65214(0x1e2)+_0x5a4e6+_0x65214(0x1e7),{'headers':{'Cookie':getCookie()}});if(_0x5f2b6e['ok']){const _0x486659=await _0x5f2b6e[_0x65214(0x1d8)]();if(_0x486659[_0x65214(0x1bd)]){const _0x546395=_0x41025c?_0x41025c+'-api':_0x65214(0x1b7),_0x120589=_0x41025c?_0x41025c+'-client':_0x65214(0x1c3);console[_0x65214(0x1e5)](_0x65214(0x1e1)),console[_0x65214(0x1e5)]('\x20\x20\x20•\x20'+_0x546395+_0x65214(0x1c5)),console[_0x65214(0x1e5)](_0x65214(0x1c1)+_0x120589+'.ts\x20-\x20客户端实例文件'),console[_0x65214(0x1e5)](_0x65214(0x1cf)+_0x486659['data'][_0x65214(0x1c8)][_0x65214(0x1c0)]+_0x65214(0x1d0));const _0x2a5233=!_0x5f38da;await generateApiFile(_0x486659['data'][_0x65214(0x1c8)],_0x41025c,_0x5a4e6,_0x2a5233);}}else{if(_0x5f2b6e[_0x65214(0x1bc)]===0x191){const _0x240bf0=_0x65214(0x1d1);console[_0x65214(0x1d5)]('×\x20'+_0x240bf0),logger['error']('api-pull',_0x240bf0,{'status':_0x5f2b6e[_0x65214(0x1bc)],'appCode':_0x5a4e6,'url':_0x5f2b6e[_0x65214(0x1d3)]});}else{const _0x47ac0d=_0x65214(0x1e3)+_0x5f2b6e['status'];console['error']('×\x20'+_0x47ac0d);try{const _0x5047ff=await _0x5f2b6e[_0x65214(0x1be)]();_0x5047ff?(console[_0x65214(0x1d5)](_0x65214(0x1c9),_0x5047ff),logger[_0x65214(0x1d5)](_0x65214(0x1ca),_0x47ac0d,{'status':_0x5f2b6e['status'],'appCode':_0x5a4e6,'url':_0x5f2b6e[_0x65214(0x1d3)],'errorBody':_0x5047ff})):logger[_0x65214(0x1d5)]('api-pull',_0x47ac0d,{'status':_0x5f2b6e['status'],'appCode':_0x5a4e6,'url':_0x5f2b6e[_0x65214(0x1d3)]});}catch(_0x11c8de){console[_0x65214(0x1d5)](_0x65214(0x1ce)),logger['error'](_0x65214(0x1ca),_0x47ac0d+_0x65214(0x1c7),{'status':_0x5f2b6e['status'],'appCode':_0x5a4e6,'url':_0x5f2b6e[_0x65214(0x1d3)],'readError':_0x11c8de instanceof Error?_0x11c8de[_0x65214(0x1d9)]:String(_0x11c8de)});}}process[_0x65214(0x1dd)](0x1);}}function a8_0x47da(){const _0x568c88=['9054968HlHRAp','api','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','4BCfYVI','1744246fICkva','38EDrrWG','status','success','text','close','length','\x20\x20\x20•\x20','\x1b[0m','client','question','.ts\x20-\x20模型配置文件','26998532CKeeon',',且无法读取错误响应内容','tableData','×\x20错误详情:','api-pull','10ivqOSv','1957lleuMa','5238654xMBxEN','×\x20无法读取错误响应内容','*\x20正在处理\x20','\x20个数据集...','获取数据集失败,原因:登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录后再尝试','string','url','×\x20提供的应用AppCode\x20\x22','error','stdout','\x0a*\x20正在从服务器拉取\x20API\x20配置...','json','message','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','\x1b[90m*\x20使用配置的应用AppCode:\x20','test','exit','2631501FPkboT','5XimusQ','×\x20未提供应用AppCode,且配置中也没有默认值','*\x20开始生成\x20API\x20配置文件:','/smartapi/dataset/getList?appCode=','获取数据集失败,HTTP状态码:\x20','\x22\x20无效','log','8727462QCnHWc','&pageSize=999&currentPage=1'];a8_0x47da=function(){return _0x568c88;};return a8_0x47da();}
1
+ (function(_0xd624a9,_0x357c09){const _0x2145e6=a8_0x394b,_0x2f1fba=_0xd624a9();while(!![]){try{const _0x520ca3=-parseInt(_0x2145e6(0x1ed))/0x1+-parseInt(_0x2145e6(0x1e8))/0x2+-parseInt(_0x2145e6(0x203))/0x3*(-parseInt(_0x2145e6(0x1f5))/0x4)+-parseInt(_0x2145e6(0x1fb))/0x5*(parseInt(_0x2145e6(0x1ea))/0x6)+parseInt(_0x2145e6(0x1db))/0x7+-parseInt(_0x2145e6(0x1f3))/0x8*(parseInt(_0x2145e6(0x1fe))/0x9)+-parseInt(_0x2145e6(0x1d1))/0xa*(-parseInt(_0x2145e6(0x1d4))/0xb);if(_0x520ca3===_0x357c09)break;else _0x2f1fba['push'](_0x2f1fba['shift']());}catch(_0x2c12bf){_0x2f1fba['push'](_0x2f1fba['shift']());}}}(a8_0x4432,0x98514));import{createInterface}from'node:readline/promises';import{readConfig}from'../utils/config.js';import{getCookie}from'../auth/get-cookie.js';function a8_0x394b(_0xb1acca,_0x2e7513){const _0x4432b1=a8_0x4432();return a8_0x394b=function(_0x394bc2,_0x2aaa43){_0x394bc2=_0x394bc2-0x1d1;let _0x2ce8e0=_0x4432b1[_0x394bc2];return _0x2ce8e0;},a8_0x394b(_0xb1acca,_0x2e7513);}function a8_0x4432(){const _0x1d46ce=['24CGECSb','×\x20提供的应用AppCode\x20\x22','23824pqaVbi','\x1b[0m','tableData','-client','×\x20错误详情:','\x22\x20无效','20WiJQbO','data','length','804663aDdwod','question','&pageSize=999&currentPage=1','!\x20请使用以下方式之一:','log','249CsovEp','url','trim','*\x20正在处理\x20','31550SxJnsx','*\x20开始生成\x20API\x20配置文件:','stdout','5401iARdOH','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','api-pull','string','/smartapi/dataset/getList?appCode=','!\x20请输入文件前缀\x20\x1b[90m[留空表示无前缀]\x1b[0m:\x20','stdin','3926923cVTUjA','exit','error','.ts\x20-\x20模型配置文件','app','status','\x0a*\x20正在从服务器拉取\x20API\x20配置...','\x1b[90m*\x20使用配置的应用AppCode:\x20','×\x20未提供应用AppCode,且配置中也没有默认值','-api','text','\x20\x20\x20•\x20',',且无法读取错误响应内容','1359230BLgFYN','api','93144pCiBpC','*\x20使用指定的应用AppCode:\x20','test','970618WmVHnE','获取数据集失败,HTTP状态码:\x20','.ts\x20-\x20客户端实例文件','message','success','json'];a8_0x4432=function(){return _0x1d46ce;};return a8_0x4432();}import{getApiDomain}from'../constant/domain.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';export async function initApi(_0x23e0d0){const _0x363ecc=a8_0x394b,_0x1b63f1=readConfig(),_0x53b2ed=_0x23e0d0||_0x1b63f1?.[_0x363ecc(0x1df)];(typeof _0x53b2ed!==_0x363ecc(0x1d7)||!_0x53b2ed)&&(_0x23e0d0?console[_0x363ecc(0x1dd)](_0x363ecc(0x1f4)+_0x23e0d0+_0x363ecc(0x1fa)):(console['error'](_0x363ecc(0x1e3)),console[_0x363ecc(0x202)](_0x363ecc(0x201)),console[_0x363ecc(0x202)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x363ecc(0x202)](_0x363ecc(0x1d5))),process[_0x363ecc(0x1dc)](0x1));_0x23e0d0?console[_0x363ecc(0x202)](_0x363ecc(0x1eb)+_0x53b2ed):console['log'](_0x363ecc(0x1e2)+_0x53b2ed+_0x363ecc(0x1f6));const _0x57b0ef=createInterface({'input':process[_0x363ecc(0x1da)],'output':process[_0x363ecc(0x1d3)]});let _0x3875a2;try{const _0x226310=await _0x57b0ef[_0x363ecc(0x1ff)](_0x363ecc(0x1d9));_0x3875a2=_0x226310[_0x363ecc(0x205)]();if(_0x3875a2){const _0x4cc031=/^[a-zA-Z][a-zA-Z0-9_-]*$/;!_0x4cc031[_0x363ecc(0x1ec)](_0x3875a2)&&(console[_0x363ecc(0x1dd)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),process[_0x363ecc(0x1dc)](0x1));}}finally{_0x57b0ef['close']();}console[_0x363ecc(0x202)](_0x363ecc(0x1e1));const _0x2ba019=await fetch(getApiDomain()+_0x363ecc(0x1d8)+_0x53b2ed+_0x363ecc(0x200),{'headers':{'Cookie':getCookie()}});if(_0x2ba019['ok']){const _0x341aa5=await _0x2ba019[_0x363ecc(0x1f2)]();if(_0x341aa5[_0x363ecc(0x1f1)]){const _0x5bfe05=_0x3875a2?_0x3875a2+_0x363ecc(0x1e4):_0x363ecc(0x1e9),_0x2cdaf5=_0x3875a2?_0x3875a2+_0x363ecc(0x1f8):'client';console[_0x363ecc(0x202)](_0x363ecc(0x1d2)),console[_0x363ecc(0x202)](_0x363ecc(0x1e6)+_0x5bfe05+_0x363ecc(0x1de)),console[_0x363ecc(0x202)](_0x363ecc(0x1e6)+_0x2cdaf5+_0x363ecc(0x1ef)),console[_0x363ecc(0x202)](_0x363ecc(0x206)+_0x341aa5[_0x363ecc(0x1fc)]['tableData'][_0x363ecc(0x1fd)]+'\x20个数据集...');const _0x4104f2=!_0x23e0d0;await generateApiFile(_0x341aa5['data'][_0x363ecc(0x1f7)],_0x3875a2,_0x53b2ed,_0x4104f2);}}else{if(_0x2ba019[_0x363ecc(0x1e0)]===0x191){const _0x1df2bc='获取数据集失败,原因:登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录后再尝试';console[_0x363ecc(0x1dd)]('×\x20'+_0x1df2bc),logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1df2bc,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)]});}else{const _0x1e95e0=_0x363ecc(0x1ee)+_0x2ba019[_0x363ecc(0x1e0)];console[_0x363ecc(0x1dd)]('×\x20'+_0x1e95e0);try{const _0x3b9cac=await _0x2ba019[_0x363ecc(0x1e5)]();_0x3b9cac?(console[_0x363ecc(0x1dd)](_0x363ecc(0x1f9),_0x3b9cac),logger['error'](_0x363ecc(0x1d6),_0x1e95e0,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)],'errorBody':_0x3b9cac})):logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1e95e0,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)]});}catch(_0x54ad03){console[_0x363ecc(0x1dd)]('×\x20无法读取错误响应内容'),logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1e95e0+_0x363ecc(0x1e7),{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)],'readError':_0x54ad03 instanceof Error?_0x54ad03[_0x363ecc(0x1f0)]:String(_0x54ad03)});}}process[_0x363ecc(0x1dc)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x22dd85,_0x57c2ea){const _0x467b35=a10_0x1aea,_0xd2c78c=_0x22dd85();while(!![]){try{const _0x551163=-parseInt(_0x467b35(0x1d8))/0x1+-parseInt(_0x467b35(0x1cd))/0x2*(parseInt(_0x467b35(0x1d4))/0x3)+-parseInt(_0x467b35(0x1cf))/0x4*(-parseInt(_0x467b35(0x1dc))/0x5)+-parseInt(_0x467b35(0x1d2))/0x6+-parseInt(_0x467b35(0x1cb))/0x7*(-parseInt(_0x467b35(0x1dd))/0x8)+parseInt(_0x467b35(0x1d7))/0x9+parseInt(_0x467b35(0x1d9))/0xa;if(_0x551163===_0x57c2ea)break;else _0xd2c78c['push'](_0xd2c78c['shift']());}catch(_0x1774a9){_0xd2c78c['push'](_0xd2c78c['shift']());}}}(a10_0x18d5,0x71827));import{jsx as a10_0x381caf,jsxs as a10_0x524641}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a10_0x18d5(){const _0x4d3fa7=['2615346gZWXDX','请前往浏览器完成登录。','33618PuyRDT','return','*\x20按回车开始登录。','6454503zCoQRz','708656ORsrvx','7109610aUavoZ','*\x20登录成功!','log','3290XoeNEE','492696xVIgLm','then','按\x20“q”\x20退出。','14wOIOrW','green','104FwPFwJ','dots','3896hsEcsk','finally','gray'];a10_0x18d5=function(){return _0x4d3fa7;};return a10_0x18d5();}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';function a10_0x1aea(_0x2b86df,_0x58ed86){const _0x18d54a=a10_0x18d5();return a10_0x1aea=function(_0x1aea65,_0x511aee){_0x1aea65=_0x1aea65-0x1c9;let _0x1225b8=_0x18d54a[_0x1aea65];return _0x1225b8;},a10_0x1aea(_0x2b86df,_0x58ed86);}import{authServer}from'./auth-server.js';import a10_0x40a7b1 from'ink-spinner';export function AuthServer(){const _0x125299=a10_0x1aea,{exit:_0x5c3b5e}=useApp(),[_0x43fbb7,_0x1e93f1]=useState(![]),[_0x2ea19a,_0x59b35d]=useState(!![]),[_0x361c3a,_0x5bcb7d]=useState(![]),[_0x16fb6a,_0x2a1c19]=useState(![]);useEffect(()=>{const _0x9d9347=a10_0x1aea;getIsSessionValid()[_0x9d9347(0x1c9)](_0x1e93f1)[_0x9d9347(0x1d0)](()=>_0x59b35d(![]));},[]),useEffect(()=>{const _0x2c7ed7=a10_0x1aea;!_0x2ea19a&&_0x43fbb7&&(console[_0x2c7ed7(0x1db)]('√\x20当前为有效会话,无需重新登录。'),_0x5c3b5e());},[_0x2ea19a,_0x43fbb7,_0x5c3b5e]),useEffect(()=>{const _0x187640=a10_0x1aea;_0x16fb6a&&(console[_0x187640(0x1db)](_0x187640(0x1da)),_0x5c3b5e());},[_0x16fb6a,_0x5c3b5e]),useInput((_0x54d096,_0x2a5fbb)=>{const _0x2d9661=a10_0x1aea;_0x2a5fbb[_0x2d9661(0x1d5)]&&(_0x5bcb7d(!![]),authServer({'silent':!![]})[_0x2d9661(0x1c9)](_0x2d74a4=>{_0x2a1c19(_0x2d74a4);})),_0x54d096==='q'&&_0x5c3b5e();});if(_0x2ea19a)return null;if(_0x43fbb7||_0x16fb6a)return null;return a10_0x381caf(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x361c3a?a10_0x524641(Box,{'children':[a10_0x381caf(Box,{'width':'1'}),a10_0x524641(Text,{'color':_0x125299(0x1cc),'children':[a10_0x381caf(a10_0x40a7b1,{'type':_0x125299(0x1ce)}),'\x20\x20']}),a10_0x381caf(Text,{'children':'正在登录...\x20'}),a10_0x381caf(Text,{'color':_0x125299(0x1d1),'children':_0x125299(0x1d3)})]}):a10_0x524641(Box,{'children':[a10_0x381caf(Box,{'width':'1'}),a10_0x381caf(Text,{'children':_0x125299(0x1d6)}),a10_0x381caf(Text,{'color':_0x125299(0x1d1),'children':_0x125299(0x1ca)})]})});}
1
+ (function(_0x20d3ed,_0x1eab7a){const _0x4031b7=a10_0x4bd3,_0x4fbd76=_0x20d3ed();while(!![]){try{const _0x509aa9=-parseInt(_0x4031b7(0x130))/0x1*(parseInt(_0x4031b7(0x137))/0x2)+parseInt(_0x4031b7(0x12d))/0x3*(-parseInt(_0x4031b7(0x13b))/0x4)+parseInt(_0x4031b7(0x12a))/0x5+parseInt(_0x4031b7(0x138))/0x6+parseInt(_0x4031b7(0x13e))/0x7+-parseInt(_0x4031b7(0x13f))/0x8+-parseInt(_0x4031b7(0x135))/0x9*(-parseInt(_0x4031b7(0x12f))/0xa);if(_0x509aa9===_0x1eab7a)break;else _0x4fbd76['push'](_0x4fbd76['shift']());}catch(_0x6fa383){_0x4fbd76['push'](_0x4fbd76['shift']());}}}(a10_0x4ae6,0x1da6d));import{jsx as a10_0x2fab24,jsxs as a10_0x94f8f4}from'react/jsx-runtime';function a10_0x4bd3(_0x31197a,_0x373763){const _0x4ae609=a10_0x4ae6();return a10_0x4bd3=function(_0x4bd3da,_0x1cedcf){_0x4bd3da=_0x4bd3da-0x12a;let _0xdb36d6=_0x4ae609[_0x4bd3da];return _0xdb36d6;},a10_0x4bd3(_0x31197a,_0x373763);}import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a10_0x50e6d2 from'ink-spinner';export function AuthServer(){const _0x529d1c=a10_0x4bd3,{exit:_0x4166e0}=useApp(),[_0x44c80b,_0x24f97b]=useState(![]),[_0xf86d71,_0x55685f]=useState(!![]),[_0x1eff51,_0x350f7a]=useState(![]),[_0x536861,_0x29da3c]=useState(![]);useEffect(()=>{const _0x9c268f=a10_0x4bd3;getIsSessionValid()[_0x9c268f(0x12c)](_0x24f97b)[_0x9c268f(0x131)](()=>_0x55685f(![]));},[]),useEffect(()=>{const _0x3e0d78=a10_0x4bd3;!_0xf86d71&&_0x44c80b&&(console[_0x3e0d78(0x134)](_0x3e0d78(0x133)),_0x4166e0());},[_0xf86d71,_0x44c80b,_0x4166e0]),useEffect(()=>{const _0x132da2=a10_0x4bd3;_0x536861&&(console[_0x132da2(0x134)](_0x132da2(0x132)),_0x4166e0());},[_0x536861,_0x4166e0]),useInput((_0x14ff8b,_0x468b5f)=>{_0x468b5f['return']&&(_0x350f7a(!![]),authServer({'silent':!![]})['then'](_0x508ca6=>{_0x29da3c(_0x508ca6);})),_0x14ff8b==='q'&&_0x4166e0();});if(_0xf86d71)return null;if(_0x44c80b||_0x536861)return null;return a10_0x2fab24(Box,{'flexDirection':_0x529d1c(0x12b),'marginTop':0x1,'marginBottom':0x1,'children':_0x1eff51?a10_0x94f8f4(Box,{'children':[a10_0x2fab24(Box,{'width':'1'}),a10_0x94f8f4(Text,{'color':_0x529d1c(0x13a),'children':[a10_0x2fab24(a10_0x50e6d2,{'type':_0x529d1c(0x139)}),'\x20\x20']}),a10_0x2fab24(Text,{'children':_0x529d1c(0x12e)}),a10_0x2fab24(Text,{'color':_0x529d1c(0x136),'children':_0x529d1c(0x13d)})]}):a10_0x94f8f4(Box,{'children':[a10_0x2fab24(Box,{'width':'1'}),a10_0x2fab24(Text,{'children':_0x529d1c(0x13c)}),a10_0x2fab24(Text,{'color':_0x529d1c(0x136),'children':'按\x20“q”\x20退出。'})]})});}function a10_0x4ae6(){const _0x2a05bd=['68mqAyqN','*\x20按回车开始登录。','请前往浏览器完成登录。','1414098RFEcoS','586128qeCFJm','306635OoFBQC','column','then','7188OyiUMU','正在登录...\x20','949990gXnkIN','17pILdEa','finally','*\x20登录成功!','√\x20当前为有效会话,无需重新登录。','log','9czmrWJ','gray','22354LimgpM','402720iCjTwm','dots','green'];a10_0x4ae6=function(){return _0x2a05bd;};return a10_0x4ae6();}
@@ -1 +1 @@
1
- const a11_0x18ef3b=a11_0x57db;(function(_0x2a8deb,_0xbb8459){const _0x403d64=a11_0x57db,_0xf4cf39=_0x2a8deb();while(!![]){try{const _0x3dbbfb=-parseInt(_0x403d64(0x1c3))/0x1+-parseInt(_0x403d64(0x1de))/0x2+parseInt(_0x403d64(0x1ba))/0x3+parseInt(_0x403d64(0x1c5))/0x4*(-parseInt(_0x403d64(0x1ce))/0x5)+-parseInt(_0x403d64(0x1dc))/0x6+parseInt(_0x403d64(0x1db))/0x7+-parseInt(_0x403d64(0x1b7))/0x8*(-parseInt(_0x403d64(0x1c0))/0x9);if(_0x3dbbfb===_0xbb8459)break;else _0xf4cf39['push'](_0xf4cf39['shift']());}catch(_0x3b2491){_0xf4cf39['push'](_0xf4cf39['shift']());}}}(a11_0x49df,0x1f243));import{writeFileSync}from'node:fs';import a11_0x133e29 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a11_0x49df(){const _0x5e8274=['platform','📍\x20登录地址:','isAuth','🔐\x20正在启动登录服务...','session','end','log','close','✅\x20浏览器已自动打开,请在浏览器中完成登录','then','cookie','/sign-in?redirect=','1039038bexwBx','1208022GKGEtV','utf-8','64580XggJeo','port','open\x20\x22','main','🌐\x20正在尝试自动打开浏览器...','8oHscIf','text/html;\x20charset=utf-8','start\x20\x22\x22\x20\x22','741534FmDXRe','createServer','win32','listen','error','🔗\x20请手动复制登录地址到浏览器:','1748124yswIYN','xdg-open\x20\x22','⚠️\x20\x20无法自动打开浏览器','33076wgavnn','user','40WAhcdr','writeHead','https://g.yuntooai.com/cert/lovrabet-dev.json','https://dev.lovrabet.com:','catch','object','/api/auth/get-session','silent','json','97795rmlgIf'];a11_0x49df=function(){return _0x5e8274;};return a11_0x49df();}export async function authServer(_0x16ae66){const _0x4d5ef3=a11_0x57db,_0x169e6a=_0x16ae66?.[_0x4d5ef3(0x1cc)]||![];if(await getIsSessionValid())return!![];const _0x48fb6c=await(await fetch(_0x4d5ef3(0x1c7)))['json']();return new Promise(async(_0x3db01e,_0x194690)=>{const _0x8ab0fd=_0x4d5ef3;let _0x7a15c=0x0;const _0xde13d5=a11_0x133e29[_0x8ab0fd(0x1bb)](_0x48fb6c,async(_0x4ca4e3,_0x2ff6b)=>{const _0x17ee71=_0x8ab0fd,_0x1b30c7=getUserDomain(),_0x221098=_0x4ca4e3['headers'][_0x17ee71(0x1d9)]||'',_0x5c5dd9=await fetch(_0x1b30c7+_0x17ee71(0x1cb),{'headers':{'cookie':_0x221098}})[_0x17ee71(0x1d8)](_0x57353d=>_0x57353d[_0x17ee71(0x1cd)]()),_0x140c0b=_0x5c5dd9&&_0x5c5dd9[_0x17ee71(0x1d3)]&&_0x5c5dd9[_0x17ee71(0x1c4)];if(_0x140c0b){writeFileSync(cookieFile,_0x221098,_0x17ee71(0x1dd)),_0x3db01e(!![]);const _0x2ab0a7='<!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>';_0x2ff6b['writeHead'](0xc8,{'Content-Type':_0x17ee71(0x1b8)}),_0x2ff6b[_0x17ee71(0x1d4)](_0x2ab0a7),_0xde13d5[_0x17ee71(0x1d6)]();}else{const _0xef40d2=''+encodeURIComponent(_0x17ee71(0x1c8)+_0x7a15c);_0x2ff6b[_0x17ee71(0x1c6)](0x12e,{'location':_0x1b30c7+_0x17ee71(0x1da)+_0xef40d2}),_0x2ff6b['end']();return;}});_0xde13d5[_0x8ab0fd(0x1bd)](0x0,'127.0.0.1',()=>{const _0x369c5c=_0x8ab0fd,_0x3287bc=_0xde13d5['address']();_0x7a15c=typeof _0x3287bc===_0x369c5c(0x1ca)&&_0x3287bc?_0x3287bc[_0x369c5c(0x1df)]:Number(_0x3287bc);const _0x1b9357=_0x369c5c(0x1c8)+_0x7a15c;!_0x169e6a&&(console['log'](_0x369c5c(0x1d2)),console[_0x369c5c(0x1d5)](_0x369c5c(0x1d0),_0x1b9357),console[_0x369c5c(0x1d5)](_0x369c5c(0x1b6)),console[_0x369c5c(0x1d5)](''),console['log']('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console[_0x369c5c(0x1d5)]('')),openInBrowser(_0x1b9357)[_0x369c5c(0x1d8)](_0x397817=>{const _0x21207e=_0x369c5c;!_0x169e6a&&(_0x397817?console['log'](_0x21207e(0x1d7)):(console[_0x21207e(0x1d5)]('⚠️\x20\x20无法自动打开浏览器'),console['log'](_0x21207e(0x1bf),_0x1b9357)),console[_0x21207e(0x1d5)](''));})[_0x369c5c(0x1c9)](()=>{const _0x4533b9=_0x369c5c;!_0x169e6a&&(console[_0x4533b9(0x1d5)](_0x4533b9(0x1c2)),console[_0x4533b9(0x1d5)](_0x4533b9(0x1bf),_0x1b9357),console[_0x4533b9(0x1d5)](''));});}),_0xde13d5['on']('error',_0x1960ed=>{const _0x42a0ef=_0x8ab0fd;!_0x169e6a&&console[_0x42a0ef(0x1be)]('Auth\x20server\x20error:',_0x1960ed),_0x194690(_0x1960ed);});});}function a11_0x57db(_0x15de38,_0x17eb04){const _0x49df40=a11_0x49df();return a11_0x57db=function(_0x57db37,_0x53a183){_0x57db37=_0x57db37-0x1b6;let _0x58ba58=_0x49df40[_0x57db37];return _0x58ba58;},a11_0x57db(_0x15de38,_0x17eb04);}function openInBrowser(_0x2dc874){return new Promise(_0x57a123=>{const _0x12dceb=a11_0x57db,_0x39b977=process[_0x12dceb(0x1cf)];let _0x42d2cc;if(_0x39b977===_0x12dceb(0x1bc))_0x42d2cc=_0x12dceb(0x1b9)+_0x2dc874+'\x22';else _0x39b977==='darwin'?_0x42d2cc=_0x12dceb(0x1e0)+_0x2dc874+'\x22':_0x42d2cc=_0x12dceb(0x1c1)+_0x2dc874+'\x22';exec(_0x42d2cc,_0x2bf08c=>{_0x2bf08c?_0x57a123(![]):_0x57a123(!![]);});});}if(import.meta[a11_0x18ef3b(0x1e1)]){const isAuth=await authServer();console[a11_0x18ef3b(0x1d5)](a11_0x18ef3b(0x1d1),isAuth);}
1
+ const a11_0x406a0a=a11_0x4aa3;function a11_0x5104(){const _0x46edfe=['end','writeHead','1313644zyNtxh','darwin','error','text/html;\x20charset=utf-8','createServer','cookie','port','utf-8','start\x20\x22\x22\x20\x22','3018riYfON','object','log','9OAUvPa','https://dev.lovrabet.com:','then','1618186zimDLp','🔗\x20请手动复制登录地址到浏览器:','json','open\x20\x22','https://g.yuntooai.com/cert/lovrabet-dev.json','3045DqvPCW','759940unAMKH','/sign-in?redirect=','📍\x20登录地址:','4615752fWHQSX','3XtdVMO','main','catch','252270qBjyIq','⚠️\x20\x20无法自动打开浏览器','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','127.0.0.1','close','🌐\x20正在尝试自动打开浏览器...','silent','638184JPGHHB','✅\x20浏览器已自动打开,请在浏览器中完成登录','Auth\x20server\x20error:','user'];a11_0x5104=function(){return _0x46edfe;};return a11_0x5104();}(function(_0x2b1027,_0x275258){const _0x2d34ed=a11_0x4aa3,_0x5bf690=_0x2b1027();while(!![]){try{const _0x5e0ca7=parseInt(_0x2d34ed(0x191))/0x1+-parseInt(_0x2d34ed(0x17d))/0x2+-parseInt(_0x2d34ed(0x187))/0x3*(parseInt(_0x2d34ed(0x197))/0x4)+parseInt(_0x2d34ed(0x18a))/0x5+-parseInt(_0x2d34ed(0x177))/0x6*(-parseInt(_0x2d34ed(0x182))/0x7)+-parseInt(_0x2d34ed(0x186))/0x8*(-parseInt(_0x2d34ed(0x17a))/0x9)+parseInt(_0x2d34ed(0x183))/0xa;if(_0x5e0ca7===_0x275258)break;else _0x5bf690['push'](_0x5bf690['shift']());}catch(_0x50c8c1){_0x5bf690['push'](_0x5bf690['shift']());}}}(a11_0x5104,0x673f6));import{writeFileSync}from'node:fs';import a11_0x14949c from'node:https';function a11_0x4aa3(_0x4699c8,_0x15752d){const _0x510446=a11_0x5104();return a11_0x4aa3=function(_0x4aa3ab,_0xc4c15){_0x4aa3ab=_0x4aa3ab-0x173;let _0x2884aa=_0x510446[_0x4aa3ab];return _0x2884aa;},a11_0x4aa3(_0x4699c8,_0x15752d);}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(_0x21701e){const _0x232d5e=a11_0x4aa3,_0x52a694=_0x21701e?.[_0x232d5e(0x190)]||![];if(await getIsSessionValid())return!![];const _0x53cb98=await(await fetch(_0x232d5e(0x181)))[_0x232d5e(0x17f)]();return new Promise(async(_0x273dfb,_0x1f0381)=>{const _0x26b44b=_0x232d5e;let _0x5bc069=0x0;const _0x35d5be=a11_0x14949c[_0x26b44b(0x19b)](_0x53cb98,async(_0x5d0ac4,_0x333696)=>{const _0x2e0055=_0x26b44b,_0xdf0879=getUserDomain(),_0x5a6d46=_0x5d0ac4['headers'][_0x2e0055(0x173)]||'',_0x1ac7da=await fetch(_0xdf0879+'/api/auth/get-session',{'headers':{'cookie':_0x5a6d46}})[_0x2e0055(0x17c)](_0x5a4e13=>_0x5a4e13[_0x2e0055(0x17f)]()),_0x478afa=_0x1ac7da&&_0x1ac7da['session']&&_0x1ac7da[_0x2e0055(0x194)];if(_0x478afa){writeFileSync(cookieFile,_0x5a6d46,_0x2e0055(0x175)),_0x273dfb(!![]);const _0x3903a8='<!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>';_0x333696[_0x2e0055(0x196)](0xc8,{'Content-Type':_0x2e0055(0x19a)}),_0x333696[_0x2e0055(0x195)](_0x3903a8),_0x35d5be[_0x2e0055(0x18e)]();}else{const _0x19e8ed=''+encodeURIComponent(_0x2e0055(0x17b)+_0x5bc069);_0x333696[_0x2e0055(0x196)](0x12e,{'location':_0xdf0879+_0x2e0055(0x184)+_0x19e8ed}),_0x333696[_0x2e0055(0x195)]();return;}});_0x35d5be['listen'](0x0,_0x26b44b(0x18d),()=>{const _0x129157=_0x26b44b,_0x6d05ee=_0x35d5be['address']();_0x5bc069=typeof _0x6d05ee===_0x129157(0x178)&&_0x6d05ee?_0x6d05ee[_0x129157(0x174)]:Number(_0x6d05ee);const _0x3f5a9a='https://dev.lovrabet.com:'+_0x5bc069;!_0x52a694&&(console[_0x129157(0x179)]('🔐\x20正在启动登录服务...'),console[_0x129157(0x179)](_0x129157(0x185),_0x3f5a9a),console[_0x129157(0x179)](_0x129157(0x18f)),console[_0x129157(0x179)](''),console['log'](_0x129157(0x18c)),console[_0x129157(0x179)]('')),openInBrowser(_0x3f5a9a)[_0x129157(0x17c)](_0x341d70=>{const _0xd8fd42=_0x129157;!_0x52a694&&(_0x341d70?console[_0xd8fd42(0x179)](_0xd8fd42(0x192)):(console[_0xd8fd42(0x179)](_0xd8fd42(0x18b)),console[_0xd8fd42(0x179)]('🔗\x20请手动复制登录地址到浏览器:',_0x3f5a9a)),console['log'](''));})[_0x129157(0x189)](()=>{const _0x265c0f=_0x129157;!_0x52a694&&(console[_0x265c0f(0x179)](_0x265c0f(0x18b)),console[_0x265c0f(0x179)](_0x265c0f(0x17e),_0x3f5a9a),console[_0x265c0f(0x179)](''));});}),_0x35d5be['on'](_0x26b44b(0x199),_0x58b78d=>{const _0x2c0f3d=_0x26b44b;!_0x52a694&&console[_0x2c0f3d(0x199)](_0x2c0f3d(0x193),_0x58b78d),_0x1f0381(_0x58b78d);});});}function openInBrowser(_0x1b674b){return new Promise(_0x816f66=>{const _0x5b68e0=a11_0x4aa3,_0x172fdf=process['platform'];let _0x2005d7;if(_0x172fdf==='win32')_0x2005d7=_0x5b68e0(0x176)+_0x1b674b+'\x22';else _0x172fdf===_0x5b68e0(0x198)?_0x2005d7=_0x5b68e0(0x180)+_0x1b674b+'\x22':_0x2005d7='xdg-open\x20\x22'+_0x1b674b+'\x22';exec(_0x2005d7,_0x355e04=>{_0x355e04?_0x816f66(![]):_0x816f66(!![]);});});}if(import.meta[a11_0x406a0a(0x188)]){const isAuth=await authServer();console[a11_0x406a0a(0x179)]('isAuth',isAuth);}
@@ -1 +1 @@
1
- const a12_0x519dc4=a12_0x3233;(function(_0x1a7d9b,_0x235217){const _0x3f17c9=a12_0x3233,_0x20df86=_0x1a7d9b();while(!![]){try{const _0x36599b=-parseInt(_0x3f17c9(0x14c))/0x1*(parseInt(_0x3f17c9(0x14e))/0x2)+parseInt(_0x3f17c9(0x14f))/0x3*(parseInt(_0x3f17c9(0x149))/0x4)+parseInt(_0x3f17c9(0x154))/0x5+parseInt(_0x3f17c9(0x14b))/0x6+parseInt(_0x3f17c9(0x14a))/0x7*(parseInt(_0x3f17c9(0x152))/0x8)+-parseInt(_0x3f17c9(0x151))/0x9*(parseInt(_0x3f17c9(0x153))/0xa)+parseInt(_0x3f17c9(0x150))/0xb;if(_0x36599b===_0x235217)break;else _0x20df86['push'](_0x20df86['shift']());}catch(_0x90b128){_0x20df86['push'](_0x20df86['shift']());}}}(a12_0x34fc,0x2a2f0));import{mkdirSync}from'node:fs';function a12_0x3233(_0x8c9300,_0x54dfc1){const _0x34fc24=a12_0x34fc();return a12_0x3233=function(_0x3233b7,_0x5277d){_0x3233b7=_0x3233b7-0x149;let _0x2f6b68=_0x34fc24[_0x3233b7];return _0x2f6b68;},a12_0x3233(_0x8c9300,_0x54dfc1);}import{homedir}from'node:os';export const configDir=homedir()+a12_0x519dc4(0x14d);export const cookieFile=configDir+'/cookie';function a12_0x34fc(){const _0x5c628c=['364556lFVBru','1657299aaptQT','225366tuLLWP','162650BmhORf','/.lovrabet','2uDRnZB','6sLtGXF','1039841hScmGa','70461mhsxAa','8DuwnTS','360WRfhIu','330755IIxXuk'];a12_0x34fc=function(){return _0x5c628c;};return a12_0x34fc();}mkdirSync(configDir,{'recursive':!![]});
1
+ const a12_0x45b3bd=a12_0x418d;(function(_0x41460a,_0x8dcff1){const _0x47d603=a12_0x418d,_0x116567=_0x41460a();while(!![]){try{const _0x3e63fb=-parseInt(_0x47d603(0x8e))/0x1+parseInt(_0x47d603(0x8f))/0x2+-parseInt(_0x47d603(0x8c))/0x3*(-parseInt(_0x47d603(0x8b))/0x4)+-parseInt(_0x47d603(0x90))/0x5*(-parseInt(_0x47d603(0x91))/0x6)+parseInt(_0x47d603(0x95))/0x7+-parseInt(_0x47d603(0x92))/0x8+parseInt(_0x47d603(0x94))/0x9;if(_0x3e63fb===_0x8dcff1)break;else _0x116567['push'](_0x116567['shift']());}catch(_0x33cb13){_0x116567['push'](_0x116567['shift']());}}}(a12_0x28aa,0x925bb));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a12_0x28aa(){const _0x16c689=['220WnhgQm','27255MieUeo','/cookie','864199ErSYsP','667794QFVvzy','1155ohDBpT','9702UkMGwg','3664128fUsMlU','/.lovrabet','1740771sKUhZd','3648260DgqbTv'];a12_0x28aa=function(){return _0x16c689;};return a12_0x28aa();}export const configDir=homedir()+a12_0x45b3bd(0x93);export const cookieFile=configDir+a12_0x45b3bd(0x8d);function a12_0x418d(_0x507517,_0x442f42){const _0x28aafb=a12_0x28aa();return a12_0x418d=function(_0x418db8,_0x24bc1f){_0x418db8=_0x418db8-0x8b;let _0x3c4e86=_0x28aafb[_0x418db8];return _0x3c4e86;},a12_0x418d(_0x507517,_0x442f42);}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0x63b59d,_0x23563d){var _0x509dba=a13_0x19df,_0x4618b1=_0x63b59d();while(!![]){try{var _0x5ada45=parseInt(_0x509dba(0x91))/0x1*(parseInt(_0x509dba(0x94))/0x2)+-parseInt(_0x509dba(0x97))/0x3+parseInt(_0x509dba(0x93))/0x4+parseInt(_0x509dba(0x96))/0x5+-parseInt(_0x509dba(0x95))/0x6*(parseInt(_0x509dba(0x99))/0x7)+parseInt(_0x509dba(0x98))/0x8+-parseInt(_0x509dba(0x92))/0x9;if(_0x5ada45===_0x23563d)break;else _0x4618b1['push'](_0x4618b1['shift']());}catch(_0x1e3803){_0x4618b1['push'](_0x4618b1['shift']());}}}(a13_0x32aa,0x540d0));function a13_0x19df(_0x5aaa1f,_0x132be0){var _0x32aa0c=a13_0x32aa();return a13_0x19df=function(_0x19df7f,_0x274fc7){_0x19df7f=_0x19df7f-0x90;var _0x3f500f=_0x32aa0c[_0x19df7f];return _0x3f500f;},a13_0x19df(_0x5aaa1f,_0x132be0);}function a13_0x32aa(){var _0x11f286=['1064374vVEtNm','2727054XBoHVZ','1687210DQHizt','1461813VvAWSL','3839208NQgHxQ','7lrqIjC','utf-8','1somGqj','6016815nGktnH','2420228oekDiM'];a13_0x32aa=function(){return _0x11f286;};return a13_0x32aa();}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x335478=a13_0x19df;try{return readFileSync(cookieFile,_0x335478(0x90));}catch{}return'';}
1
+ function a13_0x720a(){var _0x2d5242=['735pNyHIc','1108260QpsPGO','32885PPKORT','5985cLhALV','6138rQEVYV','670sDtPSE','73182lxhaQd','40803llbXQi','234Kojhte','2222hQJHZB','1216UqcbXx','utf-8'];a13_0x720a=function(){return _0x2d5242;};return a13_0x720a();}function a13_0x2464(_0x2d0009,_0x3e9ef1){var _0x720a04=a13_0x720a();return a13_0x2464=function(_0x2464f9,_0x4cc7ec){_0x2464f9=_0x2464f9-0x155;var _0x1220b0=_0x720a04[_0x2464f9];return _0x1220b0;},a13_0x2464(_0x2d0009,_0x3e9ef1);}(function(_0xbc96c8,_0x9aa02e){var _0x5e3e6e=a13_0x2464,_0x39a552=_0xbc96c8();while(!![]){try{var _0x2ec8d1=parseInt(_0x5e3e6e(0x15d))/0x1+-parseInt(_0x5e3e6e(0x160))/0x2*(-parseInt(_0x5e3e6e(0x157))/0x3)+parseInt(_0x5e3e6e(0x158))/0x4+-parseInt(_0x5e3e6e(0x159))/0x5*(parseInt(_0x5e3e6e(0x15f))/0x6)+-parseInt(_0x5e3e6e(0x15e))/0x7+parseInt(_0x5e3e6e(0x155))/0x8*(-parseInt(_0x5e3e6e(0x15a))/0x9)+-parseInt(_0x5e3e6e(0x15c))/0xa*(parseInt(_0x5e3e6e(0x15b))/0xb);if(_0x2ec8d1===_0x9aa02e)break;else _0x39a552['push'](_0x39a552['shift']());}catch(_0x14e142){_0x39a552['push'](_0x39a552['shift']());}}}(a13_0x720a,0x361cc));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x2c60b2=a13_0x2464;try{return readFileSync(cookieFile,_0x2c60b2(0x156));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0xe9ee19,_0xb79dc0){const _0x44b7c9=a14_0x4b87,_0xf2a583=_0xe9ee19();while(!![]){try{const _0x3a57b2=-parseInt(_0x44b7c9(0x9e))/0x1*(-parseInt(_0x44b7c9(0xa3))/0x2)+-parseInt(_0x44b7c9(0x9c))/0x3+parseInt(_0x44b7c9(0x99))/0x4*(parseInt(_0x44b7c9(0x9f))/0x5)+-parseInt(_0x44b7c9(0xa2))/0x6+parseInt(_0x44b7c9(0xa5))/0x7*(parseInt(_0x44b7c9(0xa6))/0x8)+-parseInt(_0x44b7c9(0xa4))/0x9+parseInt(_0x44b7c9(0x9a))/0xa;if(_0x3a57b2===_0xb79dc0)break;else _0xf2a583['push'](_0xf2a583['shift']());}catch(_0x355ad7){_0xf2a583['push'](_0xf2a583['shift']());}}}(a14_0x98dc,0x36d85));function a14_0x98dc(){const _0x40d065=['utf-8','650451sOWIQm','/api/auth/get-session','140677MTaWDG','149885tZavje','then','json','1238406IalQZW','4cPBRHe','2540466ozLzgo','7cKTHDE','2780312zTZKzc','user','4lmjBPF','2712670EFuxfP'];a14_0x98dc=function(){return _0x40d065;};return a14_0x98dc();}function a14_0x4b87(_0x2da929,_0x23f62e){const _0x98dcd3=a14_0x98dc();return a14_0x4b87=function(_0x4b87c7,_0x1bbae0){_0x4b87c7=_0x4b87c7-0x98;let _0x1c9544=_0x98dcd3[_0x4b87c7];return _0x1c9544;},a14_0x4b87(_0x2da929,_0x23f62e);}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x4671a8=a14_0x4b87;try{if(!existsSync(cookieFile))return![];const _0x484821=readFileSync(cookieFile,_0x4671a8(0x9b)),_0x4b265c=await fetch(getUserDomain()+_0x4671a8(0x9d),{'headers':{'cookie':_0x484821}})[_0x4671a8(0xa0)](_0x15341c=>_0x15341c[_0x4671a8(0xa1)]());return _0x4b265c&&_0x4b265c['session']&&_0x4b265c[_0x4671a8(0x98)];}catch{}return![];}
1
+ (function(_0x3ce95f,_0x1366e2){const _0x325c1e=a14_0xfdb9,_0x1d48ed=_0x3ce95f();while(!![]){try{const _0x1f32c2=parseInt(_0x325c1e(0xdc))/0x1+parseInt(_0x325c1e(0xdf))/0x2*(-parseInt(_0x325c1e(0xd5))/0x3)+-parseInt(_0x325c1e(0xd8))/0x4*(-parseInt(_0x325c1e(0xd6))/0x5)+parseInt(_0x325c1e(0xd1))/0x6+parseInt(_0x325c1e(0xdd))/0x7*(-parseInt(_0x325c1e(0xdb))/0x8)+-parseInt(_0x325c1e(0xd0))/0x9*(parseInt(_0x325c1e(0xe0))/0xa)+parseInt(_0x325c1e(0xde))/0xb*(parseInt(_0x325c1e(0xd2))/0xc);if(_0x1f32c2===_0x1366e2)break;else _0x1d48ed['push'](_0x1d48ed['shift']());}catch(_0x292665){_0x1d48ed['push'](_0x1d48ed['shift']());}}}(a14_0x54c9,0x8b8e4));function a14_0xfdb9(_0x586534,_0x1ea7da){const _0x54c913=a14_0x54c9();return a14_0xfdb9=function(_0xfdb90c,_0x2d09d2){_0xfdb90c=_0xfdb90c-0xd0;let _0x28d23a=_0x54c913[_0xfdb90c];return _0x28d23a;},a14_0xfdb9(_0x586534,_0x1ea7da);}function a14_0x54c9(){const _0x35af0a=['10Hzzihh','129825gTtBrG','3692328bPQoMs','120odeFml','session','json','3asuBfi','10lxlwaD','/api/auth/get-session','580132PGULBL','then','user','433880QIRJMs','79389ZHesbS','63nWPOiX','1207019wtZmjy','2015946xgSxXt'];a14_0x54c9=function(){return _0x35af0a;};return a14_0x54c9();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x5b37c3=a14_0xfdb9;try{if(!existsSync(cookieFile))return![];const _0x478d1e=readFileSync(cookieFile,'utf-8'),_0x2b068b=await fetch(getUserDomain()+_0x5b37c3(0xd7),{'headers':{'cookie':_0x478d1e}})[_0x5b37c3(0xd9)](_0x9c5bfb=>_0x9c5bfb[_0x5b37c3(0xd4)]());return _0x2b068b&&_0x2b068b[_0x5b37c3(0xd3)]&&_0x2b068b[_0x5b37c3(0xda)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x247b1f,_0x1a2881){var _0x219399=a15_0x397f,_0x17e2d6=_0x247b1f();while(!![]){try{var _0x2216fe=parseInt(_0x219399(0x164))/0x1+-parseInt(_0x219399(0x163))/0x2+-parseInt(_0x219399(0x160))/0x3*(parseInt(_0x219399(0x166))/0x4)+parseInt(_0x219399(0x162))/0x5*(parseInt(_0x219399(0x167))/0x6)+parseInt(_0x219399(0x169))/0x7+parseInt(_0x219399(0x168))/0x8+-parseInt(_0x219399(0x161))/0x9;if(_0x2216fe===_0x1a2881)break;else _0x17e2d6['push'](_0x17e2d6['shift']());}catch(_0x23f077){_0x17e2d6['push'](_0x17e2d6['shift']());}}}(a15_0x45ef,0x367df));function a15_0x397f(_0x7446ef,_0x404be1){var _0x45efd1=a15_0x45ef();return a15_0x397f=function(_0x397f1e,_0xfd688){_0x397f1e=_0x397f1e-0x15e;var _0x5f39d8=_0x45efd1[_0x397f1e];return _0x5f39d8;},a15_0x397f(_0x7446ef,_0x404be1);}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a15_0x45ef(){var _0x3fee31=['!\x20当前未登录','log','9QjQjlI','5582493sxSNpL','65ZJYvme','73944erODUq','409228rMFztG','✓\x20已退出登录','159616ANiREM','85038BEYBNM','44448YhRfMT','2807889sqbUyl'];a15_0x45ef=function(){return _0x3fee31;};return a15_0x45ef();}export function logout(){var _0x211103=a15_0x397f;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x211103(0x15f)](_0x211103(0x165))):console[_0x211103(0x15f)](_0x211103(0x15e));}
1
+ function a15_0x394b(_0x3c912e,_0x1ed9be){var _0x20e6e2=a15_0x20e6();return a15_0x394b=function(_0x394b0b,_0x31978a){_0x394b0b=_0x394b0b-0x184;var _0xc9147d=_0x20e6e2[_0x394b0b];return _0xc9147d;},a15_0x394b(_0x3c912e,_0x1ed9be);}(function(_0x146f49,_0x21ad3a){var _0xa63299=a15_0x394b,_0x20c05b=_0x146f49();while(!![]){try{var _0x3502de=-parseInt(_0xa63299(0x189))/0x1*(parseInt(_0xa63299(0x190))/0x2)+parseInt(_0xa63299(0x18c))/0x3*(parseInt(_0xa63299(0x184))/0x4)+parseInt(_0xa63299(0x192))/0x5+parseInt(_0xa63299(0x185))/0x6*(parseInt(_0xa63299(0x18f))/0x7)+parseInt(_0xa63299(0x191))/0x8+-parseInt(_0xa63299(0x18d))/0x9*(parseInt(_0xa63299(0x18e))/0xa)+parseInt(_0xa63299(0x188))/0xb*(-parseInt(_0xa63299(0x18a))/0xc);if(_0x3502de===_0x21ad3a)break;else _0x20c05b['push'](_0x20c05b['shift']());}catch(_0x668ae5){_0x20c05b['push'](_0x20c05b['shift']());}}}(a15_0x20e6,0x6eac6));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a15_0x20e6(){var _0x57abe5=['8187612GPYXFp','log','41529ZoUxCW','18zMvWtU','1297550rGpEAH','1099xPEIqn','312478HwtKFU','4634952amtOqt','1145535bsVqBc','192jFNZBw','20910kjoAyX','✓\x20已退出登录','!\x20当前未登录','11nOtYOM','4mMakqf'];a15_0x20e6=function(){return _0x57abe5;};return a15_0x20e6();}export function logout(){var _0x472b82=a15_0x394b;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x472b82(0x186))):console[_0x472b82(0x18b)](_0x472b82(0x187));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a16_0x566b3c=a16_0x26b0;(function(_0x4b6973,_0x5dc9ec){const _0xa4e0c4=a16_0x26b0,_0x4129a1=_0x4b6973();while(!![]){try{const _0x9336e=-parseInt(_0xa4e0c4(0x10d))/0x1*(-parseInt(_0xa4e0c4(0x10e))/0x2)+-parseInt(_0xa4e0c4(0x112))/0x3*(-parseInt(_0xa4e0c4(0xfe))/0x4)+parseInt(_0xa4e0c4(0x117))/0x5+parseInt(_0xa4e0c4(0x114))/0x6*(parseInt(_0xa4e0c4(0x116))/0x7)+parseInt(_0xa4e0c4(0x10c))/0x8+parseInt(_0xa4e0c4(0x105))/0x9*(-parseInt(_0xa4e0c4(0x115))/0xa)+-parseInt(_0xa4e0c4(0xff))/0xb;if(_0x9336e===_0x5dc9ec)break;else _0x4129a1['push'](_0x4129a1['shift']());}catch(_0x17dbea){_0x4129a1['push'](_0x4129a1['shift']());}}}(a16_0x394f,0x79ccd));import{jsx as a16_0x5ae57c}from'react/jsx-runtime';import a16_0x531ecf from'meow';import{render}from'ink';function a16_0x26b0(_0xd89298,_0x99b3fe){const _0x394f7d=a16_0x394f();return a16_0x26b0=function(_0x26b0ce,_0x43df38){_0x26b0ce=_0x26b0ce-0xf8;let _0x29cfe6=_0x394f7d[_0x26b0ce];return _0x29cfe6;},a16_0x26b0(_0xd89298,_0x99b3fe);}import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';function a16_0x394f(){const _0x39e4c6=['2336490DZIEbX','input','watch','flags','create','build','boolean','string','432836AXwSXd','14598584baHHix','\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登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\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创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\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启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\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预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\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项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20[app-code]\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20logs\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清空日志\x0a','logs','logout','exit','api','1629ptNHTk','error','trim','config','preview','add','setLogPath','4493840VDlhNB','7ibPIem','133618Ceahyy','start','cwd','page','6oZQoJP','auth','1666962mJgQxv','24460dTWLAD','14JNrprV'];a16_0x394f=function(){return _0x39e4c6;};return a16_0x394f();}import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a16_0x531ecf(a16_0x566b3c(0x100),{'importMeta':import.meta,'flags':{'name':{'type':a16_0x566b3c(0xfd)},'clear':{'type':a16_0x566b3c(0xfc)}}});await run();async function run(){const _0xdddb9c=a16_0x566b3c,_0x40c5c0=cli['input'][0x0];switch(_0x40c5c0){case _0xdddb9c(0xfa):{const _0x54c8bd=cli[_0xdddb9c(0x118)][0x1]?.[_0xdddb9c(0x107)]();render(a16_0x5ae57c(CreateApp,{'projectCode':_0x54c8bd}));break;}case _0xdddb9c(0x10a):{cli['input'][0x1]===_0xdddb9c(0x111)&&(logger[_0xdddb9c(0x10b)](process[_0xdddb9c(0x110)]()),render(a16_0x5ae57c(AddPage,{})));break;}case _0xdddb9c(0x10f):{try{logger['setLogPath'](process[_0xdddb9c(0x110)]()),await runStart();}catch(_0xeb2242){console[_0xdddb9c(0x106)](_0xeb2242),process['exit'](0x1);}break;}case _0xdddb9c(0xfb):{try{logger[_0xdddb9c(0x10b)](process[_0xdddb9c(0x110)]()),await runBuild();}catch(_0x4b5eef){console[_0xdddb9c(0x106)](_0x4b5eef),process[_0xdddb9c(0x103)](0x1);}break;}case _0xdddb9c(0x109):{const _0x1367c4=cli[_0xdddb9c(0xf9)][_0xdddb9c(0xf8)];logger[_0xdddb9c(0x10b)](process[_0xdddb9c(0x110)]());if(_0x1367c4)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x58eaf4){console[_0xdddb9c(0x106)](_0x58eaf4),process['exit'](0x1);}else try{await runPreview();}catch(_0x477e63){console[_0xdddb9c(0x106)](_0x477e63),process[_0xdddb9c(0x103)](0x1);}break;}case _0xdddb9c(0x108):{render(a16_0x5ae57c(Config,{'cli':cli}));break;}case _0xdddb9c(0x104):{await apiCli(cli);break;}case _0xdddb9c(0x113):{render(a16_0x5ae57c(AuthServer,{}));break;}case _0xdddb9c(0x102):{logout();break;}case _0xdddb9c(0x101):{cli[_0xdddb9c(0xf9)]['clear']?clearLogs():showLogs();break;}default:render(a16_0x5ae57c(Help,{}));break;}}
2
+ const a16_0x198d79=a16_0xee6c;(function(_0x4e8fe6,_0x1546d1){const _0x4def12=a16_0xee6c,_0x44310c=_0x4e8fe6();while(!![]){try{const _0x44965f=parseInt(_0x4def12(0xa2))/0x1+-parseInt(_0x4def12(0x98))/0x2+parseInt(_0x4def12(0x91))/0x3+parseInt(_0x4def12(0xa6))/0x4+parseInt(_0x4def12(0xa1))/0x5*(parseInt(_0x4def12(0x9e))/0x6)+-parseInt(_0x4def12(0xa0))/0x7*(parseInt(_0x4def12(0x8f))/0x8)+parseInt(_0x4def12(0x94))/0x9;if(_0x44965f===_0x1546d1)break;else _0x44310c['push'](_0x44310c['shift']());}catch(_0xe37870){_0x44310c['push'](_0x44310c['shift']());}}}(a16_0x1046,0x40deb));import{jsx as a16_0x3a866d}from'react/jsx-runtime';function a16_0xee6c(_0xc23851,_0x39dc64){const _0x10468d=a16_0x1046();return a16_0xee6c=function(_0xee6c0f,_0x46639a){_0xee6c0f=_0xee6c0f-0x8f;let _0x44b6c3=_0x10468d[_0xee6c0f];return _0x44b6c3;},a16_0xee6c(_0xc23851,_0x39dc64);}import a16_0x4e84e4 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';function a16_0x1046(){const _0x251579=['add','watch','api','186ZjGoRc','preview','2129043fYoQRP','2705HjjEQM','64292FXRnsJ','config','input','trim','154764sFavIT','exit','\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登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\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创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\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启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\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预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\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项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20[app-code]\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20logs\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清空日志\x0a','setLogPath','error','8NPZToG','clear','1001664rbZHqS','page','logs','3859578zkcMgT','boolean','flags','cwd','625256aGZErp','auth','start'];a16_0x1046=function(){return _0x251579;};return a16_0x1046();}import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a16_0x4e84e4(a16_0x198d79(0xa8),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a16_0x198d79(0x95)}}});await run();async function run(){const _0x3ad47b=a16_0x198d79,_0xf725e7=cli[_0x3ad47b(0xa4)][0x0];switch(_0xf725e7){case'create':{const _0xc3cb64=cli[_0x3ad47b(0xa4)][0x1]?.[_0x3ad47b(0xa5)]();render(a16_0x3a866d(CreateApp,{'projectCode':_0xc3cb64}));break;}case _0x3ad47b(0x9b):{cli['input'][0x1]===_0x3ad47b(0x92)&&(logger[_0x3ad47b(0xa9)](process[_0x3ad47b(0x97)]()),render(a16_0x3a866d(AddPage,{})));break;}case _0x3ad47b(0x9a):{try{logger[_0x3ad47b(0xa9)](process['cwd']()),await runStart();}catch(_0x5f4c5c){console['error'](_0x5f4c5c),process[_0x3ad47b(0xa7)](0x1);}break;}case'build':{try{logger[_0x3ad47b(0xa9)](process[_0x3ad47b(0x97)]()),await runBuild();}catch(_0x1fbcb8){console['error'](_0x1fbcb8),process[_0x3ad47b(0xa7)](0x1);}break;}case _0x3ad47b(0x9f):{const _0x4f5a60=cli[_0x3ad47b(0x96)][_0x3ad47b(0x9c)];logger['setLogPath'](process[_0x3ad47b(0x97)]());if(_0x4f5a60)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x4784c8){console[_0x3ad47b(0xaa)](_0x4784c8),process[_0x3ad47b(0xa7)](0x1);}else try{await runPreview();}catch(_0x4b18b3){console['error'](_0x4b18b3),process[_0x3ad47b(0xa7)](0x1);}break;}case _0x3ad47b(0xa3):{render(a16_0x3a866d(Config,{'cli':cli}));break;}case _0x3ad47b(0x9d):{await apiCli(cli);break;}case _0x3ad47b(0x99):{render(a16_0x3a866d(AuthServer,{}));break;}case'logout':{logout();break;}case _0x3ad47b(0x93):{cli['flags'][_0x3ad47b(0x90)]?clearLogs():showLogs();break;}default:render(a16_0x3a866d(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x2991f3,_0xd9b8e2){const _0x344a09=a17_0x1280,_0x2c7034=_0x2991f3();while(!![]){try{const _0x3bbbc4=parseInt(_0x344a09(0x13f))/0x1+parseInt(_0x344a09(0x13e))/0x2*(parseInt(_0x344a09(0x144))/0x3)+parseInt(_0x344a09(0x149))/0x4+-parseInt(_0x344a09(0x14d))/0x5*(parseInt(_0x344a09(0x145))/0x6)+-parseInt(_0x344a09(0x14a))/0x7+parseInt(_0x344a09(0x146))/0x8*(parseInt(_0x344a09(0x142))/0x9)+-parseInt(_0x344a09(0x150))/0xa*(parseInt(_0x344a09(0x14f))/0xb);if(_0x3bbbc4===_0xd9b8e2)break;else _0x2c7034['push'](_0x2c7034['shift']());}catch(_0x31e2fe){_0x2c7034['push'](_0x2c7034['shift']());}}}(a17_0x2171,0x3f62d));import{spawn}from'node:child_process';function a17_0x1280(_0x322b6c,_0x475273){const _0x217130=a17_0x2171();return a17_0x1280=function(_0x1280e0,_0x3675e8){_0x1280e0=_0x1280e0-0x13d;let _0x526de0=_0x217130[_0x1280e0];return _0x526de0;},a17_0x1280(_0x322b6c,_0x475273);}function a17_0x2171(){const _0x3ef310=['2XRaZfd','483626DWfVyv','node_modules','env','18wsoNtv','close','243249DmCYHs','1812rbVVUo','1453048hCwsNr','PATH','inherit','306484voXmgI','1762936quBTWo','build','--watch','3235cTrrLV','vite','15521SzsIwi','2110zCYNkg','.bin'];a17_0x2171=function(){return _0x3ef310;};return a17_0x2171();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0xa0104f,_0x2e17ca)=>{const _0x2ca32e=a17_0x1280,_0x486aba=spawn(_0x2ca32e(0x14e),[_0x2ca32e(0x14b),_0x2ca32e(0x14c)],{'stdio':_0x2ca32e(0x148),'shell':!![],'env':{...process[_0x2ca32e(0x141)],'PATH':''+join(process['cwd'](),_0x2ca32e(0x140),_0x2ca32e(0x13d))+delimiter+process[_0x2ca32e(0x141)][_0x2ca32e(0x147)]}});_0x486aba['on'](_0x2ca32e(0x143),_0x46a67e=>{if(_0x46a67e===0x0||_0x46a67e===null)_0xa0104f();else _0x2e17ca(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x46a67e));}),_0x486aba['on']('error',_0x2e17ca);});}
1
+ function a17_0x38e6(_0x582189,_0x14fe78){const _0xb039cd=a17_0xb039();return a17_0x38e6=function(_0x38e649,_0x804f28){_0x38e649=_0x38e649-0x19f;let _0x53a30b=_0xb039cd[_0x38e649];return _0x53a30b;},a17_0x38e6(_0x582189,_0x14fe78);}function a17_0xb039(){const _0x444ed=['node_modules','55932oMNPAD','4284672AQXcpd','build','vite','7037577pbrGRN','npm\x20run\x20build\x20exited\x20with\x20code\x20','env','796198nFgWog','error','2777580AYnnfi','3151938hQGCUl','2156712QSkkGL','close','--watch','8OyZTYh','1spPVFN'];a17_0xb039=function(){return _0x444ed;};return a17_0xb039();}(function(_0x5766c6,_0xaad145){const _0x515ee8=a17_0x38e6,_0x1259ca=_0x5766c6();while(!![]){try{const _0x2285d4=parseInt(_0x515ee8(0x1a8))/0x1*(parseInt(_0x515ee8(0x1a0))/0x2)+-parseInt(_0x515ee8(0x1a3))/0x3+parseInt(_0x515ee8(0x1a4))/0x4+parseInt(_0x515ee8(0x1a2))/0x5+-parseInt(_0x515ee8(0x1aa))/0x6+-parseInt(_0x515ee8(0x1ab))/0x7+parseInt(_0x515ee8(0x1a7))/0x8*(parseInt(_0x515ee8(0x1ae))/0x9);if(_0x2285d4===_0xaad145)break;else _0x1259ca['push'](_0x1259ca['shift']());}catch(_0x2d2f9f){_0x1259ca['push'](_0x1259ca['shift']());}}}(a17_0xb039,0x9323a));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x4da108,_0x13ed51)=>{const _0x4f9795=a17_0x38e6,_0x245f96=spawn(_0x4f9795(0x1ad),[_0x4f9795(0x1ac),_0x4f9795(0x1a6)],{'stdio':'inherit','shell':!![],'env':{...process[_0x4f9795(0x19f)],'PATH':''+join(process['cwd'](),_0x4f9795(0x1a9),'.bin')+delimiter+process[_0x4f9795(0x19f)]['PATH']}});_0x245f96['on'](_0x4f9795(0x1a5),_0x1205ce=>{const _0x489677=_0x4f9795;if(_0x1205ce===0x0||_0x1205ce===null)_0x4da108();else _0x13ed51(new Error(_0x489677(0x1af)+_0x1205ce));}),_0x245f96['on'](_0x4f9795(0x1a1),_0x13ed51);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x304e52,_0x1dd9e6){const _0x4db069=a18_0x3990,_0x1dc441=_0x304e52();while(!![]){try{const _0x193eff=parseInt(_0x4db069(0xfb))/0x1*(-parseInt(_0x4db069(0x100))/0x2)+-parseInt(_0x4db069(0xe7))/0x3*(-parseInt(_0x4db069(0x101))/0x4)+-parseInt(_0x4db069(0xef))/0x5*(-parseInt(_0x4db069(0xf3))/0x6)+parseInt(_0x4db069(0xfd))/0x7+parseInt(_0x4db069(0xed))/0x8+parseInt(_0x4db069(0xf4))/0x9+-parseInt(_0x4db069(0xf0))/0xa;if(_0x193eff===_0x1dd9e6)break;else _0x1dc441['push'](_0x1dc441['shift']());}catch(_0x34b10a){_0x1dc441['push'](_0x1dc441['shift']());}}}(a18_0x433f,0xb37b4));function a18_0x433f(){const _0x53c487=['cwd','584918hGuMGS','build','6562185JEzopa','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','4ehzHqM','124XBywDR','data','toString','1194wDsGDD','message','项目构建失败','trim','项目构建出错','error','11729384UXMjJJ','now','5ofZssJ','26509690KmtTNh','pipe','PATH','6922794RLXweb','8875764JfLinu','node_modules','开始构建项目','.bin','run','env'];a18_0x433f=function(){return _0x53c487;};return a18_0x433f();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a18_0x3990(_0x799808,_0x5c9830){const _0x433fdc=a18_0x433f();return a18_0x3990=function(_0x399077,_0x1224b5){_0x399077=_0x399077-0xe6;let _0x2c356c=_0x433fdc[_0x399077];return _0x2c356c;},a18_0x3990(_0x799808,_0x5c9830);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x92940f,_0x2b55dc)=>{const _0x27564b=a18_0x3990,_0x19ae77=Date[_0x27564b(0xee)]();logger['info'](_0x27564b(0xfc),_0x27564b(0xf6),{'command':'npm\x20run\x20build'});let _0x5f5197='';const _0x5dd925=spawn('npm',[_0x27564b(0xf8),_0x27564b(0xfc)],{'stdio':['inherit','inherit',_0x27564b(0xf1)],'shell':!![],'env':{...process[_0x27564b(0xf9)],'PATH':''+join(process[_0x27564b(0xfa)](),_0x27564b(0xf5),_0x27564b(0xf7))+delimiter+process[_0x27564b(0xf9)][_0x27564b(0xf2)]}});_0x5dd925[_0x27564b(0xff)]?.['on'](_0x27564b(0x102),_0x1b725a=>{const _0x40342f=_0x27564b;_0x5f5197+=_0x1b725a[_0x40342f(0xe6)]();}),_0x5dd925['on']('close',_0x15acf0=>{const _0x5479b9=_0x27564b,_0x2d4e23=Date[_0x5479b9(0xee)]()-_0x19ae77;if(_0x15acf0===0x0||_0x15acf0===null)logger['success'](_0x5479b9(0xfc),'项目构建成功',_0x2d4e23),_0x92940f();else{const _0x4ab458={'exitCode':_0x15acf0,'duration':_0x2d4e23,'command':'npm\x20run\x20build','cwd':process[_0x5479b9(0xfa)]()};_0x5f5197[_0x5479b9(0xea)]()&&(_0x4ab458[_0x5479b9(0xff)]=_0x5f5197[_0x5479b9(0xea)]()),logger[_0x5479b9(0xec)]('build',_0x5479b9(0xe9),_0x4ab458),_0x2b55dc(new Error(_0x5479b9(0xfe)+_0x15acf0));}}),_0x5dd925['on'](_0x27564b(0xec),_0x4361dd=>{const _0x1a8f3d=_0x27564b,_0x56b1b2=Date[_0x1a8f3d(0xee)]()-_0x19ae77;logger[_0x1a8f3d(0xec)]('build',_0x1a8f3d(0xeb),{'error':_0x4361dd[_0x1a8f3d(0xe8)],'duration':_0x56b1b2,'stderr':_0x5f5197[_0x1a8f3d(0xea)]()||undefined}),_0x2b55dc(_0x4361dd);});});}
1
+ (function(_0x9a3cfb,_0x484d1e){const _0x1bd07d=a18_0x31d5,_0x43ebda=_0x9a3cfb();while(!![]){try{const _0x468d84=parseInt(_0x1bd07d(0x16e))/0x1*(-parseInt(_0x1bd07d(0x173))/0x2)+parseInt(_0x1bd07d(0x16b))/0x3+-parseInt(_0x1bd07d(0x177))/0x4*(parseInt(_0x1bd07d(0x182))/0x5)+-parseInt(_0x1bd07d(0x169))/0x6*(-parseInt(_0x1bd07d(0x17f))/0x7)+-parseInt(_0x1bd07d(0x179))/0x8*(parseInt(_0x1bd07d(0x175))/0x9)+-parseInt(_0x1bd07d(0x168))/0xa*(-parseInt(_0x1bd07d(0x170))/0xb)+parseInt(_0x1bd07d(0x180))/0xc;if(_0x468d84===_0x484d1e)break;else _0x43ebda['push'](_0x43ebda['shift']());}catch(_0x3af5f9){_0x43ebda['push'](_0x43ebda['shift']());}}}(a18_0x5125,0x894b3));function a18_0x31d5(_0x4eaeea,_0x2b9031){const _0x51259d=a18_0x5125();return a18_0x31d5=function(_0x31d5f7,_0x4359be){_0x31d5f7=_0x31d5f7-0x164;let _0x4051ef=_0x51259d[_0x31d5f7];return _0x4051ef;},a18_0x31d5(_0x4eaeea,_0x2b9031);}import{delimiter,join}from'node:path';function a18_0x5125(){const _0x57ccc5=['1762976vfCWHe','toString','4838337PYTUct','env','4IUzWeB','trim','8jmiWUV','run','.bin','npm\x20run\x20build\x20exited\x20with\x20code\x20','info','npm\x20run\x20build','8841ssHdeO','849156DchOZu','error','1658060JzPQWR','cwd','开始构建项目','node_modules','build','1096420kRjOlc','2112UVGdgt','PATH','2761719hcjmVT','inherit','npm','1aImdCX','now','88tJETfY','success','close'];a18_0x5125=function(){return _0x57ccc5;};return a18_0x5125();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x19013e,_0x2ac2ff)=>{const _0x535ea5=a18_0x31d5,_0x5c96b5=Date[_0x535ea5(0x16f)]();logger[_0x535ea5(0x17d)](_0x535ea5(0x167),_0x535ea5(0x165),{'command':'npm\x20run\x20build'});let _0x552411='';const _0x389619=spawn(_0x535ea5(0x16d),[_0x535ea5(0x17a),'build'],{'stdio':[_0x535ea5(0x16c),_0x535ea5(0x16c),'pipe'],'shell':!![],'env':{...process[_0x535ea5(0x176)],'PATH':''+join(process[_0x535ea5(0x164)](),_0x535ea5(0x166),_0x535ea5(0x17b))+delimiter+process['env'][_0x535ea5(0x16a)]}});_0x389619['stderr']?.['on']('data',_0x1af9e6=>{const _0x37c032=_0x535ea5;_0x552411+=_0x1af9e6[_0x37c032(0x174)]();}),_0x389619['on'](_0x535ea5(0x172),_0x2fdc38=>{const _0x8e2701=_0x535ea5,_0x42aa4b=Date[_0x8e2701(0x16f)]()-_0x5c96b5;if(_0x2fdc38===0x0||_0x2fdc38===null)logger[_0x8e2701(0x171)](_0x8e2701(0x167),'项目构建成功',_0x42aa4b),_0x19013e();else{const _0x4bc5dd={'exitCode':_0x2fdc38,'duration':_0x42aa4b,'command':_0x8e2701(0x17e),'cwd':process[_0x8e2701(0x164)]()};_0x552411[_0x8e2701(0x178)]()&&(_0x4bc5dd['stderr']=_0x552411[_0x8e2701(0x178)]()),logger['error'](_0x8e2701(0x167),'项目构建失败',_0x4bc5dd),_0x2ac2ff(new Error(_0x8e2701(0x17c)+_0x2fdc38));}}),_0x389619['on'](_0x535ea5(0x181),_0x5d7f71=>{const _0x136002=_0x535ea5,_0x440bce=Date[_0x136002(0x16f)]()-_0x5c96b5;logger[_0x136002(0x181)](_0x136002(0x167),'项目构建出错',{'error':_0x5d7f71['message'],'duration':_0x440bce,'stderr':_0x552411[_0x136002(0x178)]()||undefined}),_0x2ac2ff(_0x5d7f71);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2ba8f6,_0x345949){const _0x337d1c=a19_0x4b50,_0x45c721=_0x2ba8f6();while(!![]){try{const _0x1d80ca=parseInt(_0x337d1c(0xc3))/0x1*(-parseInt(_0x337d1c(0xc9))/0x2)+-parseInt(_0x337d1c(0xc5))/0x3+parseInt(_0x337d1c(0xc4))/0x4*(parseInt(_0x337d1c(0xbe))/0x5)+-parseInt(_0x337d1c(0xc2))/0x6*(parseInt(_0x337d1c(0xc7))/0x7)+parseInt(_0x337d1c(0xb8))/0x8+-parseInt(_0x337d1c(0xbb))/0x9+parseInt(_0x337d1c(0xb2))/0xa;if(_0x1d80ca===_0x345949)break;else _0x45c721['push'](_0x45c721['shift']());}catch(_0x1f9c08){_0x45c721['push'](_0x45c721['shift']());}}}(a19_0x540e,0x62705));function a19_0x4b50(_0x424be4,_0x4ab041){const _0x540e5c=a19_0x540e();return a19_0x4b50=function(_0x4b5023,_0x17bc4c){_0x4b5023=_0x4b5023-0xab;let _0x5aaaa2=_0x540e5c[_0x4b5023];return _0x5aaaa2;},a19_0x4b50(_0x424be4,_0x4ab041);}import{logger}from'../utils/logger.js';export function showLogs(){const _0x357dc2=a19_0x4b50;logger['setLogPath'](process['cwd']());const _0x5301c5=logger[_0x357dc2(0xb5)]();if(_0x5301c5[_0x357dc2(0xb7)]===0x0){console[_0x357dc2(0xc1)](_0x357dc2(0xad));return;}console[_0x357dc2(0xc1)](_0x357dc2(0xc6)),_0x5301c5['forEach']((_0x4c4b9a,_0x134a54)=>{const _0x5af7bb=_0x357dc2,_0x51fb71=new Date(_0x4c4b9a[_0x5af7bb(0xbc)])[_0x5af7bb(0xb1)]('zh-CN'),_0x1b0c7a=_0x4c4b9a['level']===_0x5af7bb(0xbf)?'√':_0x4c4b9a['level']===_0x5af7bb(0xb0)?'×':_0x4c4b9a[_0x5af7bb(0xae)]===_0x5af7bb(0xb9)?'!':'i';console[_0x5af7bb(0xc1)](_0x134a54+0x1+'.\x20'+_0x1b0c7a+'\x20['+_0x4c4b9a['command']+']\x20'+_0x4c4b9a[_0x5af7bb(0xba)]),console[_0x5af7bb(0xc1)]('\x20\x20\x20时间:\x20'+_0x51fb71),_0x4c4b9a[_0x5af7bb(0xb4)]&&console['log']('\x20\x20\x20耗时:\x20'+_0x4c4b9a['duration']+'ms'),_0x4c4b9a['details']&&Object[_0x5af7bb(0xaf)](_0x4c4b9a[_0x5af7bb(0xbd)])[_0x5af7bb(0xb7)]>0x0&&console[_0x5af7bb(0xc1)](_0x5af7bb(0xb3)+JSON[_0x5af7bb(0xc8)](_0x4c4b9a[_0x5af7bb(0xbd)],null,0x2)),console[_0x5af7bb(0xc1)]('');});}function a19_0x540e(){const _0x42c15e=['5700060AFJSEH','timestamp','details','5LnltMM','success','cwd','log','2562HpVJmz','47IRSqqq','2076956FSsopZ','1503996AZozxZ','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','6139wYVgeS','stringify','30698YLWTap','*\x20日志已清空','clearLogs','*\x20暂无日志记录','level','keys','error','toLocaleString','17587450bKBDkm','\x20\x20\x20详情:\x20','duration','readLogs','setLogPath','length','2846200xoDxXw','warn','message'];a19_0x540e=function(){return _0x42c15e;};return a19_0x540e();}export function clearLogs(){const _0x31a8aa=a19_0x4b50;logger[_0x31a8aa(0xb6)](process[_0x31a8aa(0xc0)]()),logger[_0x31a8aa(0xac)](),console[_0x31a8aa(0xc1)](_0x31a8aa(0xab));}
1
+ (function(_0x3ae8e3,_0x3f7254){const _0x41b047=a19_0x14ac,_0x4763d9=_0x3ae8e3();while(!![]){try{const _0x2fe79c=-parseInt(_0x41b047(0x1d5))/0x1*(-parseInt(_0x41b047(0x1ce))/0x2)+parseInt(_0x41b047(0x1e5))/0x3+-parseInt(_0x41b047(0x1de))/0x4*(parseInt(_0x41b047(0x1d9))/0x5)+parseInt(_0x41b047(0x1d3))/0x6+parseInt(_0x41b047(0x1cd))/0x7*(parseInt(_0x41b047(0x1e0))/0x8)+parseInt(_0x41b047(0x1db))/0x9+-parseInt(_0x41b047(0x1e1))/0xa;if(_0x2fe79c===_0x3f7254)break;else _0x4763d9['push'](_0x4763d9['shift']());}catch(_0x3cf875){_0x4763d9['push'](_0x4763d9['shift']());}}}(a19_0x4ac3,0x8fb21));import{logger}from'../utils/logger.js';export function showLogs(){const _0x4dfd0d=a19_0x14ac;logger['setLogPath'](process[_0x4dfd0d(0x1ca)]());const _0x3c7d2f=logger[_0x4dfd0d(0x1d2)]();if(_0x3c7d2f['length']===0x0){console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1da));return;}console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1c9)),_0x3c7d2f[_0x4dfd0d(0x1d4)]((_0x1bbf29,_0x301bdf)=>{const _0x346811=_0x4dfd0d,_0x136300=new Date(_0x1bbf29['timestamp'])[_0x346811(0x1d8)]('zh-CN'),_0x28e624=_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1cf)?'√':_0x1bbf29['level']==='error'?'×':_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1e3)?'!':'i';console[_0x346811(0x1cc)](_0x301bdf+0x1+'.\x20'+_0x28e624+'\x20['+_0x1bbf29[_0x346811(0x1cb)]+']\x20'+_0x1bbf29['message']),console[_0x346811(0x1cc)](_0x346811(0x1d7)+_0x136300),_0x1bbf29[_0x346811(0x1dc)]&&console[_0x346811(0x1cc)](_0x346811(0x1e4)+_0x1bbf29[_0x346811(0x1dc)]+'ms'),_0x1bbf29[_0x346811(0x1d6)]&&Object[_0x346811(0x1e6)](_0x1bbf29[_0x346811(0x1d6)])[_0x346811(0x1dd)]>0x0&&console[_0x346811(0x1cc)](_0x346811(0x1d1)+JSON['stringify'](_0x1bbf29[_0x346811(0x1d6)],null,0x2)),console[_0x346811(0x1cc)]('');});}function a19_0x14ac(_0x343f72,_0x2bb358){const _0x4ac334=a19_0x4ac3();return a19_0x14ac=function(_0x14ac6e,_0x125b47){_0x14ac6e=_0x14ac6e-0x1c9;let _0x4c098e=_0x4ac334[_0x14ac6e];return _0x4c098e;},a19_0x14ac(_0x343f72,_0x2bb358);}export function clearLogs(){const _0x3686a2=a19_0x14ac;logger[_0x3686a2(0x1d0)](process['cwd']()),logger[_0x3686a2(0x1e2)](),console['log']('*\x20日志已清空');}function a19_0x4ac3(){const _0x561bd8=['13079950JKKLdD','clearLogs','warn','\x20\x20\x20耗时:\x20','809691ScPtUk','keys','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','cwd','command','log','5348MMpxaM','177646rxVgRd','success','setLogPath','\x20\x20\x20详情:\x20','readLogs','5563812VTugHq','forEach','11dVoqKu','details','\x20\x20\x20时间:\x20','toLocaleString','624055vaFuIW','*\x20暂无日志记录','443268JDXavi','duration','length','32ZdgvBa','level','7032MHLnZy'];a19_0x4ac3=function(){return _0x561bd8;};return a19_0x4ac3();}
@@ -1 +1 @@
1
- (function(_0x2b8f7e,_0x1e045a){const _0xfb5ff=a20_0x5647,_0x8f1189=_0x2b8f7e();while(!![]){try{const _0x5eec48=parseInt(_0xfb5ff(0xcd))/0x1+-parseInt(_0xfb5ff(0xc7))/0x2+-parseInt(_0xfb5ff(0xdf))/0x3+parseInt(_0xfb5ff(0xe1))/0x4*(parseInt(_0xfb5ff(0xd6))/0x5)+parseInt(_0xfb5ff(0xd2))/0x6+-parseInt(_0xfb5ff(0xca))/0x7*(parseInt(_0xfb5ff(0xda))/0x8)+-parseInt(_0xfb5ff(0xc6))/0x9;if(_0x5eec48===_0x1e045a)break;else _0x8f1189['push'](_0x8f1189['shift']());}catch(_0x490e5d){_0x8f1189['push'](_0x8f1189['shift']());}}}(a20_0x18e0,0xce6c6));import{delimiter,join}from'node:path';function a20_0x5647(_0x28857b,_0x4ae1a3){const _0x18e007=a20_0x18e0();return a20_0x5647=function(_0x5647ef,_0x343fdf){_0x5647ef=_0x5647ef-0xc5;let _0x3f9fea=_0x18e007[_0x5647ef];return _0x3f9fea;},a20_0x5647(_0x28857b,_0x4ae1a3);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x21b4db,_0xae8612)=>{const _0x1a3acc=a20_0x5647,_0x42cb92=Date[_0x1a3acc(0xd7)]();logger[_0x1a3acc(0xc9)](_0x1a3acc(0xd3),'启动预览服务器',{'command':_0x1a3acc(0xd5)});let _0x2079ca='';const _0x5311a0=spawn(_0x1a3acc(0xcb),[_0x1a3acc(0xd3)],{'stdio':['inherit',_0x1a3acc(0xc5),_0x1a3acc(0xcf)],'shell':!![],'env':{...process[_0x1a3acc(0xd1)],'PATH':''+join(process[_0x1a3acc(0xde)](),_0x1a3acc(0xdd),_0x1a3acc(0xd4))+delimiter+process[_0x1a3acc(0xd1)][_0x1a3acc(0xce)]}});_0x5311a0[_0x1a3acc(0xcc)]?.['on'](_0x1a3acc(0xdc),_0x43aaa8=>{_0x2079ca+=_0x43aaa8['toString']();}),_0x5311a0['on'](_0x1a3acc(0xc8),_0x13a56e=>{const _0x2ee09d=_0x1a3acc,_0x2f985a=Date['now']()-_0x42cb92;if(_0x13a56e===0x0||_0x13a56e===null)logger['success'](_0x2ee09d(0xd3),_0x2ee09d(0xd0),_0x2f985a),_0x21b4db();else{const _0x29e252={'exitCode':_0x13a56e,'duration':_0x2f985a,'command':_0x2ee09d(0xd5),'cwd':process['cwd']()};_0x2079ca['trim']()&&(_0x29e252[_0x2ee09d(0xcc)]=_0x2079ca['trim']()),logger[_0x2ee09d(0xdb)](_0x2ee09d(0xd3),'预览服务器启动失败',_0x29e252),_0xae8612(new Error(_0x2ee09d(0xd8)+_0x13a56e));}}),_0x5311a0['on'](_0x1a3acc(0xdb),_0x51c6c7=>{const _0x3bd9fd=_0x1a3acc,_0x5b9f14=Date[_0x3bd9fd(0xd7)]()-_0x42cb92;logger['error']('preview',_0x3bd9fd(0xe2),{'error':_0x51c6c7[_0x3bd9fd(0xd9)],'duration':_0x5b9f14,'stderr':_0x2079ca[_0x3bd9fd(0xe0)]()||undefined}),_0xae8612(_0x51c6c7);});});}function a20_0x18e0(){const _0x535ffc=['env','9273672VpBixH','preview','.bin','vite\x20preview','33975xUqVVz','now','vite\x20preview\x20exited\x20with\x20code\x20','message','16BFxtFU','error','data','node_modules','cwd','160173lHOlcq','trim','764THtIfW','预览服务器启动出错','inherit','15736419whxReK','2013886NsmWaf','close','info','383992GWqBoL','vite','stderr','920590IjUCQz','PATH','pipe','预览服务器启动成功'];a20_0x18e0=function(){return _0x535ffc;};return a20_0x18e0();}
1
+ (function(_0x5abf21,_0x38d410){const _0x2acaa1=a20_0x41f9,_0x9328f5=_0x5abf21();while(!![]){try{const _0x1b12bc=-parseInt(_0x2acaa1(0x93))/0x1+parseInt(_0x2acaa1(0x8c))/0x2+parseInt(_0x2acaa1(0x90))/0x3+-parseInt(_0x2acaa1(0x84))/0x4*(parseInt(_0x2acaa1(0x8b))/0x5)+-parseInt(_0x2acaa1(0x88))/0x6+parseInt(_0x2acaa1(0x92))/0x7+-parseInt(_0x2acaa1(0x79))/0x8*(-parseInt(_0x2acaa1(0x95))/0x9);if(_0x1b12bc===_0x38d410)break;else _0x9328f5['push'](_0x9328f5['shift']());}catch(_0x2b7cb6){_0x9328f5['push'](_0x9328f5['shift']());}}}(a20_0x2d7e,0x50207));function a20_0x2d7e(){const _0x359298=['449376zACRdB','PATH','vite\x20preview','node_modules','218196EqtCgd','inherit','3534622gRAokm','502139siKEoI','success','54dkBWRb','908608biUEod','env','.bin','preview','info','预览服务器启动成功','error','cwd','vite\x20preview\x20exited\x20with\x20code\x20','close','pipe','11884sspboj','trim','stderr','预览服务器启动出错','3439602PztKLe','now','toString','135dErCyl'];a20_0x2d7e=function(){return _0x359298;};return a20_0x2d7e();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x41f9(_0xf9865c,_0x6f6dae){const _0x2d7e3c=a20_0x2d7e();return a20_0x41f9=function(_0x41f9b2,_0x4dd122){_0x41f9b2=_0x41f9b2-0x79;let _0x10373e=_0x2d7e3c[_0x41f9b2];return _0x10373e;},a20_0x41f9(_0xf9865c,_0x6f6dae);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x49d6d8,_0x52974f)=>{const _0x3aaa68=a20_0x41f9,_0x49ab4f=Date[_0x3aaa68(0x89)]();logger[_0x3aaa68(0x7d)](_0x3aaa68(0x7c),'启动预览服务器',{'command':_0x3aaa68(0x8e)});let _0x335e43='';const _0x5789ad=spawn('vite',[_0x3aaa68(0x7c)],{'stdio':[_0x3aaa68(0x91),_0x3aaa68(0x91),_0x3aaa68(0x83)],'shell':!![],'env':{...process[_0x3aaa68(0x7a)],'PATH':''+join(process[_0x3aaa68(0x80)](),_0x3aaa68(0x8f),_0x3aaa68(0x7b))+delimiter+process[_0x3aaa68(0x7a)][_0x3aaa68(0x8d)]}});_0x5789ad['stderr']?.['on']('data',_0x46d558=>{const _0x835ec=_0x3aaa68;_0x335e43+=_0x46d558[_0x835ec(0x8a)]();}),_0x5789ad['on'](_0x3aaa68(0x82),_0x4e12c0=>{const _0x2fa331=_0x3aaa68,_0x2d592a=Date[_0x2fa331(0x89)]()-_0x49ab4f;if(_0x4e12c0===0x0||_0x4e12c0===null)logger[_0x2fa331(0x94)](_0x2fa331(0x7c),_0x2fa331(0x7e),_0x2d592a),_0x49d6d8();else{const _0x36b526={'exitCode':_0x4e12c0,'duration':_0x2d592a,'command':_0x2fa331(0x8e),'cwd':process['cwd']()};_0x335e43[_0x2fa331(0x85)]()&&(_0x36b526[_0x2fa331(0x86)]=_0x335e43[_0x2fa331(0x85)]()),logger[_0x2fa331(0x7f)](_0x2fa331(0x7c),'预览服务器启动失败',_0x36b526),_0x52974f(new Error(_0x2fa331(0x81)+_0x4e12c0));}}),_0x5789ad['on'](_0x3aaa68(0x7f),_0x138af8=>{const _0x1b955d=_0x3aaa68,_0x4c5647=Date['now']()-_0x49ab4f;logger[_0x1b955d(0x7f)](_0x1b955d(0x7c),_0x1b955d(0x87),{'error':_0x138af8['message'],'duration':_0x4c5647,'stderr':_0x335e43[_0x1b955d(0x85)]()||undefined}),_0x52974f(_0x138af8);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x30f3c3,_0x39933b){const _0x5ecf55=a21_0x3801,_0x3905fd=_0x30f3c3();while(!![]){try{const _0x5c4bc2=-parseInt(_0x5ecf55(0xaf))/0x1+-parseInt(_0x5ecf55(0xc4))/0x2+parseInt(_0x5ecf55(0xc3))/0x3+-parseInt(_0x5ecf55(0xbd))/0x4*(parseInt(_0x5ecf55(0xc5))/0x5)+-parseInt(_0x5ecf55(0xc8))/0x6+parseInt(_0x5ecf55(0xb9))/0x7+parseInt(_0x5ecf55(0xb5))/0x8;if(_0x5c4bc2===_0x39933b)break;else _0x3905fd['push'](_0x3905fd['shift']());}catch(_0x21b59e){_0x3905fd['push'](_0x3905fd['shift']());}}}(a21_0x1467,0x25aff));function a21_0x3801(_0x3bc4e1,_0x291908){const _0x146798=a21_0x1467();return a21_0x3801=function(_0x380165,_0xe7f535){_0x380165=_0x380165-0xaf;let _0x4e9309=_0x146798[_0x380165];return _0x4e9309;},a21_0x3801(_0x3bc4e1,_0x291908);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a21_0x1467(){const _0x5c565e=['close','start','开发服务器启动成功','vite\x20exited\x20with\x20code\x20','585852nElmIl','278996pyHrkb','5fhEKwa','inherit','stderr','897816TVlaCt','246622KLHFAs','error','message','开发服务器启动出错','trim','vite','3028536DUwxyX','cwd','now','success','1164842PkBFKV','开发服务器启动失败','toString','pipe','200536xXQkDP','.bin'];a21_0x1467=function(){return _0x5c565e;};return a21_0x1467();}export function runStart(_0xeb7c43){return new Promise((_0x5c3906,_0x28d4fe)=>{const _0x3a40aa=a21_0x3801,_0x8c06b4=Date['now'](),_0x465e5e=_0xeb7c43||process[_0x3a40aa(0xb6)]();logger['info']('start','启动开发服务器',{'command':'vite','cwd':_0x465e5e});let _0x41b767='';const _0x291da1=spawn('vite',{'stdio':['inherit',_0x3a40aa(0xc6),_0x3a40aa(0xbc)],'shell':!![],'cwd':_0x465e5e,'env':{...process['env'],'PATH':''+join(_0x465e5e,'node_modules',_0x3a40aa(0xbe))+delimiter+process['env']['PATH']}});_0x291da1[_0x3a40aa(0xc7)]?.['on']('data',_0x275548=>{const _0x482ace=_0x3a40aa,_0x5604e0=_0x275548[_0x482ace(0xbb)]();_0x41b767+=_0x5604e0,process[_0x482ace(0xc7)]['write'](_0x5604e0);}),_0x291da1['on'](_0x3a40aa(0xbf),_0x1243ed=>{const _0x299179=_0x3a40aa,_0x36d196=Date[_0x299179(0xb7)]()-_0x8c06b4;if(_0x1243ed===0x0||_0x1243ed===null)logger[_0x299179(0xb8)](_0x299179(0xc0),_0x299179(0xc1),_0x36d196),_0x5c3906();else{const _0x1ca256={'exitCode':_0x1243ed,'duration':_0x36d196,'command':_0x299179(0xb4),'cwd':_0x465e5e};_0x41b767['trim']()&&(_0x1ca256[_0x299179(0xc7)]=_0x41b767[_0x299179(0xb3)]()),logger[_0x299179(0xb0)](_0x299179(0xc0),_0x299179(0xba),_0x1ca256),_0x28d4fe(new Error(_0x299179(0xc2)+_0x1243ed));}}),_0x291da1['on'](_0x3a40aa(0xb0),_0x5b9aca=>{const _0x5b621a=_0x3a40aa,_0xf32242=Date[_0x5b621a(0xb7)]()-_0x8c06b4,_0x1f7ef6={'error':_0x5b9aca[_0x5b621a(0xb1)],'duration':_0xf32242,'command':_0x5b621a(0xb4),'cwd':_0x465e5e};_0x41b767['trim']()&&(_0x1f7ef6[_0x5b621a(0xc7)]=_0x41b767[_0x5b621a(0xb3)]()),logger['error'](_0x5b621a(0xc0),_0x5b621a(0xb2),_0x1f7ef6),_0x28d4fe(_0x5b9aca);});});}
1
+ function a21_0x1a14(_0x3ce0bb,_0x2d7ed8){const _0xcd6d5d=a21_0xcd6d();return a21_0x1a14=function(_0x1a1445,_0x5e3653){_0x1a1445=_0x1a1445-0xc7;let _0x1f724e=_0xcd6d5d[_0x1a1445];return _0x1f724e;},a21_0x1a14(_0x3ce0bb,_0x2d7ed8);}function a21_0xcd6d(){const _0x1cbd82=['env','525WYxzcr','pipe','12vaOFTL','578866ByYLZY','45138afeYWq','1647921KCLZIL','inherit','开发服务器启动失败','2770888LdGxJj','开发服务器启动出错','225VaCDbD','info','4971DkoOJB','cwd','toString','启动开发服务器','127510tnSBXQ','295908kBACnV','开发服务器启动成功','now','PATH','612GDelWl','error','35gTnxIb','close','vite\x20exited\x20with\x20code\x20','start','stderr','trim','vite','data'];a21_0xcd6d=function(){return _0x1cbd82;};return a21_0xcd6d();}(function(_0x2f2ca9,_0x891438){const _0x5032c3=a21_0x1a14,_0x31a936=_0x2f2ca9();while(!![]){try{const _0x395eec=parseInt(_0x5032c3(0xdf))/0x1+-parseInt(_0x5032c3(0xd1))/0x2*(parseInt(_0x5032c3(0xc8))/0x3)+-parseInt(_0x5032c3(0xcd))/0x4*(parseInt(_0x5032c3(0xd3))/0x5)+parseInt(_0x5032c3(0xe0))/0x6*(parseInt(_0x5032c3(0xdc))/0x7)+parseInt(_0x5032c3(0xe4))/0x8+parseInt(_0x5032c3(0xe6))/0x9*(-parseInt(_0x5032c3(0xcc))/0xa)+-parseInt(_0x5032c3(0xe1))/0xb*(-parseInt(_0x5032c3(0xde))/0xc);if(_0x395eec===_0x891438)break;else _0x31a936['push'](_0x31a936['shift']());}catch(_0xcd599){_0x31a936['push'](_0x31a936['shift']());}}}(a21_0xcd6d,0x482b7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x35e1d2){return new Promise((_0x434500,_0x22f833)=>{const _0x1ddb10=a21_0x1a14,_0x4d754b=Date[_0x1ddb10(0xcf)](),_0x12c8d8=_0x35e1d2||process[_0x1ddb10(0xc9)]();logger[_0x1ddb10(0xc7)](_0x1ddb10(0xd6),_0x1ddb10(0xcb),{'command':_0x1ddb10(0xd9),'cwd':_0x12c8d8});let _0x286678='';const _0x5411aa=spawn(_0x1ddb10(0xd9),{'stdio':[_0x1ddb10(0xe2),'inherit',_0x1ddb10(0xdd)],'shell':!![],'cwd':_0x12c8d8,'env':{...process['env'],'PATH':''+join(_0x12c8d8,'node_modules','.bin')+delimiter+process[_0x1ddb10(0xdb)][_0x1ddb10(0xd0)]}});_0x5411aa['stderr']?.['on'](_0x1ddb10(0xda),_0x5bafaf=>{const _0x17be89=_0x1ddb10,_0x50f02f=_0x5bafaf[_0x17be89(0xca)]();_0x286678+=_0x50f02f,process[_0x17be89(0xd7)]['write'](_0x50f02f);}),_0x5411aa['on'](_0x1ddb10(0xd4),_0x1ddcfa=>{const _0x5c1249=_0x1ddb10,_0x24eed1=Date[_0x5c1249(0xcf)]()-_0x4d754b;if(_0x1ddcfa===0x0||_0x1ddcfa===null)logger['success'](_0x5c1249(0xd6),_0x5c1249(0xce),_0x24eed1),_0x434500();else{const _0x3788a0={'exitCode':_0x1ddcfa,'duration':_0x24eed1,'command':'vite','cwd':_0x12c8d8};_0x286678[_0x5c1249(0xd8)]()&&(_0x3788a0[_0x5c1249(0xd7)]=_0x286678[_0x5c1249(0xd8)]()),logger[_0x5c1249(0xd2)](_0x5c1249(0xd6),_0x5c1249(0xe3),_0x3788a0),_0x22f833(new Error(_0x5c1249(0xd5)+_0x1ddcfa));}}),_0x5411aa['on'](_0x1ddb10(0xd2),_0x3e2c30=>{const _0x2689f0=_0x1ddb10,_0x4fa829=Date[_0x2689f0(0xcf)]()-_0x4d754b,_0x2670e9={'error':_0x3e2c30['message'],'duration':_0x4fa829,'command':'vite','cwd':_0x12c8d8};_0x286678['trim']()&&(_0x2670e9['stderr']=_0x286678[_0x2689f0(0xd8)]()),logger[_0x2689f0(0xd2)](_0x2689f0(0xd6),_0x2689f0(0xe5),_0x2670e9),_0x22f833(_0x3e2c30);});});}
@@ -1 +1 @@
1
- (function(_0x42d775,_0x2d807d){const _0x6ea40b=a22_0x14fc,_0x4d61de=_0x42d775();while(!![]){try{const _0x451db1=-parseInt(_0x6ea40b(0x15d))/0x1*(-parseInt(_0x6ea40b(0x157))/0x2)+-parseInt(_0x6ea40b(0x15f))/0x3*(-parseInt(_0x6ea40b(0x150))/0x4)+parseInt(_0x6ea40b(0x156))/0x5*(parseInt(_0x6ea40b(0x15a))/0x6)+-parseInt(_0x6ea40b(0x158))/0x7+parseInt(_0x6ea40b(0x164))/0x8+parseInt(_0x6ea40b(0x155))/0x9*(-parseInt(_0x6ea40b(0x161))/0xa)+-parseInt(_0x6ea40b(0x154))/0xb*(parseInt(_0x6ea40b(0x151))/0xc);if(_0x451db1===_0x2d807d)break;else _0x4d61de['push'](_0x4d61de['shift']());}catch(_0x511fd7){_0x4d61de['push'](_0x4d61de['shift']());}}}(a22_0x2e4c,0x60229));function a22_0x14fc(_0x3c2a58,_0x3b83f9){const _0x2e4c59=a22_0x2e4c();return a22_0x14fc=function(_0x14fc0a,_0x65a90){_0x14fc0a=_0x14fc0a-0x14e;let _0x5e92c9=_0x2e4c59[_0x14fc0a];return _0x5e92c9;},a22_0x14fc(_0x3c2a58,_0x3b83f9);}import{jsxs as a22_0x565c8f,jsx as a22_0x596b5a}from'react/jsx-runtime';import{Box,Text}from'ink';function a22_0x2e4c(){const _0x2d668a=['column','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','8088BLqjwN','description','3dUDJfa','map','6338910oPxiiR','\x20*\x20配置示例:','gray','5005904DtBXXt','配置当前项目的\x20App\x20Code','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','获取配置项','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','965176vOSDOY','156fBTSkb','\x20\x20\x20\x20','无效的命令,可用命令如下:','394801XnEWkT','9oIUsoq','478415aVLsnR','188NgZhPA','2270989rCVyUi','设置配置项','12hKplzO'];a22_0x2e4c=function(){return _0x2d668a;};return a22_0x2e4c();}export function ConfigHelp(){const _0x2e5be9=a22_0x14fc,_0x47857c=[{'command':_0x2e5be9(0x14f),'description':_0x2e5be9(0x159)},{'command':_0x2e5be9(0x15c),'description':_0x2e5be9(0x14e)},{'command':_0x2e5be9(0x166),'description':'列出所有配置项'}],_0x1b24c2=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x2e5be9(0x165)}];return a22_0x565c8f(Box,{'flexDirection':_0x2e5be9(0x15b),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x596b5a(Box,{'marginBottom':0x1,'children':a22_0x565c8f(Text,{'color':_0x2e5be9(0x163),'children':['\x20!','\x20\x20',_0x2e5be9(0x153)]})}),_0x47857c['map'](_0x5c6363=>a22_0x565c8f(Box,{'children':[a22_0x565c8f(Text,{'children':[_0x2e5be9(0x152),_0x5c6363[_0x2e5be9(0x167)]]}),a22_0x596b5a(Text,{'color':'gray','children':_0x5c6363[_0x2e5be9(0x15e)]})]},_0x5c6363['command'])),a22_0x596b5a(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x596b5a(Text,{'color':_0x2e5be9(0x163),'children':_0x2e5be9(0x162)})}),_0x1b24c2[_0x2e5be9(0x160)](_0x37c05f=>a22_0x565c8f(Box,{'children':[a22_0x565c8f(Text,{'children':[_0x2e5be9(0x152),_0x37c05f[_0x2e5be9(0x167)]]}),a22_0x596b5a(Text,{'color':_0x2e5be9(0x163),'children':_0x37c05f[_0x2e5be9(0x15e)]})]},_0x37c05f['command']))]});}
1
+ (function(_0x1a09f7,_0x457af9){const _0x283713=a22_0x6e26,_0x5cfcf1=_0x1a09f7();while(!![]){try{const _0x558336=-parseInt(_0x283713(0x81))/0x1*(-parseInt(_0x283713(0x7c))/0x2)+parseInt(_0x283713(0x76))/0x3+-parseInt(_0x283713(0x7a))/0x4*(-parseInt(_0x283713(0x82))/0x5)+-parseInt(_0x283713(0x7e))/0x6*(-parseInt(_0x283713(0x83))/0x7)+parseInt(_0x283713(0x79))/0x8+parseInt(_0x283713(0x78))/0x9*(parseInt(_0x283713(0x80))/0xa)+-parseInt(_0x283713(0x7d))/0xb;if(_0x558336===_0x457af9)break;else _0x5cfcf1['push'](_0x5cfcf1['shift']());}catch(_0x5d4227){_0x5cfcf1['push'](_0x5cfcf1['shift']());}}}(a22_0x29f3,0x60620));function a22_0x29f3(){const _0x2c74f1=['6JjuTPS','description','72500pfgAly','1qHKXOf','605YbeOtJ','2585387dzykdI','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','map','gray','command','列出所有配置项','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','无效的命令,可用命令如下:','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','1843572hSCTRJ','\x20*\x20配置示例:','927lucmxn','3709640oKEjrf','1244pTdmku','\x20\x20\x20\x20','1808YDHJSY','20218781qlNmiI'];a22_0x29f3=function(){return _0x2c74f1;};return a22_0x29f3();}function a22_0x6e26(_0x1f3d63,_0x277a6b){const _0x29f393=a22_0x29f3();return a22_0x6e26=function(_0x6e26d3,_0x5972b7){_0x6e26d3=_0x6e26d3-0x6e;let _0x313fb=_0x29f393[_0x6e26d3];return _0x313fb;},a22_0x6e26(_0x1f3d63,_0x277a6b);}import{jsxs as a22_0x1838bc,jsx as a22_0x225820}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x28f630=a22_0x6e26,_0x2852e9=[{'command':_0x28f630(0x75),'description':'设置配置项'},{'command':_0x28f630(0x74),'description':'获取配置项'},{'command':_0x28f630(0x72),'description':_0x28f630(0x71)}],_0x464059=[{'command':_0x28f630(0x84),'description':'配置当前项目的\x20App\x20Code'}];return a22_0x1838bc(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x225820(Box,{'marginBottom':0x1,'children':a22_0x1838bc(Text,{'color':_0x28f630(0x6f),'children':['\x20!','\x20\x20',_0x28f630(0x73)]})}),_0x2852e9[_0x28f630(0x6e)](_0xc98d9=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0xc98d9['command']]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0xc98d9['description']})]},_0xc98d9[_0x28f630(0x70)])),a22_0x225820(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x28f630(0x77)})}),_0x464059[_0x28f630(0x6e)](_0x2a959e=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0x2a959e[_0x28f630(0x70)]]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x2a959e[_0x28f630(0x7f)]})]},_0x2a959e[_0x28f630(0x70)]))]});}
@@ -1 +1 @@
1
- const a23_0x851d1=a23_0x371e;(function(_0x431e70,_0x46e625){const _0x578ff4=a23_0x371e,_0x5eb502=_0x431e70();while(!![]){try{const _0x339092=-parseInt(_0x578ff4(0x150))/0x1*(parseInt(_0x578ff4(0x144))/0x2)+parseInt(_0x578ff4(0x14b))/0x3*(-parseInt(_0x578ff4(0x152))/0x4)+-parseInt(_0x578ff4(0x154))/0x5+parseInt(_0x578ff4(0x14a))/0x6+parseInt(_0x578ff4(0x146))/0x7*(-parseInt(_0x578ff4(0x151))/0x8)+-parseInt(_0x578ff4(0x148))/0x9*(parseInt(_0x578ff4(0x14d))/0xa)+parseInt(_0x578ff4(0x142))/0xb;if(_0x339092===_0x46e625)break;else _0x5eb502['push'](_0x5eb502['shift']());}catch(_0x410a7a){_0x5eb502['push'](_0x5eb502['shift']());}}}(a23_0x439c,0xb4d1b));function a23_0x371e(_0x2dd21e,_0x231d34){const _0x439cea=a23_0x439c();return a23_0x371e=function(_0x371ee7,_0x376f48){_0x371ee7=_0x371ee7-0x141;let _0x2dcfcb=_0x439cea[_0x371ee7];return _0x2dcfcb;},a23_0x371e(_0x2dd21e,_0x231d34);}import{jsx as a23_0x2da50f}from'react/jsx-runtime';function a23_0x439c(){const _0x6b4fd0=['54222091pSASaL','input','58aJGOlp','get','280vepjxb','includes','1785015jWiauR','log','6142992rQDGCK','21CrCNWw','red','50qKLyPj','stringify','保存配置失败','40841rKjTLS','242984CoXZtU','406180HsFWHs','cwd','5553395HDfgaK','set','list','undefined'];a23_0x439c=function(){return _0x6b4fd0;};return a23_0x439c();}import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process[a23_0x851d1(0x153)](),'.lovrabetrc');export function Config(_0x45c368){const _0x23223b=a23_0x851d1,{cli:_0x25da37}=_0x45c368,_0x109db3=_0x25da37[_0x23223b(0x143)][0x1],_0x166531=_0x25da37[_0x23223b(0x143)][0x2],_0x1a439f=[_0x23223b(0x155),_0x23223b(0x145)][_0x23223b(0x147)](_0x109db3||''),_0x3ead99=_0x25da37['input']['length']>=0x3,_0x487046=readConfig();if(_0x109db3===_0x23223b(0x155)){if(_0x166531){const _0x4ee5ba=_0x25da37[_0x23223b(0x143)][0x3];if(typeof _0x4ee5ba!==_0x23223b(0x141)){_0x487046[_0x166531]=_0x4ee5ba;try{writeFileSync(configPath,JSON['stringify'](_0x487046,null,0x2),{'encoding':'utf8'});}catch(_0x1eceb2){return a23_0x2da50f(Box,{'children':a23_0x2da50f(Text,{'color':_0x23223b(0x14c),'children':_0x23223b(0x14f)})});}return null;}return a23_0x2da50f(Box,{'children':a23_0x2da50f(Text,{'color':_0x23223b(0x14c),'children':'未提供配置值'})});}}if(_0x109db3==='get'){if(_0x166531)return console['log'](_0x487046[_0x166531]||_0x23223b(0x141)),null;return null;}if(_0x109db3===_0x23223b(0x156))return console[_0x23223b(0x149)](JSON[_0x23223b(0x14e)](_0x487046,null,0x2)),null;if(!_0x1a439f||!_0x3ead99)return a23_0x2da50f(ConfigHelp,{});return null;}
1
+ (function(_0x123e10,_0x4b12d5){const _0x4f098a=a23_0x2200,_0x54ceac=_0x123e10();while(!![]){try{const _0x267b6c=-parseInt(_0x4f098a(0x133))/0x1+parseInt(_0x4f098a(0x13a))/0x2*(parseInt(_0x4f098a(0x131))/0x3)+parseInt(_0x4f098a(0x127))/0x4+parseInt(_0x4f098a(0x132))/0x5*(parseInt(_0x4f098a(0x137))/0x6)+parseInt(_0x4f098a(0x138))/0x7*(-parseInt(_0x4f098a(0x12f))/0x8)+-parseInt(_0x4f098a(0x126))/0x9+-parseInt(_0x4f098a(0x12c))/0xa;if(_0x267b6c===_0x4b12d5)break;else _0x54ceac['push'](_0x54ceac['shift']());}catch(_0x52b164){_0x54ceac['push'](_0x54ceac['shift']());}}}(a23_0x2888,0xba684));import{jsx as a23_0x2f1a41}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process['cwd'](),'.lovrabetrc');function a23_0x2200(_0x4546c3,_0x1fbf5a){const _0x288895=a23_0x2888();return a23_0x2200=function(_0x2200e4,_0x3eb194){_0x2200e4=_0x2200e4-0x126;let _0x51e8e2=_0x288895[_0x2200e4];return _0x51e8e2;},a23_0x2200(_0x4546c3,_0x1fbf5a);}function a23_0x2888(){const _0x176a53=['2526435wdAtMT','5860100BoiSrh','undefined','保存配置失败','utf8','red','21003460PmUXkm','get','log','25288JBfEGz','stringify','6675sOxIIt','114160rEiWCB','1120481ADUboP','未提供配置值','input','includes','378zciWsd','350migPYN','set','1366NYHaIK','list'];a23_0x2888=function(){return _0x176a53;};return a23_0x2888();}export function Config(_0x3d119c){const _0x542099=a23_0x2200,{cli:_0x38d40a}=_0x3d119c,_0x923786=_0x38d40a[_0x542099(0x135)][0x1],_0x33002b=_0x38d40a[_0x542099(0x135)][0x2],_0x3b3d0d=[_0x542099(0x139),_0x542099(0x12d)][_0x542099(0x136)](_0x923786||''),_0x35d118=_0x38d40a[_0x542099(0x135)]['length']>=0x3,_0x4726c9=readConfig();if(_0x923786===_0x542099(0x139)){if(_0x33002b){const _0x4b432d=_0x38d40a[_0x542099(0x135)][0x3];if(typeof _0x4b432d!==_0x542099(0x128)){_0x4726c9[_0x33002b]=_0x4b432d;try{writeFileSync(configPath,JSON[_0x542099(0x130)](_0x4726c9,null,0x2),{'encoding':_0x542099(0x12a)});}catch(_0x2aac8d){return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':_0x542099(0x12b),'children':_0x542099(0x129)})});}return null;}return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':'red','children':_0x542099(0x134)})});}}if(_0x923786===_0x542099(0x12d)){if(_0x33002b)return console['log'](_0x4726c9[_0x33002b]||_0x542099(0x128)),null;return null;}if(_0x923786===_0x542099(0x13b))return console[_0x542099(0x12e)](JSON[_0x542099(0x130)](_0x4726c9,null,0x2)),null;if(!_0x3b3d0d||!_0x35d118)return a23_0x2f1a41(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a24_0x3c29b4=a24_0x2b26;(function(_0x207bcb,_0x551440){const _0x400640=a24_0x2b26,_0x295e81=_0x207bcb();while(!![]){try{const _0x23da26=parseInt(_0x400640(0x180))/0x1*(parseInt(_0x400640(0x183))/0x2)+-parseInt(_0x400640(0x189))/0x3*(parseInt(_0x400640(0x186))/0x4)+-parseInt(_0x400640(0x187))/0x5+-parseInt(_0x400640(0x18e))/0x6+-parseInt(_0x400640(0x181))/0x7*(-parseInt(_0x400640(0x18f))/0x8)+-parseInt(_0x400640(0x18b))/0x9*(-parseInt(_0x400640(0x18c))/0xa)+parseInt(_0x400640(0x18a))/0xb*(parseInt(_0x400640(0x184))/0xc);if(_0x23da26===_0x551440)break;else _0x295e81['push'](_0x295e81['shift']());}catch(_0x176d21){_0x295e81['push'](_0x295e81['shift']());}}}(a24_0x39b4,0xa7807));function a24_0x2b26(_0x37876f,_0x387ba3){const _0x39b42c=a24_0x39b4();return a24_0x2b26=function(_0x2b26ad,_0x99b203){_0x2b26ad=_0x2b26ad-0x180;let _0x111b29=_0x39b42c[_0x2b26ad];return _0x111b29;},a24_0x2b26(_0x37876f,_0x387ba3);}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x3c29b4(0x188)?a24_0x3c29b4(0x185):a24_0x3c29b4(0x18d);function a24_0x39b4(){const _0x22f276=['313340oQRRSj','4837790pxKEeC','online','33HXZRvW','12903935vbmpCw','153243LCMvaU','130hUsRHw','https://user-daily.lovrabet.com','5027142YBXdAC','8HHmWgT','59adygFr','3921589EouzyJ','https://daily-api.lovrabet.com','7642FVAWob','24bLQmjE','https://user.lovrabet.com'];a24_0x39b4=function(){return _0x22f276;};return a24_0x39b4();}export const getApiDomain=()=>getEnv()===a24_0x3c29b4(0x188)?'https://api.lovrabet.com':a24_0x3c29b4(0x182);
1
+ function a24_0x292b(){const _0x6200ff=['https://user-daily.lovrabet.com','50lclDBy','https://api.lovrabet.com','7tCFybF','1370238UQOomD','https://user.lovrabet.com','393804Zrpaea','7004240uEeRlJ','2050677haSufm','https://daily-api.lovrabet.com','262404eyPNRy','online','6sTyJyl','3171688uizQUL','556336pKoisL'];a24_0x292b=function(){return _0x6200ff;};return a24_0x292b();}const a24_0x2bd64b=a24_0x459e;function a24_0x459e(_0x53d99c,_0x5a70bb){const _0x292bef=a24_0x292b();return a24_0x459e=function(_0x459ed4,_0x575b10){_0x459ed4=_0x459ed4-0x114;let _0x5479b3=_0x292bef[_0x459ed4];return _0x5479b3;},a24_0x459e(_0x53d99c,_0x5a70bb);}(function(_0x4a5e82,_0x7300ba){const _0x1efcef=a24_0x459e,_0x1ad5cb=_0x4a5e82();while(!![]){try{const _0x3b2c0f=parseInt(_0x1efcef(0x114))/0x1+parseInt(_0x1efcef(0x11c))/0x2*(-parseInt(_0x1efcef(0x116))/0x3)+-parseInt(_0x1efcef(0x11e))/0x4+parseInt(_0x1efcef(0x120))/0x5*(-parseInt(_0x1efcef(0x11a))/0x6)+-parseInt(_0x1efcef(0x122))/0x7*(parseInt(_0x1efcef(0x11d))/0x8)+parseInt(_0x1efcef(0x118))/0x9+parseInt(_0x1efcef(0x117))/0xa;if(_0x3b2c0f===_0x7300ba)break;else _0x1ad5cb['push'](_0x1ad5cb['shift']());}catch(_0x525596){_0x1ad5cb['push'](_0x1ad5cb['shift']());}}}(a24_0x292b,0xe37f2));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x115):a24_0x2bd64b(0x11f);export const getApiDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x121):a24_0x2bd64b(0x119);
@@ -1 +1 @@
1
- function a25_0x2acc(_0x1585ed,_0x32a72a){const _0x171735=a25_0x1717();return a25_0x2acc=function(_0x2accb4,_0x594843){_0x2accb4=_0x2accb4-0xbe;let _0x1ba8de=_0x171735[_0x2accb4];return _0x1ba8de;},a25_0x2acc(_0x1585ed,_0x32a72a);}const a25_0x4fde1b=a25_0x2acc;(function(_0x15e9e7,_0x176380){const _0x313758=a25_0x2acc,_0xc57e6c=_0x15e9e7();while(!![]){try{const _0x47f32c=parseInt(_0x313758(0xbe))/0x1*(-parseInt(_0x313758(0xc5))/0x2)+parseInt(_0x313758(0xc1))/0x3+parseInt(_0x313758(0xc9))/0x4*(parseInt(_0x313758(0xcc))/0x5)+parseInt(_0x313758(0xc0))/0x6*(-parseInt(_0x313758(0xc6))/0x7)+-parseInt(_0x313758(0xca))/0x8*(parseInt(_0x313758(0xc8))/0x9)+-parseInt(_0x313758(0xc2))/0xa*(-parseInt(_0x313758(0xbf))/0xb)+-parseInt(_0x313758(0xc3))/0xc*(-parseInt(_0x313758(0xc4))/0xd);if(_0x47f32c===_0x176380)break;else _0xc57e6c['push'](_0xc57e6c['shift']());}catch(_0x2da504){_0xc57e6c['push'](_0xc57e6c['shift']());}}}(a25_0x1717,0xe1117));let env=process['env'][a25_0x4fde1b(0xc7)]||a25_0x4fde1b(0xcb);function a25_0x1717(){const _0x23c5a9=['683170yjiHCT','1PZzqkb','278894yaobwo','8154VWBlAy','3213966QHSybZ','110zHLjsy','12Kfmzlt','30123899UHVebh','1186118YFNuRy','7588zSNpxW','LOVRABET_ENV','1413LNllhn','28JVpPpG','83352LWvlWB','online'];a25_0x1717=function(){return _0x23c5a9;};return a25_0x1717();}export function getEnv(){return env;}export function initEnv(_0x26ac36){env=_0x26ac36;}
1
+ const a25_0x3c2969=a25_0x1692;function a25_0x3d70(){const _0x2f2699=['10378720TpFIme','9561730JwxWIC','1854459spluvP','env','234iavNRb','18036IuaHgC','1535tAIKVd','LOVRABET_ENV','65834UeoDWN','123557GlQdhu','4247310tataBa','3eJFhrH','online'];a25_0x3d70=function(){return _0x2f2699;};return a25_0x3d70();}(function(_0x166ec2,_0x979157){const _0x10213e=a25_0x1692,_0x144e6d=_0x166ec2();while(!![]){try{const _0x39597d=-parseInt(_0x10213e(0x1d8))/0x1*(parseInt(_0x10213e(0x1d5))/0x2)+parseInt(_0x10213e(0x1d7))/0x3+parseInt(_0x10213e(0x1d2))/0x4*(parseInt(_0x10213e(0x1d3))/0x5)+-parseInt(_0x10213e(0x1d1))/0x6*(-parseInt(_0x10213e(0x1d6))/0x7)+-parseInt(_0x10213e(0x1cd))/0x8+-parseInt(_0x10213e(0x1cf))/0x9+-parseInt(_0x10213e(0x1ce))/0xa;if(_0x39597d===_0x979157)break;else _0x144e6d['push'](_0x144e6d['shift']());}catch(_0x2c9f29){_0x144e6d['push'](_0x144e6d['shift']());}}}(a25_0x3d70,0xe313b));let env=process[a25_0x3c2969(0x1d0)][a25_0x3c2969(0x1d4)]||a25_0x3c2969(0x1d9);function a25_0x1692(_0x55760d,_0xa3bf17){const _0x3d7023=a25_0x3d70();return a25_0x1692=function(_0x1692d1,_0x312882){_0x1692d1=_0x1692d1-0x1cd;let _0x758b98=_0x3d7023[_0x1692d1];return _0x758b98;},a25_0x1692(_0x55760d,_0xa3bf17);}export function getEnv(){return env;}export function initEnv(_0x153a9a){env=_0x153a9a;}
@@ -1 +1 @@
1
- (function(_0x1ee688,_0x28c4c7){const _0x354b66=a26_0x4856,_0x3a21f8=_0x1ee688();while(!![]){try{const _0x5c2e3a=parseInt(_0x354b66(0xfa))/0x1+parseInt(_0x354b66(0xe5))/0x2+-parseInt(_0x354b66(0x10d))/0x3*(-parseInt(_0x354b66(0xeb))/0x4)+-parseInt(_0x354b66(0xf8))/0x5*(-parseInt(_0x354b66(0x10c))/0x6)+parseInt(_0x354b66(0x116))/0x7*(-parseInt(_0x354b66(0xf7))/0x8)+parseInt(_0x354b66(0xec))/0x9*(-parseInt(_0x354b66(0xe0))/0xa)+parseInt(_0x354b66(0xfc))/0xb*(-parseInt(_0x354b66(0xfe))/0xc);if(_0x5c2e3a===_0x28c4c7)break;else _0x3a21f8['push'](_0x3a21f8['shift']());}catch(_0x27316e){_0x3a21f8['push'](_0x3a21f8['shift']());}}}(a26_0x112d,0xad167));function a26_0x112d(){const _0x42c932=['2810024WuVwkk','6699345mLEyaz','my-app','912209DqdqDu','\x20←\x20','132AJNjWG','length','1122780gcUSwn','yellow','项目名长度不能超过\x2050\x20个字符','\x20检查中...','*\x20应用AppCode\x20','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20是否要先登录以便拉取\x20API\x20配置?','login','confirm-api-pull','未设置','*\x20正在登录,请前往浏览器完成登录...','Yes','项目名不合法','login-process','6mpHKzz','2200449IXVUMw','[可选]:\x20','已登录','api-pull','拉取API配置','gray','login-check','red','\x20直接回车确认,或输入自定义名称','14vblleo','\x20\x20使用\x20←→\x20选择,回车确认','应用AppCode长度不能超过\x20100\x20个字符','creating','rightArrow','login-prompt','*\x20创建新项目','*\x20项目名:\x20','!\x20未检测到有效登录','10uGFSKP','跳过登录','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','column','green','1815346RAXQgv','test','leftArrow','登录状态','app-code','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','4mQnfvY','12230829JxtopS','backspace','*\x20正在检查登录状态...','应用AppCode','project-name','cyan','return','slice','√\x20检测到有效登录状态','trim','登录失败'];a26_0x112d=function(){return _0x42c932;};return a26_0x112d();}import{jsx as a26_0x50378d,jsxs as a26_0x4ea38b,Fragment as a26_0xc98a7c}from'react/jsx-runtime';function a26_0x4856(_0x31e452,_0x42097c){const _0x112d53=a26_0x112d();return a26_0x4856=function(_0x4856d5,_0x53dbf0){_0x4856d5=_0x4856d5-0xdd;let _0x3bf5b6=_0x112d53[_0x4856d5];return _0x3bf5b6;},a26_0x4856(_0x31e452,_0x42097c);}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';export function EnhancedGuidedCreate(_0x213fff){const _0x176c9f=a26_0x4856,{onCreate:_0x549e99}=_0x213fff,[_0x5aae43,_0x239372]=useState('project-name'),[_0x2dbabb,_0x4f2896]=useState(''),[_0x4dadb5,_0x37af26]=useState(''),[_0x1fc084,_0x3f026c]=useState(''),[_0x47c6ff,_0x16741b]=useState(''),[_0x2e623c,_0x3f1d9e]=useState([]),[_0x59e959,_0x534855]=useState(null),[_0x1513d8,_0x59405b]=useState(![]),[_0x4f83dc,_0x59f64f]=useState(![]),[_0x54d697,_0x581a1b]=useState(![]),[_0x7d7f1,_0x34b6dd]=useState(0x0),[_0x50d0f0,_0x4dbe61]=useState(0x0),_0x256f8b=_0x176c9f(0xf9);function _0x346ca4(_0xb5fed6){const _0x38dd87=_0x176c9f;if(_0xb5fed6[_0x38dd87(0xfd)]>0x32)return{'valid':![],'message':_0x38dd87(0x100)};const _0x155c17=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xb5fed6?.[_0x38dd87(0xf5)]()&&!_0x155c17[_0x38dd87(0xe6)](_0xb5fed6))return{'valid':![],'message':_0x38dd87(0xea)};return{'valid':!![]};}function _0x3561ea(_0x12fe84){const _0x4a9efc=_0x176c9f;if(!_0x12fe84[_0x4a9efc(0xf5)]())return{'valid':!![]};if(_0x12fe84[_0x4a9efc(0xfd)]>0x64)return{'valid':![],'message':_0x4a9efc(0x118)};const _0x1357cd=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1357cd[_0x4a9efc(0xe6)](_0x12fe84))return{'valid':![],'message':_0x4a9efc(0x103)};return{'valid':!![]};}async function _0x1e875a(){_0x59405b(!![]);try{const _0x20863d=await getIsSessionValid();return _0x534855(_0x20863d),_0x20863d;}catch(_0x300a57){return _0x534855(![]),![];}finally{_0x59405b(![]);}}async function _0x434e97(){_0x59f64f(!![]);try{const _0x19a2c7=await authServer({'silent':!![]});return _0x534855(_0x19a2c7),_0x19a2c7;}catch(_0x11a1db){return _0x534855(![]),![];}finally{_0x59f64f(![]);}}return useInput(async(_0x1de13a,_0x98a91e)=>{const _0x7faf2=_0x176c9f;if(_0x98a91e[_0x7faf2(0xe7)]||_0x98a91e[_0x7faf2(0x11a)]){if(_0x5aae43==='confirm-api-pull'){_0x34b6dd(_0x1d2837=>_0x1d2837===0x0?0x1:0x0);return;}if(_0x5aae43===_0x7faf2(0x11b)){_0x4dbe61(_0x5dd1a3=>_0x5dd1a3===0x0?0x1:0x0);return;}}if(_0x98a91e[_0x7faf2(0xf2)]){if(_0x5aae43===_0x7faf2(0xf0)){const _0x5f22ee=_0x1fc084['trim']()||_0x256f8b;if(_0x47c6ff)return;_0x4f2896(_0x5f22ee),_0x3f1d9e([{'step':_0x7faf2(0xf0),'label':'项目名','value':_0x5f22ee}]),_0x3f026c(''),_0x16741b(''),_0x239372(_0x7faf2(0xe9));return;}if(_0x5aae43==='app-code'){if(_0x47c6ff)return;const _0x403a74=_0x1fc084['trim']();_0x37af26(_0x403a74),_0x3f1d9e(_0x2dc010=>[..._0x2dc010,{'step':_0x7faf2(0xe9),'label':_0x7faf2(0xef),'value':_0x403a74||_0x7faf2(0x107)}]),_0x3f026c(''),_0x16741b('');if(_0x403a74){_0x239372(_0x7faf2(0x113));const _0x46434d=await _0x1e875a();_0x46434d?_0x239372(_0x7faf2(0x106)):_0x239372(_0x7faf2(0x11b));}else _0x549e99({'projectName':_0x2dbabb,'appCode':undefined,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x106)){const _0x3d2772=_0x7d7f1===0x0;_0x581a1b(_0x3d2772),_0x3f1d9e(_0x52157f=>[..._0x52157f,{'step':_0x7faf2(0x110),'label':_0x7faf2(0x111),'value':_0x3d2772?'是':'否'}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':_0x3d2772}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x11b)){const _0x57d85b=_0x50d0f0===0x0;if(_0x57d85b){_0x239372(_0x7faf2(0x10b));const _0x2c764d=await _0x434e97();_0x2c764d?(_0x3f1d9e(_0x16c221=>[..._0x16c221,{'step':'login','label':'登录状态','value':_0x7faf2(0x10f)}]),_0x239372(_0x7faf2(0x106))):(_0x3f1d9e(_0x39863f=>[..._0x39863f,{'step':_0x7faf2(0x105),'label':_0x7faf2(0xe8),'value':_0x7faf2(0xf6)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119)));}else _0x3f1d9e(_0x6c6264=>[..._0x6c6264,{'step':_0x7faf2(0x105),'label':'登录状态','value':_0x7faf2(0xe1)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}}if(_0x98a91e[_0x7faf2(0xed)]||_0x98a91e['delete']){_0x3f026c(_0x54e749=>{const _0x5d43f7=_0x7faf2,_0x4c3506=_0x54e749[_0x5d43f7(0xf3)](0x0,-0x1);if(_0x5aae43===_0x5d43f7(0xf0)){const {valid:_0x34d403,message:_0x71cdbb}=_0x346ca4(_0x4c3506);_0x16741b(_0x34d403?'':_0x71cdbb||_0x5d43f7(0x10a));}else{if(_0x5aae43===_0x5d43f7(0xe9)){const {valid:_0x4e27d1,message:_0x3dffcf}=_0x3561ea(_0x4c3506);_0x16741b(_0x4e27d1?'':_0x3dffcf||'应用AppCode不合法');}}return _0x4c3506;});return;}if(['creating','login-check',_0x7faf2(0x10b)]['includes'](_0x5aae43))return;if(_0x5aae43===_0x7faf2(0x106)||_0x5aae43===_0x7faf2(0x11b))return;_0x3f026c(_0x2c0630=>{const _0x30a894=_0x7faf2,_0x5c1b4a=_0x2c0630+_0x1de13a;if(_0x5aae43==='project-name'){const {valid:_0x5e9b13,message:_0x3978bb}=_0x346ca4(_0x5c1b4a);_0x16741b(_0x5e9b13?'':_0x3978bb||_0x30a894(0x10a));}else{if(_0x5aae43===_0x30a894(0xe9)){const {valid:_0x5e34db,message:_0x2322f2}=_0x3561ea(_0x5c1b4a);_0x16741b(_0x5e34db?'':_0x2322f2||'应用AppCode不合法');}}return _0x5c1b4a;});}),a26_0x4ea38b(Box,{'flexDirection':_0x176c9f(0xe3),'marginTop':0x1,'children':[_0x2e623c[_0x176c9f(0xfd)]===0x0&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x176c9f(0xdd)})}),_0x2e623c['map'](_0x478940=>a26_0x4ea38b(Box,{'children':[a26_0x4ea38b(Text,{'color':_0x176c9f(0xe4),'children':['√\x20',_0x478940['label'],':\x20']}),a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x478940['value']})]},_0x478940['step'])),_0x5aae43==='project-name'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xde)}),_0x1fc084?a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}):a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x256f8b}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&!_0x1fc084&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x115)})})]}),_0x5aae43==='app-code'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x102)}),a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x10e)}),a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&a26_0x50378d(Box,{'children':a26_0x4ea38b(Text,{'color':_0x176c9f(0x112),'children':['\x20',_0x176c9f(0xe2)]})})]}),_0x5aae43===_0x176c9f(0x113)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xee)}),_0x1513d8&&a26_0x50378d(Text,{'color':'gray','children':_0x176c9f(0x101)})]}),_0x5aae43==='confirm-api-pull'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x176c9f(0xf4)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x7d7f1===0x0?_0x176c9f(0xe4):'gray','children':[_0x7d7f1===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x7d7f1===0x1?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x7d7f1===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x11b)&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':'yellow','children':_0x176c9f(0xdf)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':_0x176c9f(0x104)})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x50d0f0===0x0?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x50d0f0===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x50d0f0===0x1?'green':_0x176c9f(0x112),'children':[_0x50d0f0===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x10b)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x108)}),_0x4f83dc&&a26_0x50378d(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
1
+ (function(_0x1ffb5c,_0xc6df0b){const _0x2b335b=a26_0x25a8,_0x28f22d=_0x1ffb5c();while(!![]){try{const _0x5dd65c=-parseInt(_0x2b335b(0x1a5))/0x1+-parseInt(_0x2b335b(0x1ac))/0x2*(-parseInt(_0x2b335b(0x19e))/0x3)+parseInt(_0x2b335b(0x1c8))/0x4+-parseInt(_0x2b335b(0x1af))/0x5*(parseInt(_0x2b335b(0x1bf))/0x6)+-parseInt(_0x2b335b(0x19d))/0x7+-parseInt(_0x2b335b(0x1a4))/0x8*(-parseInt(_0x2b335b(0x194))/0x9)+parseInt(_0x2b335b(0x19c))/0xa;if(_0x5dd65c===_0xc6df0b)break;else _0x28f22d['push'](_0x28f22d['shift']());}catch(_0x38825b){_0x28f22d['push'](_0x28f22d['shift']());}}}(a26_0x5662,0x3c3f5));import{jsx as a26_0x565250,jsxs as a26_0x54147c,Fragment as a26_0x3d557c}from'react/jsx-runtime';function a26_0x5662(){const _0x5e9985=['跳过登录','gray','*\x20项目名:\x20','yellow','*\x20正在检查登录状态...','268586kICJVj','!\x20未检测到有效登录','column','5ZqMexo','red','login','app-code','Yes','登录状态','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','登录失败','green','delete','项目名长度不能超过\x2050\x20个字符','cyan','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20\x20使用\x20←→\x20选择,回车确认','leftArrow','应用AppCode不合法','1165578KfkphY','*\x20是否要自动拉取\x20API\x20配置?','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','creating','api-pull','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','slice','应用AppCode','已登录','511212NlXUua','未设置','test','拉取API配置','label','405wkxfIm','rightArrow','√\x20检测到有效登录状态','includes','*\x20创建新项目','trim','confirm-api-pull','项目名','5216210HhJEez','3092474qAvZxY','3atiEWz','backspace','login-check','length','project-name','login-prompt','67960DBoIGH','283174kQkaPy','my-app'];a26_0x5662=function(){return _0x5e9985;};return a26_0x5662();}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 a26_0x25a8(_0xb26e23,_0x1268ce){const _0x56627d=a26_0x5662();return a26_0x25a8=function(_0x25a8c4,_0x21dfd5){_0x25a8c4=_0x25a8c4-0x194;let _0x3d37b9=_0x56627d[_0x25a8c4];return _0x3d37b9;},a26_0x25a8(_0xb26e23,_0x1268ce);}export function EnhancedGuidedCreate(_0x2ab0bc){const _0x2a9ccb=a26_0x25a8,{onCreate:_0x215690}=_0x2ab0bc,[_0x118380,_0x2ef382]=useState(_0x2a9ccb(0x1a2)),[_0x5897ed,_0x23033d]=useState(''),[_0x51d5f4,_0xe7aee2]=useState(''),[_0x2550e7,_0x2c89de]=useState(''),[_0x191c6e,_0x20d162]=useState(''),[_0x233fd7,_0x1aec9b]=useState([]),[_0x52f3a8,_0x37186d]=useState(null),[_0xcc9bff,_0x4e0dfe]=useState(![]),[_0x116149,_0x4b82d2]=useState(![]),[_0x119f99,_0x4f81bb]=useState(![]),[_0x2f0762,_0x43d793]=useState(0x0),[_0x249740,_0x5f5867]=useState(0x0),_0x18a7f4=_0x2a9ccb(0x1a6);function _0x44579d(_0x213e41){const _0x2d82db=_0x2a9ccb;if(_0x213e41[_0x2d82db(0x1a1)]>0x32)return{'valid':![],'message':_0x2d82db(0x1b9)};const _0x234dae=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x213e41?.[_0x2d82db(0x199)]()&&!_0x234dae[_0x2d82db(0x1ca)](_0x213e41))return{'valid':![],'message':_0x2d82db(0x1c1)};return{'valid':!![]};}function _0x4444b3(_0x4a03ae){const _0x1b830e=_0x2a9ccb;if(!_0x4a03ae['trim']())return{'valid':!![]};if(_0x4a03ae[_0x1b830e(0x1a1)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x59c2db=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x59c2db[_0x1b830e(0x1ca)](_0x4a03ae))return{'valid':![],'message':_0x1b830e(0x1b5)};return{'valid':!![]};}async function _0x5faf4a(){_0x4e0dfe(!![]);try{const _0x5de3d6=await getIsSessionValid();return _0x37186d(_0x5de3d6),_0x5de3d6;}catch(_0x16e762){return _0x37186d(![]),![];}finally{_0x4e0dfe(![]);}}async function _0x4f9f4d(){_0x4b82d2(!![]);try{const _0x139659=await authServer({'silent':!![]});return _0x37186d(_0x139659),_0x139659;}catch(_0x48d876){return _0x37186d(![]),![];}finally{_0x4b82d2(![]);}}return useInput(async(_0x1d2460,_0x25df23)=>{const _0x78a3af=_0x2a9ccb;if(_0x25df23[_0x78a3af(0x1bd)]||_0x25df23[_0x78a3af(0x195)]){if(_0x118380===_0x78a3af(0x19a)){_0x43d793(_0x12934f=>_0x12934f===0x0?0x1:0x0);return;}if(_0x118380===_0x78a3af(0x1a3)){_0x5f5867(_0x287c89=>_0x287c89===0x0?0x1:0x0);return;}}if(_0x25df23['return']){if(_0x118380===_0x78a3af(0x1a2)){const _0x45d065=_0x2550e7[_0x78a3af(0x199)]()||_0x18a7f4;if(_0x191c6e)return;_0x23033d(_0x45d065),_0x1aec9b([{'step':_0x78a3af(0x1a2),'label':_0x78a3af(0x19b),'value':_0x45d065}]),_0x2c89de(''),_0x20d162(''),_0x2ef382(_0x78a3af(0x1b2));return;}if(_0x118380===_0x78a3af(0x1b2)){if(_0x191c6e)return;const _0x484cd9=_0x2550e7[_0x78a3af(0x199)]();_0xe7aee2(_0x484cd9),_0x1aec9b(_0xa5a7e4=>[..._0xa5a7e4,{'step':_0x78a3af(0x1b2),'label':_0x78a3af(0x1c6),'value':_0x484cd9||_0x78a3af(0x1c9)}]),_0x2c89de(''),_0x20d162('');if(_0x484cd9){_0x2ef382(_0x78a3af(0x1a0));const _0x4a93bf=await _0x5faf4a();_0x4a93bf?_0x2ef382(_0x78a3af(0x19a)):_0x2ef382(_0x78a3af(0x1a3));}else _0x215690({'projectName':_0x5897ed,'appCode':undefined,'pullApi':![]}),_0x2ef382('creating');return;}if(_0x118380===_0x78a3af(0x19a)){const _0x50cc69=_0x2f0762===0x0;_0x4f81bb(_0x50cc69),_0x1aec9b(_0x2f63f9=>[..._0x2f63f9,{'step':_0x78a3af(0x1c3),'label':_0x78a3af(0x1cb),'value':_0x50cc69?'是':'否'}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':_0x50cc69}),_0x2ef382(_0x78a3af(0x1c2));return;}if(_0x118380===_0x78a3af(0x1a3)){const _0x2bff41=_0x249740===0x0;if(_0x2bff41){_0x2ef382('login-process');const _0x99ceaa=await _0x4f9f4d();_0x99ceaa?(_0x1aec9b(_0x537d92=>[..._0x537d92,{'step':_0x78a3af(0x1b1),'label':_0x78a3af(0x1b4),'value':_0x78a3af(0x1c7)}]),_0x2ef382(_0x78a3af(0x19a))):(_0x1aec9b(_0xea2963=>[..._0xea2963,{'step':_0x78a3af(0x1b1),'label':'登录状态','value':_0x78a3af(0x1b6)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382(_0x78a3af(0x1c2)));}else _0x1aec9b(_0x58e9be=>[..._0x58e9be,{'step':'login','label':'登录状态','value':_0x78a3af(0x1a7)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382('creating');return;}}if(_0x25df23[_0x78a3af(0x19f)]||_0x25df23[_0x78a3af(0x1b8)]){_0x2c89de(_0x28b1bd=>{const _0x32da4b=_0x78a3af,_0x35b94c=_0x28b1bd[_0x32da4b(0x1c5)](0x0,-0x1);if(_0x118380===_0x32da4b(0x1a2)){const {valid:_0x2b2577,message:_0x462c76}=_0x44579d(_0x35b94c);_0x20d162(_0x2b2577?'':_0x462c76||'项目名不合法');}else{if(_0x118380===_0x32da4b(0x1b2)){const {valid:_0x5507f4,message:_0x244300}=_0x4444b3(_0x35b94c);_0x20d162(_0x5507f4?'':_0x244300||'应用AppCode不合法');}}return _0x35b94c;});return;}if([_0x78a3af(0x1c2),_0x78a3af(0x1a0),'login-process'][_0x78a3af(0x197)](_0x118380))return;if(_0x118380===_0x78a3af(0x19a)||_0x118380===_0x78a3af(0x1a3))return;_0x2c89de(_0x584b7e=>{const _0x5ae9df=_0x78a3af,_0x266a5b=_0x584b7e+_0x1d2460;if(_0x118380===_0x5ae9df(0x1a2)){const {valid:_0x136a6a,message:_0x583743}=_0x44579d(_0x266a5b);_0x20d162(_0x136a6a?'':_0x583743||'项目名不合法');}else{if(_0x118380==='app-code'){const {valid:_0x3860af,message:_0x48e651}=_0x4444b3(_0x266a5b);_0x20d162(_0x3860af?'':_0x48e651||_0x5ae9df(0x1be));}}return _0x266a5b;});}),a26_0x54147c(Box,{'flexDirection':_0x2a9ccb(0x1ae),'marginTop':0x1,'children':[_0x233fd7[_0x2a9ccb(0x1a1)]===0x0&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1ba),'children':_0x2a9ccb(0x198)})}),_0x233fd7['map'](_0x5890cf=>a26_0x54147c(Box,{'children':[a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b7),'children':['√\x20',_0x5890cf[_0x2a9ccb(0x1cc)],':\x20']}),a26_0x565250(Text,{'color':'cyan','children':_0x5890cf['value']})]},_0x5890cf['step'])),_0x118380==='project-name'&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1a9)}),_0x2550e7?a26_0x565250(Text,{'color':'green','children':_0x2550e7}):a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x18a7f4}),_0x191c6e&&a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b0),'children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&!_0x2550e7&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x118380===_0x2a9ccb(0x1b2)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20应用AppCode\x20'}),a26_0x565250(Text,{'color':'gray','children':'[可选]:\x20'}),a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2550e7}),_0x191c6e&&a26_0x54147c(Text,{'color':'red','children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&a26_0x565250(Box,{'children':a26_0x54147c(Text,{'color':_0x2a9ccb(0x1a8),'children':['\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)']})})]}),_0x118380==='login-check'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1ab)}),_0xcc9bff&&a26_0x565250(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x118380===_0x2a9ccb(0x19a)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2a9ccb(0x196)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1c0)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x2f0762===0x0?'green':'gray','children':[_0x2f0762===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x2f0762===0x1?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x2f0762===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x118380===_0x2a9ccb(0x1a3)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':'yellow','children':_0x2a9ccb(0x1ad)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1bb)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x249740===0x0?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x249740===0x0?'▶\x20':'\x20\x20',_0x2a9ccb(0x1b3)]}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x249740===0x1?'green':_0x2a9ccb(0x1a8),'children':[_0x249740===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':_0x2a9ccb(0x1c4)})})]}),_0x118380==='login-process'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x116149&&a26_0x565250(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
@@ -1 +1 @@
1
- (function(_0x300adf,_0x52c82d){const _0x5e1849=a27_0xcaf3,_0x4e2cd6=_0x300adf();while(!![]){try{const _0x44bf51=parseInt(_0x5e1849(0xe1))/0x1+parseInt(_0x5e1849(0xde))/0x2*(-parseInt(_0x5e1849(0xdf))/0x3)+-parseInt(_0x5e1849(0xe3))/0x4*(-parseInt(_0x5e1849(0xdc))/0x5)+-parseInt(_0x5e1849(0xdd))/0x6*(-parseInt(_0x5e1849(0xda))/0x7)+-parseInt(_0x5e1849(0xdb))/0x8*(parseInt(_0x5e1849(0xe6))/0x9)+parseInt(_0x5e1849(0xe5))/0xa*(-parseInt(_0x5e1849(0xe2))/0xb)+-parseInt(_0x5e1849(0xd8))/0xc*(-parseInt(_0x5e1849(0xe4))/0xd);if(_0x44bf51===_0x52c82d)break;else _0x4e2cd6['push'](_0x4e2cd6['shift']());}catch(_0x1dc6c6){_0x4e2cd6['push'](_0x4e2cd6['shift']());}}}(a27_0x2ca4,0x1909d));function a27_0xcaf3(_0x9bbd27,_0x4f1e00){const _0x2ca4b4=a27_0x2ca4();return a27_0xcaf3=function(_0xcaf36d,_0x59832c){_0xcaf36d=_0xcaf36d-0xd8;let _0x8cc967=_0x2ca4b4[_0xcaf36d];return _0x8cc967;},a27_0xcaf3(_0x9bbd27,_0x4f1e00);}function a27_0x2ca4(){const _0x38048c=['220488QFvusO','158nWxnIa','45XONeBh','now','116471gfPmsI','1119503BLgiPo','5372Mmoela','26ssDPfR','10uUmsUf','205101UoxGDY','364992FHSOcY','replace','14VeeRuk','72SzTflG','595AdzShV'];a27_0x2ca4=function(){return _0x38048c;};return a27_0x2ca4();}export function formatElapsed(_0x3a5572){const _0x2affee=a27_0xcaf3,_0x2a0ba5=Date[_0x2affee(0xe0)]()-_0x3a5572;if(_0x2a0ba5<0x3e8)return _0x2a0ba5+'ms';const _0x48293f=(_0x2a0ba5/0x3e8)['toFixed'](0x2),_0x264bb4=_0x48293f[_0x2affee(0xd9)](/\.?0+$/u,'');return _0x264bb4+'s';}
1
+ (function(_0x580b23,_0x496446){const _0x2bd31e=a27_0xcd40,_0x52c0f7=_0x580b23();while(!![]){try{const _0x11a390=-parseInt(_0x2bd31e(0x8b))/0x1+parseInt(_0x2bd31e(0x89))/0x2*(-parseInt(_0x2bd31e(0x91))/0x3)+-parseInt(_0x2bd31e(0x90))/0x4+-parseInt(_0x2bd31e(0x8a))/0x5*(-parseInt(_0x2bd31e(0x8c))/0x6)+-parseInt(_0x2bd31e(0x88))/0x7+parseInt(_0x2bd31e(0x86))/0x8+-parseInt(_0x2bd31e(0x87))/0x9*(-parseInt(_0x2bd31e(0x8d))/0xa);if(_0x11a390===_0x496446)break;else _0x52c0f7['push'](_0x52c0f7['shift']());}catch(_0x4c1d39){_0x52c0f7['push'](_0x52c0f7['shift']());}}}(a27_0x51a1,0x823ba));export function formatElapsed(_0x393e23){const _0x54e0c2=a27_0xcd40,_0xa0c9e6=Date['now']()-_0x393e23;if(_0xa0c9e6<0x3e8)return _0xa0c9e6+'ms';const _0x5167e7=(_0xa0c9e6/0x3e8)[_0x54e0c2(0x8e)](0x2),_0x1f433=_0x5167e7[_0x54e0c2(0x8f)](/\.?0+$/u,'');return _0x1f433+'s';}function a27_0xcd40(_0x48a574,_0xb555e7){const _0x51a1f2=a27_0x51a1();return a27_0xcd40=function(_0xcd40ab,_0x23481c){_0xcd40ab=_0xcd40ab-0x86;let _0x5a64ef=_0x51a1f2[_0xcd40ab];return _0x5a64ef;},a27_0xcd40(_0x48a574,_0xb555e7);}function a27_0x51a1(){const _0x252738=['325275RzTELV','4269640QfbdHN','367317ovGrRo','5611193wNyZIY','18wsXiAV','25kmRbOy','534530pUXVtR','494580wxZepU','650nnJUBb','toFixed','replace','3013248brXQCX'];a27_0x51a1=function(){return _0x252738;};return a27_0x51a1();}