@lovrabet/cli 1.1.20 → 1.1.22

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 (69) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/valid-url.js +1 -1
  16. package/lib/auth/auth-server-ui.js +1 -1
  17. package/lib/auth/auth-server.js +1 -1
  18. package/lib/auth/constant.js +1 -1
  19. package/lib/auth/get-cookie.js +1 -1
  20. package/lib/auth/is-session-valid.js +1 -1
  21. package/lib/auth/logout.js +1 -1
  22. package/lib/cli.js +1 -1
  23. package/lib/cmd/build-watch.js +1 -1
  24. package/lib/cmd/build.js +1 -1
  25. package/lib/cmd/logs.js +1 -1
  26. package/lib/cmd/preview.js +1 -1
  27. package/lib/cmd/start.js +1 -1
  28. package/lib/config/config-help.js +1 -1
  29. package/lib/config/main.js +1 -1
  30. package/lib/constant/domain.js +1 -1
  31. package/lib/constant/env.js +1 -1
  32. package/lib/create-app/enhanced-guided-create.js +1 -1
  33. package/lib/create-app/format-elapsed.js +1 -1
  34. package/lib/create-app/main.js +1 -1
  35. package/lib/create-app/task-finished.js +1 -1
  36. package/lib/create-app/task-loading.js +1 -1
  37. package/lib/create-app/task-running.js +1 -1
  38. package/lib/create-app/task-time.js +1 -1
  39. package/lib/create-app/use-copy-project-template.js +1 -1
  40. package/lib/create-app/use-format-code.js +1 -1
  41. package/lib/create-app/use-install-dependencies.js +1 -1
  42. package/lib/help.js +1 -1
  43. package/lib/init/main.js +1 -1
  44. package/lib/mcp/cursor.js +1 -1
  45. package/lib/mcp/main.js +1 -1
  46. package/lib/utils/config.js +1 -1
  47. package/lib/utils/copy-directory.js +1 -1
  48. package/lib/utils/http-client.js +1 -1
  49. package/lib/utils/logger.js +1 -1
  50. package/lib/utils/router-updater.js +1 -1
  51. package/lib/utils/sleep.js +1 -1
  52. package/lib/utils/template-replacer.js +1 -1
  53. package/package.json +2 -2
  54. package/templates/README.md +28 -1
  55. package/templates/projects/sub-app-react-demo/CHANGELOG.md +16 -0
  56. package/templates/projects/sub-app-react-demo/README.md +163 -54
  57. package/templates/projects/sub-app-react-demo/package-lock.json +1347 -149
  58. package/templates/projects/sub-app-react-demo/package.json +2 -2
  59. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +286 -55
  60. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +526 -0
  61. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +942 -87
  62. package/templates/projects/sub-app-react-demo/src/pages/intro/index.tsx +560 -0
  63. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +113 -118
  64. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +469 -0
  65. package/templates/projects/sub-app-react-demo/src/style.css +39 -0
  66. package/templates/rules/README.md +178 -0
  67. package/templates/rules/example-project-setup.md +276 -0
  68. package/templates/rules/lovrabet_rules.mdc.tpl +425 -0
  69. package/templates/projects/sub-app-react-demo/bun.lock +0 -600
@@ -1 +1 @@
1
- (function(_0x2118d2,_0x32af37){const _0x433f46=a11_0x5215,_0x5a95ae=_0x2118d2();while(!![]){try{const _0x271a3f=-parseInt(_0x433f46(0xc6))/0x1*(-parseInt(_0x433f46(0xe2))/0x2)+-parseInt(_0x433f46(0xc4))/0x3*(-parseInt(_0x433f46(0xdc))/0x4)+parseInt(_0x433f46(0xe6))/0x5*(parseInt(_0x433f46(0xec))/0x6)+parseInt(_0x433f46(0xd4))/0x7*(-parseInt(_0x433f46(0xd3))/0x8)+parseInt(_0x433f46(0xe7))/0x9*(-parseInt(_0x433f46(0xc8))/0xa)+-parseInt(_0x433f46(0xef))/0xb+-parseInt(_0x433f46(0xdf))/0xc*(-parseInt(_0x433f46(0xde))/0xd);if(_0x271a3f===_0x32af37)break;else _0x5a95ae['push'](_0x5a95ae['shift']());}catch(_0x59bf4c){_0x5a95ae['push'](_0x5a95ae['shift']());}}}(a11_0x3bf0,0xd43e8));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();function a11_0x5215(_0x44865e,_0x5386f0){const _0x3bf0a3=a11_0x3bf0();return a11_0x5215=function(_0x52154a,_0xfca501){_0x52154a=_0x52154a-0xc3;let _0x36607a=_0x3bf0a3[_0x52154a];return _0x36607a;},a11_0x5215(_0x44865e,_0x5386f0);}export async function createMenu(_0x471910){const _0x92278=a11_0x5215,_0x278c8=config?.['appcode'];if(!_0x278c8){const _0x37268c=_0x92278(0xd9);logger[_0x92278(0xd8)](_0x92278(0xf3),_0x37268c),console[_0x92278(0xd8)]('×\x20'+_0x37268c),console['log'](_0x92278(0xd7)),console[_0x92278(0xdd)](_0x92278(0xd5)),console[_0x92278(0xdd)](_0x92278(0xcc));return;}logger[_0x92278(0xc3)](_0x92278(0xf3),_0x92278(0xe9)+_0x471910[_0x92278(0xd2)]+'\x20('+_0x471910[_0x92278(0xe5)]+')');const _0x1c45f2={'appCode':_0x278c8,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x471910['resources']?JSON[_0x92278(0xcb)](_0x471910[_0x92278(0xce)]):undefined},..._0x471910},_0x270530=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':'POST','body':JSON[_0x92278(0xcb)](_0x1c45f2),'headers':{'Content-Type':_0x92278(0xda),'Cookie':getCookie()}});if(!_0x270530['ok']){if(_0x270530[_0x92278(0xd0)]===0x191){const _0x4a5861=_0x92278(0xeb);logger[_0x92278(0xd8)](_0x92278(0xf3),_0x4a5861,{'status':_0x270530[_0x92278(0xd0)],'menu':_0x471910[_0x92278(0xd2)]});throw new Error(_0x4a5861);}const _0x524167='创建菜单失败,HTTP状态码:\x20'+_0x270530[_0x92278(0xd0)];logger[_0x92278(0xd8)](_0x92278(0xf3),_0x524167,{'menu':_0x471910[_0x92278(0xd2)]});throw new Error(_0x524167);}const _0x161753=await _0x270530[_0x92278(0xd1)]();if(!_0x161753['success']){const _0x532ab1=_0x92278(0xf1)+(_0x161753[_0x92278(0xe4)]||_0x92278(0xca));logger['error'](_0x92278(0xf3),_0x532ab1,{'errorCode':_0x161753['errorCode'],'errorMsg':_0x161753[_0x92278(0xe4)],'menu':_0x471910[_0x92278(0xd2)]});throw new Error(_0x532ab1);}logger[_0x92278(0xc3)]('create-menu',_0x92278(0xc5)+_0x471910[_0x92278(0xd2)],_0x161753[_0x92278(0xe3)]),console[_0x92278(0xdd)](_0x92278(0xea),_0x161753[_0x92278(0xe3)]);}async function _createMenu(_0x1ab825,_0x463128){const _0x190d77=a11_0x5215,_0x5428ff=config?.[_0x190d77(0xd6)];if(!_0x5428ff){const _0xe85db1=_0x190d77(0xd9);logger['error'](_0x190d77(0xf3),_0xe85db1),console[_0x190d77(0xd8)]('×\x20'+_0xe85db1),console[_0x190d77(0xdd)]('!\x20请使用以下方式之一:'),console['log'](_0x190d77(0xd5)),console['log'](_0x190d77(0xcc));return;}const _0xf434fe={'appCode':_0x5428ff,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x190d77(0xf2),'resources':_0x463128?JSON[_0x190d77(0xcb)](_0x463128):undefined},'label':_0x1ab825['label'],'path':_0x1ab825[_0x190d77(0xe5)]},_0x1a8e24=await fetch(getApiDomain()+_0x190d77(0xe8),{'method':_0x190d77(0xdb),'body':JSON[_0x190d77(0xcb)](_0xf434fe),'headers':{'Content-Type':_0x190d77(0xda),'Cookie':getCookie()}});if(!_0x1a8e24['ok']){if(_0x1a8e24['status']===0x191){const _0x175d2d=_0x190d77(0xeb);logger['error']('create-menu',_0x175d2d,{'status':_0x1a8e24[_0x190d77(0xd0)],'menu':_0x1ab825[_0x190d77(0xd2)]});throw new Error(_0x175d2d);}const _0x5c32e6='创建菜单失败,HTTP状态码:\x20'+_0x1a8e24['status'];logger[_0x190d77(0xd8)](_0x190d77(0xf3),_0x5c32e6,{'menu':_0x1ab825[_0x190d77(0xd2)]});throw new Error(_0x5c32e6);}const _0x28b20f=await _0x1a8e24['json']();if(!_0x28b20f[_0x190d77(0xed)]){if(_0x28b20f[_0x190d77(0xcd)]===_0x190d77(0xe0)||_0x28b20f[_0x190d77(0xe4)]?.[_0x190d77(0xc9)]('登录')){const _0xe7ef8d=_0x190d77(0xe1);logger['error']('create-menu',_0xe7ef8d,{'errorCode':_0x28b20f[_0x190d77(0xcd)],'errorMsg':_0x28b20f[_0x190d77(0xe4)],'menu':_0x1ab825[_0x190d77(0xd2)]});throw new Error(_0xe7ef8d);}const _0x336b97=_0x190d77(0xf1)+(_0x28b20f['errorMsg']||_0x190d77(0xca));logger[_0x190d77(0xd8)](_0x190d77(0xf3),_0x336b97,{'errorCode':_0x28b20f[_0x190d77(0xcd)],'errorMsg':_0x28b20f[_0x190d77(0xe4)],'menu':_0x1ab825[_0x190d77(0xd2)]});throw new Error(_0x336b97);}logger[_0x190d77(0xc3)](_0x190d77(0xf3),_0x190d77(0xc5)+_0x1ab825[_0x190d77(0xd2)]);}function a11_0x3bf0(){const _0x4c656a=['json','label','22024JuKmRA','182kkEvFC','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','appcode','!\x20请使用以下方式之一:','error','未提供应用AppCode,且配置中也没有默认值','application/json','POST','219284raFmDE','log','22488401tsWADO','12zRNwNh','0011','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','206jRXoET','data','errorMsg','path','3270035NFPRiR','144xXdmFZ','/smartapi/menu/create','正在创建菜单:\x20','创建菜单成功:','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','6VYRHAK','success','length','6755958VdjfMB','all','创建菜单失败:\x20','import','create-menu','info','15VXfDJf','菜单创建成功:\x20','41daFKEA','开始批量创建菜单,共\x20','691940QjZPTW','includes','未知错误','stringify','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','errorCode','resources','create-menus','status'];a11_0x3bf0=function(){return _0x4c656a;};return a11_0x3bf0();}export async function createMenus(_0x276e1b,_0x6276ae){const _0x4ed62a=a11_0x5215;logger[_0x4ed62a(0xc3)]('create-menus',_0x4ed62a(0xc7)+_0x276e1b[_0x4ed62a(0xee)]+'\x20个'),await Promise[_0x4ed62a(0xf0)](_0x276e1b['map'](async _0x4cff34=>{await _createMenu(_0x4cff34,_0x6276ae);})),logger[_0x4ed62a(0xc3)](_0x4ed62a(0xcf),'批量创建菜单完成,共\x20'+_0x276e1b[_0x4ed62a(0xee)]+'\x20个');}
1
+ (function(_0x3ffd5e,_0x57b721){const _0x1f5501=a11_0xeee8,_0xbd6764=_0x3ffd5e();while(!![]){try{const _0x366e11=parseInt(_0x1f5501(0x8a))/0x1*(-parseInt(_0x1f5501(0x90))/0x2)+-parseInt(_0x1f5501(0xa9))/0x3*(parseInt(_0x1f5501(0x8f))/0x4)+-parseInt(_0x1f5501(0x99))/0x5*(-parseInt(_0x1f5501(0x8c))/0x6)+parseInt(_0x1f5501(0xb5))/0x7*(parseInt(_0x1f5501(0x96))/0x8)+-parseInt(_0x1f5501(0xb4))/0x9+parseInt(_0x1f5501(0xb1))/0xa*(parseInt(_0x1f5501(0x92))/0xb)+parseInt(_0x1f5501(0xa2))/0xc*(parseInt(_0x1f5501(0xb2))/0xd);if(_0x366e11===_0x57b721)break;else _0xbd6764['push'](_0xbd6764['shift']());}catch(_0x494819){_0xbd6764['push'](_0xbd6764['shift']());}}}(a11_0x4987,0x50088));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a11_0x4987(){const _0x1374bc=['errorMsg','success','正在创建菜单:\x20','stringify','resources','import','444GVIsSI','includes','data','未知错误','/smartapi/menu/create','path','error','21351NLHjKu','创建菜单成功:','json','info','procode','application/json','status','开始批量创建菜单,共\x20','10RcNMUZ','412581loGFyC','创建菜单失败:\x20','691173WlBZTT','182693prrLzO','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','length','map','all','批量创建菜单完成,共\x20','appcode','!\x20请使用以下方式之一:','853xcyTjw','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','804WInDyG','菜单创建成功:\x20','POST','328mgvJlu','1370DHgxkw','未提供应用AppCode,且配置中也没有默认值','1195590EtxszM','errorCode','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','create-menu','40DUBfmd','log','label','5935NTtsht','创建菜单失败,HTTP状态码:\x20','create-menus'];a11_0x4987=function(){return _0x1374bc;};return a11_0x4987();}function a11_0xeee8(_0x35a147,_0x18a682){const _0x498790=a11_0x4987();return a11_0xeee8=function(_0xeee85e,_0x338381){_0xeee85e=_0xeee85e-0x83;let _0x49c471=_0x498790[_0xeee85e];return _0x49c471;},a11_0xeee8(_0x35a147,_0x18a682);}const config=readConfig();export async function createMenu(_0x1c3575){const _0x111357=a11_0xeee8,_0x42beea=config?.['appcode'];if(!_0x42beea){const _0x4e84d5=_0x111357(0x91);logger[_0x111357(0xa8)](_0x111357(0x95),_0x4e84d5),console[_0x111357(0xa8)]('×\x20'+_0x4e84d5),console[_0x111357(0x97)]('!\x20请使用以下方式之一:'),console[_0x111357(0x97)](_0x111357(0x8b)),console[_0x111357(0x97)](_0x111357(0x83));return;}logger[_0x111357(0xac)](_0x111357(0x95),_0x111357(0x9e)+_0x1c3575[_0x111357(0x98)]+'\x20('+_0x1c3575[_0x111357(0xa7)]+')');const _0x1dae4e={'appCode':_0x42beea,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x1c3575[_0x111357(0xa0)]?JSON[_0x111357(0x9f)](_0x1c3575[_0x111357(0xa0)]):undefined},..._0x1c3575},_0x1eddd1=await fetch(getApiDomain()+_0x111357(0xa6),{'method':'POST','body':JSON[_0x111357(0x9f)](_0x1dae4e),'headers':{'Content-Type':_0x111357(0xae),'Cookie':getCookie()}});if(!_0x1eddd1['ok']){if(_0x1eddd1[_0x111357(0xaf)]===0x191){const _0xcc5b51=_0x111357(0x94);logger['error']('create-menu',_0xcc5b51,{'status':_0x1eddd1[_0x111357(0xaf)],'menu':_0x1c3575['label']});throw new Error(_0xcc5b51);}const _0x3ba29d='创建菜单失败,HTTP状态码:\x20'+_0x1eddd1[_0x111357(0xaf)];logger['error'](_0x111357(0x95),_0x3ba29d,{'menu':_0x1c3575[_0x111357(0x98)]});throw new Error(_0x3ba29d);}const _0x155187=await _0x1eddd1[_0x111357(0xab)]();if(!_0x155187[_0x111357(0x9d)]){const _0x56935b=_0x111357(0xb3)+(_0x155187[_0x111357(0x9c)]||'未知错误');logger[_0x111357(0xa8)](_0x111357(0x95),_0x56935b,{'errorCode':_0x155187[_0x111357(0x93)],'errorMsg':_0x155187[_0x111357(0x9c)],'menu':_0x1c3575[_0x111357(0x98)]});throw new Error(_0x56935b);}logger[_0x111357(0xac)]('create-menu',_0x111357(0x8d)+_0x1c3575['label'],_0x155187[_0x111357(0xa4)]),console['log'](_0x111357(0xaa),_0x155187[_0x111357(0xa4)]);}async function _createMenu(_0x7f340b,_0x2cfc59){const _0x2967a6=a11_0xeee8,_0x21aa50=config?.[_0x2967a6(0x88)];if(!_0x21aa50){const _0x21ee96=_0x2967a6(0x91);logger[_0x2967a6(0xa8)](_0x2967a6(0x95),_0x21ee96),console[_0x2967a6(0xa8)]('×\x20'+_0x21ee96),console[_0x2967a6(0x97)](_0x2967a6(0x89)),console[_0x2967a6(0x97)](_0x2967a6(0x8b)),console[_0x2967a6(0x97)](_0x2967a6(0x83));return;}const _0x146270={'appCode':_0x21aa50,'type':_0x2967a6(0xad),'sort':0x0,'extend':{'loadScriptMode':_0x2967a6(0xa1),'resources':_0x2cfc59?JSON[_0x2967a6(0x9f)](_0x2cfc59):undefined},'label':_0x7f340b[_0x2967a6(0x98)],'path':_0x7f340b[_0x2967a6(0xa7)]},_0x1acdab=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x2967a6(0x8e),'body':JSON[_0x2967a6(0x9f)](_0x146270),'headers':{'Content-Type':_0x2967a6(0xae),'Cookie':getCookie()}});if(!_0x1acdab['ok']){if(_0x1acdab[_0x2967a6(0xaf)]===0x191){const _0x1f9190='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x2967a6(0xa8)](_0x2967a6(0x95),_0x1f9190,{'status':_0x1acdab[_0x2967a6(0xaf)],'menu':_0x7f340b['label']});throw new Error(_0x1f9190);}const _0x580d96=_0x2967a6(0x9a)+_0x1acdab[_0x2967a6(0xaf)];logger[_0x2967a6(0xa8)](_0x2967a6(0x95),_0x580d96,{'menu':_0x7f340b[_0x2967a6(0x98)]});throw new Error(_0x580d96);}const _0x58c8d2=await _0x1acdab[_0x2967a6(0xab)]();if(!_0x58c8d2['success']){if(_0x58c8d2[_0x2967a6(0x93)]==='0011'||_0x58c8d2[_0x2967a6(0x9c)]?.[_0x2967a6(0xa3)]('登录')){const _0x2cb25d='登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x2967a6(0xa8)](_0x2967a6(0x95),_0x2cb25d,{'errorCode':_0x58c8d2[_0x2967a6(0x93)],'errorMsg':_0x58c8d2[_0x2967a6(0x9c)],'menu':_0x7f340b[_0x2967a6(0x98)]});throw new Error(_0x2cb25d);}const _0x42d50=_0x2967a6(0xb3)+(_0x58c8d2[_0x2967a6(0x9c)]||_0x2967a6(0xa5));logger['error'](_0x2967a6(0x95),_0x42d50,{'errorCode':_0x58c8d2[_0x2967a6(0x93)],'errorMsg':_0x58c8d2[_0x2967a6(0x9c)],'menu':_0x7f340b[_0x2967a6(0x98)]});throw new Error(_0x42d50);}logger[_0x2967a6(0xac)](_0x2967a6(0x95),_0x2967a6(0x8d)+_0x7f340b[_0x2967a6(0x98)]);}export async function createMenus(_0x3012a1,_0x1a7021){const _0xb69b48=a11_0xeee8;logger['info'](_0xb69b48(0x9b),_0xb69b48(0xb0)+_0x3012a1[_0xb69b48(0x84)]+'\x20个'),await Promise[_0xb69b48(0x86)](_0x3012a1[_0xb69b48(0x85)](async _0x144aca=>{await _createMenu(_0x144aca,_0x1a7021);})),logger[_0xb69b48(0xac)](_0xb69b48(0x9b),_0xb69b48(0x87)+_0x3012a1[_0xb69b48(0x84)]+'\x20个');}
@@ -1 +1 @@
1
- const a12_0x16e2b9=a12_0x4857;(function(_0x3dc83d,_0x5b0a48){const _0x483ca9=a12_0x4857,_0x904ba6=_0x3dc83d();while(!![]){try{const _0x28a840=parseInt(_0x483ca9(0x107))/0x1+-parseInt(_0x483ca9(0x112))/0x2*(-parseInt(_0x483ca9(0x105))/0x3)+parseInt(_0x483ca9(0x108))/0x4*(-parseInt(_0x483ca9(0x111))/0x5)+parseInt(_0x483ca9(0x119))/0x6+-parseInt(_0x483ca9(0x115))/0x7*(parseInt(_0x483ca9(0x10b))/0x8)+-parseInt(_0x483ca9(0x10e))/0x9*(parseInt(_0x483ca9(0x106))/0xa)+-parseInt(_0x483ca9(0x11a))/0xb*(-parseInt(_0x483ca9(0x113))/0xc);if(_0x28a840===_0x5b0a48)break;else _0x904ba6['push'](_0x904ba6['shift']());}catch(_0x2c4d00){_0x904ba6['push'](_0x904ba6['shift']());}}}(a12_0x4e4a,0x79484));function a12_0x4e4a(){const _0x395132=['48XHidBx','path','1104817sKysZH','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','replace','match','5524806jzqBHo','1317503Dyvrns','forEach','concat','utf-8','slice','2022cusaET','3815740oLqCKy','558363BRwWjP','12pqnGAd','.tsx','filter','8DOostz','isDirectory','index.tsx','18NXEPMh','cwd','endsWith','1313105HIYguM','734ySuAqC'];a12_0x4e4a=function(){return _0x395132;};return a12_0x4e4a();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a12_0x4857(_0x41e8ce,_0x3f590e){const _0x4e4a22=a12_0x4e4a();return a12_0x4857=function(_0x485794,_0xb94f38){_0x485794=_0x485794-0x102;let _0x5690c8=_0x4e4a22[_0x485794];return _0x5690c8;},a12_0x4857(_0x41e8ce,_0x3f590e);}const pagesDir=resolve(process[a12_0x16e2b9(0x10f)](),'src/pages');export function extractTitleFromComment(_0x2c9853){const _0x4c0f06=a12_0x16e2b9;try{const _0x3ed606=readFileSync(_0x2c9853,_0x4c0f06(0x103)),_0x3178a9=_0x3ed606[_0x4c0f06(0x118)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3178a9&&_0x3178a9[0x1]){const _0x5d473a=_0x3178a9[0x1],_0x1b2c91=_0x5d473a['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1b2c91&&_0x1b2c91[0x1])return _0x1b2c91[0x1]['trim']();}let _0x350cb3=null;const _0x70080=_0x3ed606[_0x4c0f06(0x118)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x70080&&_0x70080[0x1]&&(_0x350cb3=_0x70080[0x1]);if(!_0x350cb3){const _0x373e53=_0x3ed606[_0x4c0f06(0x118)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x373e53&&_0x373e53[0x1]&&(_0x350cb3=_0x373e53[0x1]);}if(_0x350cb3){const _0x308810=new RegExp('\x5cb'+_0x350cb3+_0x4c0f06(0x116)),_0x2fcb23=_0x3ed606[_0x4c0f06(0x118)](_0x308810);if(_0x2fcb23&&_0x2fcb23[0x1])return _0x2fcb23[0x1];return _0x350cb3;}return null;}catch(_0x5360d8){return null;}}export function getLocalPages(_0x29570d=pagesDir,_0x3dacbf=pagesDir){const _0x3b51c8=a12_0x16e2b9;let _0x1e7b49=[];const _0x209279=readdirSync(_0x29570d);return _0x209279[_0x3b51c8(0x11b)](_0x5ae0af=>{const _0x42d107=_0x3b51c8,_0x1d591c=join(_0x29570d,_0x5ae0af),_0x484d88=statSync(_0x1d591c);if(_0x484d88&&_0x484d88[_0x42d107(0x10c)]())_0x1e7b49=_0x1e7b49[_0x42d107(0x102)](getLocalPages(_0x1d591c,_0x3dacbf));else{if(_0x5ae0af['endsWith'](_0x42d107(0x109))){let _0x4df3ee=relative(_0x3dacbf,_0x1d591c);_0x4df3ee[_0x42d107(0x110)](_0x42d107(0x10d))?_0x4df3ee=_0x4df3ee[_0x42d107(0x117)](/index\.tsx$/,''):_0x4df3ee=_0x4df3ee[_0x42d107(0x117)](/\.tsx$/,'');_0x4df3ee[_0x42d107(0x110)]('/')&&(_0x4df3ee=_0x4df3ee[_0x42d107(0x104)](0x0,-0x1));const _0x1a839e=extractTitleFromComment(_0x1d591c),_0x23c593=_0x1a839e||_0x4df3ee;_0x1e7b49['push']({'path':_0x4df3ee,'label':_0x23c593});}}}),_0x1e7b49[_0x3b51c8(0x10a)](_0x4a1718=>_0x4a1718[_0x3b51c8(0x114)]!=='');}
1
+ const a12_0x5f33ba=a12_0x145f;(function(_0x3dfb21,_0x3f5259){const _0xf3cead=a12_0x145f,_0x4855e5=_0x3dfb21();while(!![]){try{const _0x5624f7=-parseInt(_0xf3cead(0xc6))/0x1+-parseInt(_0xf3cead(0xd3))/0x2+-parseInt(_0xf3cead(0xc7))/0x3*(-parseInt(_0xf3cead(0xd5))/0x4)+parseInt(_0xf3cead(0xd2))/0x5*(-parseInt(_0xf3cead(0xca))/0x6)+parseInt(_0xf3cead(0xd0))/0x7*(parseInt(_0xf3cead(0xc5))/0x8)+-parseInt(_0xf3cead(0xc4))/0x9+-parseInt(_0xf3cead(0xc9))/0xa*(-parseInt(_0xf3cead(0xd9))/0xb);if(_0x5624f7===_0x3f5259)break;else _0x4855e5['push'](_0x4855e5['shift']());}catch(_0x218153){_0x4855e5['push'](_0x4855e5['shift']());}}}(a12_0x45c6,0x3a209));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x5f33ba(0xce)](),'src/pages');export function extractTitleFromComment(_0x5db6be){const _0x27c301=a12_0x5f33ba;try{const _0x1eb7a3=readFileSync(_0x5db6be,_0x27c301(0xc3)),_0xbc82ed=_0x1eb7a3[_0x27c301(0xcd)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xbc82ed&&_0xbc82ed[0x1]){const _0x47345f=_0xbc82ed[0x1],_0x2f37ea=_0x47345f['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2f37ea&&_0x2f37ea[0x1])return _0x2f37ea[0x1][_0x27c301(0xd1)]();}let _0x3360c0=null;const _0x199c71=_0x1eb7a3[_0x27c301(0xcd)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x199c71&&_0x199c71[0x1]&&(_0x3360c0=_0x199c71[0x1]);if(!_0x3360c0){const _0x4bba32=_0x1eb7a3['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4bba32&&_0x4bba32[0x1]&&(_0x3360c0=_0x4bba32[0x1]);}if(_0x3360c0){const _0x121150=new RegExp('\x5cb'+_0x3360c0+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x96758e=_0x1eb7a3[_0x27c301(0xcd)](_0x121150);if(_0x96758e&&_0x96758e[0x1])return _0x96758e[0x1];return _0x3360c0;}return null;}catch(_0x6ca958){return null;}}function a12_0x45c6(){const _0x19ef88=['endsWith','1042107WUvqym','replace','utf-8','376047NJiNcU','2504tvqnVS','258848wPxGPH','16095GOWCTF','filter','80QMEaXf','906126NwMjPd','index.tsx','isDirectory','match','cwd','forEach','1141FcNMBO','trim','5SGpavv','785578SaKKtD','slice','204munfXj','concat','.tsx'];a12_0x45c6=function(){return _0x19ef88;};return a12_0x45c6();}function a12_0x145f(_0x4062c7,_0x379ef7){const _0x45c6be=a12_0x45c6();return a12_0x145f=function(_0x145f98,_0x2bb55a){_0x145f98=_0x145f98-0xc3;let _0x3bd172=_0x45c6be[_0x145f98];return _0x3bd172;},a12_0x145f(_0x4062c7,_0x379ef7);}export function getLocalPages(_0x18ec14=pagesDir,_0x261826=pagesDir){const _0x15baa4=a12_0x5f33ba;let _0x545a8d=[];const _0xc4062d=readdirSync(_0x18ec14);return _0xc4062d[_0x15baa4(0xcf)](_0x3be138=>{const _0x3a0706=_0x15baa4,_0x76edef=join(_0x18ec14,_0x3be138),_0x1eb3b2=statSync(_0x76edef);if(_0x1eb3b2&&_0x1eb3b2[_0x3a0706(0xcc)]())_0x545a8d=_0x545a8d[_0x3a0706(0xd6)](getLocalPages(_0x76edef,_0x261826));else{if(_0x3be138[_0x3a0706(0xd8)](_0x3a0706(0xd7))){let _0x4eb1dc=relative(_0x261826,_0x76edef);_0x4eb1dc[_0x3a0706(0xd8)](_0x3a0706(0xcb))?_0x4eb1dc=_0x4eb1dc[_0x3a0706(0xda)](/index\.tsx$/,''):_0x4eb1dc=_0x4eb1dc[_0x3a0706(0xda)](/\.tsx$/,'');_0x4eb1dc[_0x3a0706(0xd8)]('/')&&(_0x4eb1dc=_0x4eb1dc[_0x3a0706(0xd4)](0x0,-0x1));const _0x18c3ad=extractTitleFromComment(_0x76edef),_0x1d0e44=_0x18c3ad||_0x4eb1dc;_0x545a8d['push']({'path':_0x4eb1dc,'label':_0x1d0e44});}}}),_0x545a8d[_0x15baa4(0xc8)](_0x11a5eb=>_0x11a5eb['path']!=='');}
@@ -1 +1 @@
1
- function a13_0x1d7c(_0x3d06b3,_0x534187){const _0x570e94=a13_0x570e();return a13_0x1d7c=function(_0x1d7c9b,_0x23cd4f){_0x1d7c9b=_0x1d7c9b-0x1f1;let _0x17057b=_0x570e94[_0x1d7c9b];return _0x17057b;},a13_0x1d7c(_0x3d06b3,_0x534187);}(function(_0x194aed,_0x244196){const _0x56fe6a=a13_0x1d7c,_0x47de6c=_0x194aed();while(!![]){try{const _0x4ff5e3=parseInt(_0x56fe6a(0x210))/0x1*(-parseInt(_0x56fe6a(0x213))/0x2)+parseInt(_0x56fe6a(0x20e))/0x3*(-parseInt(_0x56fe6a(0x20a))/0x4)+parseInt(_0x56fe6a(0x20c))/0x5+parseInt(_0x56fe6a(0x201))/0x6*(parseInt(_0x56fe6a(0x1fd))/0x7)+-parseInt(_0x56fe6a(0x205))/0x8+-parseInt(_0x56fe6a(0x212))/0x9*(parseInt(_0x56fe6a(0x211))/0xa)+parseInt(_0x56fe6a(0x1fb))/0xb*(parseInt(_0x56fe6a(0x1f6))/0xc);if(_0x4ff5e3===_0x244196)break;else _0x47de6c['push'](_0x47de6c['shift']());}catch(_0x5c0058){_0x47de6c['push'](_0x47de6c['shift']());}}}(a13_0x570e,0x4ebdf));import{useEffect,useState}from'react';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x25878a=a13_0x1d7c,_0x3da974=config?.['appcode'];if(!_0x3da974){const _0x5e97d5=_0x25878a(0x1fc);return logger[_0x25878a(0x1f2)]('get-online-menu-list',_0x5e97d5),console[_0x25878a(0x1f2)]('×\x20'+_0x5e97d5),console[_0x25878a(0x1f7)](_0x25878a(0x1f3)),console[_0x25878a(0x1f7)](_0x25878a(0x203)),console[_0x25878a(0x1f7)](_0x25878a(0x1f9)),[];}logger['info'](_0x25878a(0x1fe),_0x25878a(0x206)+_0x3da974+')');const _0x46874f=await fetch(getApiDomain()+_0x25878a(0x20b)+_0x3da974,{'method':_0x25878a(0x208),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x46874f['ok']){if(_0x46874f[_0x25878a(0x1fa)]===0x191){const _0x4a97e2=_0x25878a(0x1f1);logger[_0x25878a(0x1f2)]('get-online-menu-list',_0x4a97e2,{'status':_0x46874f[_0x25878a(0x1fa)]});throw new Error(_0x4a97e2);}const _0x2c87ca=_0x25878a(0x214)+_0x46874f['status'];logger[_0x25878a(0x1f2)](_0x25878a(0x1fe),_0x2c87ca);throw new Error(_0x2c87ca);}const _0x490237=await _0x46874f['json']();if(!_0x490237[_0x25878a(0x20d)]){const _0xde1370='获取菜单列表失败:\x20'+(_0x490237[_0x25878a(0x1f5)]||'未知错误');logger['error'](_0x25878a(0x1fe),_0xde1370,{'errorCode':_0x490237[_0x25878a(0x20f)],'errorMsg':_0x490237[_0x25878a(0x1f5)]});throw new Error(_0xde1370);}if(!_0x490237['data'])return logger['info'](_0x25878a(0x1fe),_0x25878a(0x209)),[];return logger['info'](_0x25878a(0x1fe),_0x25878a(0x204)+_0x490237['data'][_0x25878a(0x207)]+_0x25878a(0x215)),_0x490237[_0x25878a(0x200)]['map'](_0x253378=>({'path':_0x253378[_0x25878a(0x202)],'label':_0x253378[_0x25878a(0x216)]}));}export function useGetOnlineMenuList(){const [_0x41440f,_0x463be5]=useState([]),[_0x2e03c9,_0x4db244]=useState(!![]),[_0x310b7f,_0x5b78a8]=useState('');return useEffect(()=>{const _0x2fea25=a13_0x1d7c;_0x4db244(!![]),_0x5b78a8(''),getOnlineMenuList()[_0x2fea25(0x1f8)](_0x463be5)[_0x2fea25(0x1ff)](_0x12742e=>{_0x5b78a8(_0x12742e['message']||'获取菜单列表失败');})[_0x2fea25(0x1f4)](()=>_0x4db244(![]));},[]),{'menuList':_0x41440f,'loading':_0x2e03c9,'error':_0x310b7f};}function a13_0x570e(){const _0x27c27a=['GET','服务端返回空菜单列表','20VgCuwV','/smartapi/menu/find?appCode=','415420HVnSnC','success','289185kjODHt','errorCode','8885RXrnKs','37530lwAWzD','927TDrBmK','10XkpMuu','获取菜单列表失败,HTTP状态码:\x20','\x20个线上菜单','label','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','error','!\x20请使用以下方式之一:','finally','errorMsg','776052tXRsnV','log','then','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','status','209iCAgIy','未提供应用AppCode,且配置中也没有默认值','571529HpRkar','get-online-menu-list','catch','data','24RRUINU','path','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','成功获取\x20','3223480mEXuNB','正在获取线上菜单列表...\x20(appCode:\x20','length'];a13_0x570e=function(){return _0x27c27a;};return a13_0x570e();}
1
+ (function(_0x13237f,_0x4f555b){const _0xbe3fa8=a13_0x229c,_0x51edd8=_0x13237f();while(!![]){try{const _0x5c0c24=parseInt(_0xbe3fa8(0x96))/0x1*(-parseInt(_0xbe3fa8(0xa8))/0x2)+parseInt(_0xbe3fa8(0x94))/0x3*(-parseInt(_0xbe3fa8(0xac))/0x4)+parseInt(_0xbe3fa8(0xb0))/0x5*(parseInt(_0xbe3fa8(0xa7))/0x6)+-parseInt(_0xbe3fa8(0x8a))/0x7+parseInt(_0xbe3fa8(0x8e))/0x8+parseInt(_0xbe3fa8(0x9d))/0x9*(parseInt(_0xbe3fa8(0xa9))/0xa)+parseInt(_0xbe3fa8(0xae))/0xb;if(_0x5c0c24===_0x4f555b)break;else _0x51edd8['push'](_0x51edd8['shift']());}catch(_0x558f37){_0x51edd8['push'](_0x51edd8['shift']());}}}(a13_0x656f,0xc029e));import{useEffect,useState}from'react';function a13_0x229c(_0x399c7a,_0x2cc020){const _0x656f27=a13_0x656f();return a13_0x229c=function(_0x229c4e,_0x2b895b){_0x229c4e=_0x229c4e-0x8a;let _0x8ba436=_0x656f27[_0x229c4e];return _0x8ba436;},a13_0x229c(_0x399c7a,_0x2cc020);}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a13_0x656f(){const _0x4be3d9=['get-online-menu-list','5UMYIdt','json','获取菜单列表失败','6673009SgUyJy','errorCode','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','length','6952928mxbRLZ','status','message','获取菜单列表失败:\x20','获取菜单列表失败,HTTP状态码:\x20','info','4108476AcUpyJ','then','1753mqVBGY','GET','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','服务端返回空菜单列表','log','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','data','2193111bdEQQF','error','catch','!\x20请使用以下方式之一:','label','未知错误','正在获取线上菜单列表...\x20(appCode:\x20','\x20个线上菜单','success','application/json','9386838VRsvOM','626AYRPhY','50VWpfNz','未提供应用AppCode,且配置中也没有默认值','path','4FMhiTO','map','72446hywMze'];a13_0x656f=function(){return _0x4be3d9;};return a13_0x656f();}import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x250d75=a13_0x229c,_0x5c909f=config?.['appcode'];if(!_0x5c909f){const _0x188869=_0x250d75(0xaa);return logger[_0x250d75(0x9e)](_0x250d75(0xaf),_0x188869),console['error']('×\x20'+_0x188869),console[_0x250d75(0x9a)](_0x250d75(0xa0)),console[_0x250d75(0x9a)](_0x250d75(0x8c)),console['log'](_0x250d75(0x9b)),[];}logger[_0x250d75(0x93)](_0x250d75(0xaf),_0x250d75(0xa3)+_0x5c909f+')');const _0xbc8a6c=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x5c909f,{'method':_0x250d75(0x97),'headers':{'Content-Type':_0x250d75(0xa6),'Cookie':getCookie()}});if(!_0xbc8a6c['ok']){if(_0xbc8a6c[_0x250d75(0x8f)]===0x191){const _0x2214d0=_0x250d75(0x98);logger['error'](_0x250d75(0xaf),_0x2214d0,{'status':_0xbc8a6c[_0x250d75(0x8f)]});throw new Error(_0x2214d0);}const _0xacea65=_0x250d75(0x92)+_0xbc8a6c['status'];logger['error'](_0x250d75(0xaf),_0xacea65);throw new Error(_0xacea65);}const _0xd98b0f=await _0xbc8a6c[_0x250d75(0xb1)]();if(!_0xd98b0f[_0x250d75(0xa5)]){const _0x47ebdd=_0x250d75(0x91)+(_0xd98b0f['errorMsg']||_0x250d75(0xa2));logger['error'](_0x250d75(0xaf),_0x47ebdd,{'errorCode':_0xd98b0f[_0x250d75(0x8b)],'errorMsg':_0xd98b0f['errorMsg']});throw new Error(_0x47ebdd);}if(!_0xd98b0f[_0x250d75(0x9c)])return logger['info'](_0x250d75(0xaf),_0x250d75(0x99)),[];return logger[_0x250d75(0x93)](_0x250d75(0xaf),'成功获取\x20'+_0xd98b0f[_0x250d75(0x9c)][_0x250d75(0x8d)]+_0x250d75(0xa4)),_0xd98b0f['data'][_0x250d75(0xad)](_0x263f29=>({'path':_0x263f29[_0x250d75(0xab)],'label':_0x263f29[_0x250d75(0xa1)]}));}export function useGetOnlineMenuList(){const [_0x31cdb7,_0x1e977b]=useState([]),[_0x128bda,_0x34ab12]=useState(!![]),[_0x535224,_0x171af6]=useState('');return useEffect(()=>{const _0xd11818=a13_0x229c;_0x34ab12(!![]),_0x171af6(''),getOnlineMenuList()[_0xd11818(0x95)](_0x1e977b)[_0xd11818(0x9f)](_0x29a96b=>{const _0x16a029=_0xd11818;_0x171af6(_0x29a96b[_0x16a029(0x90)]||_0x16a029(0xb2));})['finally'](()=>_0x34ab12(![]));},[]),{'menuList':_0x31cdb7,'loading':_0x128bda,'error':_0x535224};}
@@ -1 +1 @@
1
- (function(_0x12ce7d,_0x1f4621){const _0x37b4d1=a15_0x48f9,_0x4cff4e=_0x12ce7d();while(!![]){try{const _0x58d239=parseInt(_0x37b4d1(0x142))/0x1+parseInt(_0x37b4d1(0x147))/0x2*(-parseInt(_0x37b4d1(0x148))/0x3)+-parseInt(_0x37b4d1(0x14a))/0x4+-parseInt(_0x37b4d1(0x143))/0x5+-parseInt(_0x37b4d1(0x141))/0x6*(-parseInt(_0x37b4d1(0x149))/0x7)+parseInt(_0x37b4d1(0x140))/0x8*(parseInt(_0x37b4d1(0x145))/0x9)+parseInt(_0x37b4d1(0x144))/0xa*(parseInt(_0x37b4d1(0x14d))/0xb);if(_0x58d239===_0x1f4621)break;else _0x4cff4e['push'](_0x4cff4e['shift']());}catch(_0x34e50e){_0x4cff4e['push'](_0x4cff4e['shift']());}}}(a15_0x1186,0xb513a));function a15_0x48f9(_0x408ab3,_0x2a213d){const _0x1186e8=a15_0x1186();return a15_0x48f9=function(_0x48f957,_0x315499){_0x48f957=_0x48f957-0x140;let _0x2a5f1a=_0x1186e8[_0x48f957];return _0x2a5f1a;},a15_0x48f9(_0x408ab3,_0x2a213d);}export function isValidJsHttpsUrl(_0x1cfa95){const _0x1cea35=a15_0x48f9;return/^https:\/\/.+\.js(\?.*)?$/[_0x1cea35(0x14b)](_0x1cfa95[_0x1cea35(0x14c)]());}export function isValidCssHttpsUrl(_0x5db514){const _0x1ab194=a15_0x48f9;return/^https:\/\/.+\.css(\?.*)?$/[_0x1ab194(0x14b)](_0x5db514[_0x1ab194(0x14c)]());}function a15_0x1186(){const _0x311118=['HEAD','3092vMCaVF','2346EYxafX','18725ByshgV','1088872xhDHUQ','test','trim','25394402eOGxKh','1192YGDrgB','786rGprEf','187435oFupVK','5716370IDaPMA','10aQKeBs','31392umDFLQ'];a15_0x1186=function(){return _0x311118;};return a15_0x1186();}export async function isUrlReachable(_0x3d6b79){const _0x5fc053=a15_0x48f9;try{const _0x333dce=await fetch(_0x3d6b79,{'method':_0x5fc053(0x146)});return _0x333dce['ok'];}catch{return![];}}
1
+ function a15_0x1f9f(){const _0x361a02=['8615000zOlEyv','4687020hbVSgl','test','4369ZfRJhT','16YDdMHI','8uwwHGA','HEAD','167465kVgKta','12TSzyRN','trim','636172QrUCpG','671167WjioDP','1208598GUrseF'];a15_0x1f9f=function(){return _0x361a02;};return a15_0x1f9f();}(function(_0x449203,_0x4f87db){const _0x33e0b3=a15_0xf3ea,_0xa024b9=_0x449203();while(!![]){try{const _0x4197a2=parseInt(_0x33e0b3(0xfe))/0x1+parseInt(_0x33e0b3(0x105))/0x2+parseInt(_0x33e0b3(0x107))/0x3+-parseInt(_0x33e0b3(0xff))/0x4*(parseInt(_0x33e0b3(0x102))/0x5)+-parseInt(_0x33e0b3(0x103))/0x6*(-parseInt(_0x33e0b3(0x106))/0x7)+-parseInt(_0x33e0b3(0x100))/0x8*(-parseInt(_0x33e0b3(0xfc))/0x9)+-parseInt(_0x33e0b3(0x108))/0xa;if(_0x4197a2===_0x4f87db)break;else _0xa024b9['push'](_0xa024b9['shift']());}catch(_0x237279){_0xa024b9['push'](_0xa024b9['shift']());}}}(a15_0x1f9f,0x6c017));function a15_0xf3ea(_0x1971a0,_0x5ee805){const _0x1f9f9a=a15_0x1f9f();return a15_0xf3ea=function(_0xf3ea8e,_0x50be59){_0xf3ea8e=_0xf3ea8e-0xfc;let _0x1bd302=_0x1f9f9a[_0xf3ea8e];return _0x1bd302;},a15_0xf3ea(_0x1971a0,_0x5ee805);}export function isValidJsHttpsUrl(_0x5e9b3e){const _0x3d8168=a15_0xf3ea;return/^https:\/\/.+\.js(\?.*)?$/[_0x3d8168(0xfd)](_0x5e9b3e[_0x3d8168(0x104)]());}export function isValidCssHttpsUrl(_0x46dec7){const _0x1834a3=a15_0xf3ea;return/^https:\/\/.+\.css(\?.*)?$/[_0x1834a3(0xfd)](_0x46dec7[_0x1834a3(0x104)]());}export async function isUrlReachable(_0x114619){const _0x9585de=a15_0xf3ea;try{const _0x501b89=await fetch(_0x114619,{'method':_0x9585de(0x101)});return _0x501b89['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3665be,_0x10353f){const _0x3d024a=a16_0x354f,_0x2ecab7=_0x3665be();while(!![]){try{const _0x5ef95b=parseInt(_0x3d024a(0x99))/0x1*(parseInt(_0x3d024a(0x94))/0x2)+parseInt(_0x3d024a(0x98))/0x3+-parseInt(_0x3d024a(0x9d))/0x4+-parseInt(_0x3d024a(0xa1))/0x5*(-parseInt(_0x3d024a(0x9a))/0x6)+-parseInt(_0x3d024a(0x93))/0x7*(-parseInt(_0x3d024a(0x95))/0x8)+-parseInt(_0x3d024a(0x9f))/0x9*(-parseInt(_0x3d024a(0x8e))/0xa)+-parseInt(_0x3d024a(0x91))/0xb;if(_0x5ef95b===_0x10353f)break;else _0x2ecab7['push'](_0x2ecab7['shift']());}catch(_0xde80e4){_0x2ecab7['push'](_0x2ecab7['shift']());}}}(a16_0x2b35,0xa61fa));function a16_0x2b35(){const _0x19bca0=['4282028PCDenw','√\x20当前为有效会话,无需重新登录。','9pZJalm','then','20xOoAyS','gray','finally','green','3746070WlAsdi','log','按\x20“q”\x20退出。','22883795zWbPdl','请前往浏览器完成登录。','7OjxoWK','34342eEfgzj','7263992oAvmef','return','*\x20按回车开始登录。','3483459WiwXNN','41uHgCyg','1025286iyKDRz','*\x20登录成功!','dots'];a16_0x2b35=function(){return _0x19bca0;};return a16_0x2b35();}import{jsx as a16_0x3b7252,jsxs as a16_0x1552f5}from'react/jsx-runtime';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 a16_0xc14dfb from'ink-spinner';function a16_0x354f(_0xa37b65,_0x43661f){const _0x2b35e0=a16_0x2b35();return a16_0x354f=function(_0x354f75,_0x20e1fc){_0x354f75=_0x354f75-0x8c;let _0x1a1c66=_0x2b35e0[_0x354f75];return _0x1a1c66;},a16_0x354f(_0xa37b65,_0x43661f);}export function AuthServer(){const _0x53d08f=a16_0x354f,{exit:_0x4190c5}=useApp(),[_0x4874ec,_0x473e07]=useState(![]),[_0x3c5c0d,_0xfd1cc0]=useState(!![]),[_0x57bed0,_0x2160ac]=useState(![]),[_0x5aabab,_0xd08d1b]=useState(![]);useEffect(()=>{const _0x3bc56d=a16_0x354f;getIsSessionValid()[_0x3bc56d(0xa0)](_0x473e07)[_0x3bc56d(0x8c)](()=>_0xfd1cc0(![]));},[]),useEffect(()=>{const _0x1a7b13=a16_0x354f;!_0x3c5c0d&&_0x4874ec&&(console[_0x1a7b13(0x8f)](_0x1a7b13(0x9e)),_0x4190c5());},[_0x3c5c0d,_0x4874ec,_0x4190c5]),useEffect(()=>{const _0x19055a=a16_0x354f;_0x5aabab&&(console[_0x19055a(0x8f)](_0x19055a(0x9b)),_0x4190c5());},[_0x5aabab,_0x4190c5]),useInput((_0xae3943,_0x3ff80f)=>{const _0x1af847=a16_0x354f;_0x3ff80f[_0x1af847(0x96)]&&(_0x2160ac(!![]),authServer({'silent':!![]})[_0x1af847(0xa0)](_0xfbc009=>{_0xd08d1b(_0xfbc009);})),_0xae3943==='q'&&_0x4190c5();});if(_0x3c5c0d)return null;if(_0x4874ec||_0x5aabab)return null;return a16_0x3b7252(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x57bed0?a16_0x1552f5(Box,{'children':[a16_0x3b7252(Box,{'width':'1'}),a16_0x1552f5(Text,{'color':_0x53d08f(0x8d),'children':[a16_0x3b7252(a16_0xc14dfb,{'type':_0x53d08f(0x9c)}),'\x20\x20']}),a16_0x3b7252(Text,{'children':'正在登录...\x20'}),a16_0x3b7252(Text,{'color':_0x53d08f(0xa2),'children':_0x53d08f(0x92)})]}):a16_0x1552f5(Box,{'children':[a16_0x3b7252(Box,{'width':'1'}),a16_0x3b7252(Text,{'children':_0x53d08f(0x97)}),a16_0x3b7252(Text,{'color':_0x53d08f(0xa2),'children':_0x53d08f(0x90)})]})});}
1
+ function a16_0x30ee(_0x22ad73,_0x51c45e){const _0x4173b2=a16_0x4173();return a16_0x30ee=function(_0x30ee97,_0x3e0ce2){_0x30ee97=_0x30ee97-0x1f0;let _0x4d678d=_0x4173b2[_0x30ee97];return _0x4d678d;},a16_0x30ee(_0x22ad73,_0x51c45e);}(function(_0x198845,_0x19ef3c){const _0x2899aa=a16_0x30ee,_0x54c2b7=_0x198845();while(!![]){try{const _0x2d7a25=-parseInt(_0x2899aa(0x1fc))/0x1+parseInt(_0x2899aa(0x1fa))/0x2+-parseInt(_0x2899aa(0x1f8))/0x3+-parseInt(_0x2899aa(0x1f2))/0x4+parseInt(_0x2899aa(0x1f9))/0x5*(parseInt(_0x2899aa(0x200))/0x6)+-parseInt(_0x2899aa(0x1f6))/0x7+parseInt(_0x2899aa(0x1ff))/0x8*(parseInt(_0x2899aa(0x1f5))/0x9);if(_0x2d7a25===_0x19ef3c)break;else _0x54c2b7['push'](_0x54c2b7['shift']());}catch(_0x32505d){_0x54c2b7['push'](_0x54c2b7['shift']());}}}(a16_0x4173,0x459eb));import{jsx as a16_0x5b7d6b,jsxs as a16_0x43dbbc}from'react/jsx-runtime';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';function a16_0x4173(){const _0x30ce5c=['dots','log','按\x20“q”\x20退出。','请前往浏览器完成登录。','gray','1756616SdaMjT','*\x20按回车开始登录。','正在登录...\x20','4448673gKZYIA','1196538PUfGqD','return','1471032DdEmsG','27515UNZllf','1078734HWrNat','then','351480IMhBSl','green','√\x20当前为有效会话,无需重新登录。','16gpquJB','228sXHASk','*\x20登录成功!'];a16_0x4173=function(){return _0x30ce5c;};return a16_0x4173();}import a16_0x5205ed from'ink-spinner';export function AuthServer(){const _0x5ed12c=a16_0x30ee,{exit:_0x4019b8}=useApp(),[_0x2bc577,_0x293937]=useState(![]),[_0xa4c58a,_0x2df766]=useState(!![]),[_0x4b2848,_0x4169df]=useState(![]),[_0x3414ee,_0x83a9e1]=useState(![]);useEffect(()=>{const _0x1d99ae=a16_0x30ee;getIsSessionValid()[_0x1d99ae(0x1fb)](_0x293937)['finally'](()=>_0x2df766(![]));},[]),useEffect(()=>{const _0x22d3ee=a16_0x30ee;!_0xa4c58a&&_0x2bc577&&(console[_0x22d3ee(0x203)](_0x22d3ee(0x1fe)),_0x4019b8());},[_0xa4c58a,_0x2bc577,_0x4019b8]),useEffect(()=>{const _0x2f024c=a16_0x30ee;_0x3414ee&&(console[_0x2f024c(0x203)](_0x2f024c(0x201)),_0x4019b8());},[_0x3414ee,_0x4019b8]),useInput((_0x3a6db3,_0x1731cf)=>{const _0x40b341=a16_0x30ee;_0x1731cf[_0x40b341(0x1f7)]&&(_0x4169df(!![]),authServer({'silent':!![]})[_0x40b341(0x1fb)](_0x2e88f3=>{_0x83a9e1(_0x2e88f3);})),_0x3a6db3==='q'&&_0x4019b8();});if(_0xa4c58a)return null;if(_0x2bc577||_0x3414ee)return null;return a16_0x5b7d6b(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x4b2848?a16_0x43dbbc(Box,{'children':[a16_0x5b7d6b(Box,{'width':'1'}),a16_0x43dbbc(Text,{'color':_0x5ed12c(0x1fd),'children':[a16_0x5b7d6b(a16_0x5205ed,{'type':_0x5ed12c(0x202)}),'\x20\x20']}),a16_0x5b7d6b(Text,{'children':_0x5ed12c(0x1f4)}),a16_0x5b7d6b(Text,{'color':_0x5ed12c(0x1f1),'children':_0x5ed12c(0x1f0)})]}):a16_0x43dbbc(Box,{'children':[a16_0x5b7d6b(Box,{'width':'1'}),a16_0x5b7d6b(Text,{'children':_0x5ed12c(0x1f3)}),a16_0x5b7d6b(Text,{'color':_0x5ed12c(0x1f1),'children':_0x5ed12c(0x204)})]})});}
@@ -1 +1 @@
1
- const a17_0x222196=a17_0x330b;(function(_0x303913,_0x19cf3c){const _0x2ac99b=a17_0x330b,_0x41968f=_0x303913();while(!![]){try{const _0x4a304a=-parseInt(_0x2ac99b(0x199))/0x1+-parseInt(_0x2ac99b(0x19d))/0x2*(-parseInt(_0x2ac99b(0x187))/0x3)+-parseInt(_0x2ac99b(0x17b))/0x4+-parseInt(_0x2ac99b(0x186))/0x5+parseInt(_0x2ac99b(0x19b))/0x6*(-parseInt(_0x2ac99b(0x17d))/0x7)+parseInt(_0x2ac99b(0x19f))/0x8*(parseInt(_0x2ac99b(0x18c))/0x9)+parseInt(_0x2ac99b(0x17c))/0xa*(parseInt(_0x2ac99b(0x1a3))/0xb);if(_0x4a304a===_0x19cf3c)break;else _0x41968f['push'](_0x41968f['shift']());}catch(_0x3e2ac8){_0x41968f['push'](_0x41968f['shift']());}}}(a17_0x5c99,0x70e31));import{writeFileSync}from'node:fs';import a17_0x25d6e3 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';function a17_0x330b(_0x404bf5,_0x9c0dce){const _0x5c9961=a17_0x5c99();return a17_0x330b=function(_0x330b64,_0x367b0c){_0x330b64=_0x330b64-0x17b;let _0x24c682=_0x5c9961[_0x330b64];return _0x24c682;},a17_0x330b(_0x404bf5,_0x9c0dce);}import{cookieFile}from'./constant.js';export async function authServer(_0x4c4d26){const _0x14c281=a17_0x330b,_0x4e47a3=_0x4c4d26?.[_0x14c281(0x197)]||![];if(await getIsSessionValid())return!![];const _0x5c904e=await(await fetch(_0x14c281(0x18b)))[_0x14c281(0x1a5)]();return new Promise(async(_0x5234af,_0x96d6fe)=>{const _0x454bf7=_0x14c281;let _0x40e2fa=0x0;const _0x2de790=a17_0x25d6e3['createServer'](_0x5c904e,async(_0x5dff2a,_0x2b9b04)=>{const _0x4b839b=a17_0x330b,_0x4d9291=getUserDomain(),_0x1366e3=_0x5dff2a[_0x4b839b(0x191)][_0x4b839b(0x19e)]||'',_0x49792a=await fetch(_0x4d9291+'/api/auth/get-session',{'headers':{'cookie':_0x1366e3}})[_0x4b839b(0x195)](_0x1de195=>_0x1de195[_0x4b839b(0x1a5)]()),_0x5b7324=_0x49792a&&_0x49792a[_0x4b839b(0x18e)]&&_0x49792a[_0x4b839b(0x192)];if(_0x5b7324){writeFileSync(cookieFile,_0x1366e3,_0x4b839b(0x196)),_0x5234af(!![]);const _0xa79fa0=_0x4b839b(0x198);_0x2b9b04[_0x4b839b(0x181)](0xc8,{'Content-Type':_0x4b839b(0x193)}),_0x2b9b04[_0x4b839b(0x188)](_0xa79fa0),_0x2de790[_0x4b839b(0x185)]();}else{const _0x1ff680=''+encodeURIComponent(_0x4b839b(0x184)+_0x40e2fa);_0x2b9b04['writeHead'](0x12e,{'location':_0x4d9291+_0x4b839b(0x190)+_0x1ff680}),_0x2b9b04['end']();return;}});_0x2de790[_0x454bf7(0x19a)](0x0,'127.0.0.1',()=>{const _0x4574f5=_0x454bf7,_0x417971=_0x2de790[_0x4574f5(0x1a2)]();_0x40e2fa=typeof _0x417971===_0x4574f5(0x17f)&&_0x417971?_0x417971['port']:Number(_0x417971);const _0x1c1d1e=_0x4574f5(0x184)+_0x40e2fa;!_0x4e47a3&&(console[_0x4574f5(0x1a0)](_0x4574f5(0x1a4)),console['log'](_0x4574f5(0x18a),_0x1c1d1e),console[_0x4574f5(0x1a0)](_0x4574f5(0x189)),console['log'](''),console[_0x4574f5(0x1a0)]('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console['log']('')),openInBrowser(_0x1c1d1e)[_0x4574f5(0x195)](_0x4ad86c=>{const _0x4a223e=_0x4574f5;!_0x4e47a3&&(_0x4ad86c?console[_0x4a223e(0x1a0)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x4a223e(0x1a0)](_0x4a223e(0x1a1)),console[_0x4a223e(0x1a0)](_0x4a223e(0x1a6),_0x1c1d1e)),console[_0x4a223e(0x1a0)](''));})[_0x4574f5(0x18d)](()=>{const _0x3c8d68=_0x4574f5;!_0x4e47a3&&(console['log'](_0x3c8d68(0x1a1)),console['log'](_0x3c8d68(0x1a6),_0x1c1d1e),console[_0x3c8d68(0x1a0)](''));});}),_0x2de790['on'](_0x454bf7(0x19c),_0x13ba73=>{const _0x419af1=_0x454bf7;!_0x4e47a3&&console[_0x419af1(0x19c)](_0x419af1(0x17e),_0x13ba73),_0x96d6fe(_0x13ba73);});});}function openInBrowser(_0x366372){return new Promise(_0x52fc0f=>{const _0x276d17=a17_0x330b,_0x3dfe25=process['platform'];let _0x339721;if(_0x3dfe25===_0x276d17(0x182))_0x339721=_0x276d17(0x18f)+_0x366372+'\x22';else _0x3dfe25===_0x276d17(0x180)?_0x339721=_0x276d17(0x183)+_0x366372+'\x22':_0x339721='xdg-open\x20\x22'+_0x366372+'\x22';exec(_0x339721,_0x3d2003=>{_0x3d2003?_0x52fc0f(![]):_0x52fc0f(!![]);});});}function a17_0x5c99(){const _0x4355ee=['end','🌐\x20正在尝试自动打开浏览器...','📍\x20登录地址:','https://g.yuntooai.com/cert/lovrabet-dev.json','17055JUiOMh','catch','session','start\x20\x22\x22\x20\x22','/sign-in?redirect=','headers','user','text/html;\x20charset=utf-8','isAuth','then','utf-8','silent','<!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>','16770LZsSeH','listen','149598PBeXeS','error','180uatvom','cookie','1288EMmCPu','log','⚠️\x20\x20无法自动打开浏览器','address','4711223hrgfQx','🔐\x20正在启动登录服务...','json','🔗\x20请手动复制登录地址到浏览器:','1064936FCaEpG','20IKmMcq','203gjNcnY','Auth\x20server\x20error:','object','darwin','writeHead','win32','open\x20\x22','https://dev.lovrabet.com:','close','1101375cGSyUJ','17568KBEjTk'];a17_0x5c99=function(){return _0x4355ee;};return a17_0x5c99();}if(import.meta['main']){const isAuth=await authServer();console[a17_0x222196(0x1a0)](a17_0x222196(0x194),isAuth);}
1
+ function a17_0x2277(_0x57c0b2,_0x194795){const _0xfafba8=a17_0xfafb();return a17_0x2277=function(_0x2277c6,_0x41c053){_0x2277c6=_0x2277c6-0xcf;let _0x278f7e=_0xfafba8[_0x2277c6];return _0x278f7e;},a17_0x2277(_0x57c0b2,_0x194795);}const a17_0x596cc6=a17_0x2277;function a17_0xfafb(){const _0x38be61=['utf-8','address','⚠️\x20\x20无法自动打开浏览器','xdg-open\x20\x22','12tlLmrf','11170WOSuQC','🔐\x20正在启动登录服务...','1804134xiVEQa','end','isAuth','catch','3000LfmEjh','🔗\x20请手动复制登录地址到浏览器:','/api/auth/get-session','10clpUSs','2289SbQxro','then','text/html;\x20charset=utf-8','start\x20\x22\x22\x20\x22','<!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>','darwin','11638128aOYmxs','log','port','json','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','2878843Miqela','silent','https://dev.lovrabet.com:','66uLvPly','win32','Auth\x20server\x20error:','main','object','platform','49304NClPtS','createServer','https://g.yuntooai.com/cert/lovrabet-dev.json','cookie','10170LiolhR','error','✅\x20浏览器已自动打开,请在浏览器中完成登录','📍\x20登录地址:','977655MwPXUd','listen'];a17_0xfafb=function(){return _0x38be61;};return a17_0xfafb();}(function(_0x5b5430,_0x1ec176){const _0x3f65ae=a17_0x2277,_0x48f905=_0x5b5430();while(!![]){try{const _0x56a7e3=-parseInt(_0x3f65ae(0xd8))/0x1+-parseInt(_0x3f65ae(0xdc))/0x2*(-parseInt(_0x3f65ae(0xe0))/0x3)+-parseInt(_0x3f65ae(0xf4))/0x4*(parseInt(_0x3f65ae(0xdf))/0x5)+parseInt(_0x3f65ae(0xee))/0x6*(parseInt(_0x3f65ae(0xcf))/0x7)+-parseInt(_0x3f65ae(0xe6))/0x8+parseInt(_0x3f65ae(0xf8))/0x9*(parseInt(_0x3f65ae(0xd6))/0xa)+-parseInt(_0x3f65ae(0xeb))/0xb*(-parseInt(_0x3f65ae(0xd5))/0xc);if(_0x56a7e3===_0x1ec176)break;else _0x48f905['push'](_0x48f905['shift']());}catch(_0x29b671){_0x48f905['push'](_0x48f905['shift']());}}}(a17_0xfafb,0xe0e62));import{writeFileSync}from'node:fs';import a17_0x10a569 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x4c3b6d){const _0x4b3e88=a17_0x2277,_0x392576=_0x4c3b6d?.[_0x4b3e88(0xec)]||![];if(await getIsSessionValid())return!![];const _0x1b74b9=await(await fetch(_0x4b3e88(0xf6)))[_0x4b3e88(0xe9)]();return new Promise(async(_0x39fe22,_0x19f13c)=>{const _0x3c26b1=_0x4b3e88;let _0x58ca2d=0x0;const _0x4c36ed=a17_0x10a569[_0x3c26b1(0xf5)](_0x1b74b9,async(_0x2f2efe,_0x313066)=>{const _0x26a6c4=_0x3c26b1,_0x12ffb5=getUserDomain(),_0x238b18=_0x2f2efe['headers'][_0x26a6c4(0xf7)]||'',_0x399174=await fetch(_0x12ffb5+_0x26a6c4(0xde),{'headers':{'cookie':_0x238b18}})[_0x26a6c4(0xe1)](_0x3e27fd=>_0x3e27fd[_0x26a6c4(0xe9)]()),_0x521db3=_0x399174&&_0x399174['session']&&_0x399174['user'];if(_0x521db3){writeFileSync(cookieFile,_0x238b18,_0x26a6c4(0xd1)),_0x39fe22(!![]);const _0x434fc7=_0x26a6c4(0xe4);_0x313066['writeHead'](0xc8,{'Content-Type':_0x26a6c4(0xe2)}),_0x313066[_0x26a6c4(0xd9)](_0x434fc7),_0x4c36ed['close']();}else{const _0x530036=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x58ca2d);_0x313066['writeHead'](0x12e,{'location':_0x12ffb5+'/sign-in?redirect='+_0x530036}),_0x313066['end']();return;}});_0x4c36ed[_0x3c26b1(0xd0)](0x0,'127.0.0.1',()=>{const _0x3ecbbe=_0x3c26b1,_0x2209ba=_0x4c36ed[_0x3ecbbe(0xd2)]();_0x58ca2d=typeof _0x2209ba===_0x3ecbbe(0xf2)&&_0x2209ba?_0x2209ba[_0x3ecbbe(0xe8)]:Number(_0x2209ba);const _0x3eebd1=_0x3ecbbe(0xed)+_0x58ca2d;!_0x392576&&(console[_0x3ecbbe(0xe7)](_0x3ecbbe(0xd7)),console[_0x3ecbbe(0xe7)](_0x3ecbbe(0xfb),_0x3eebd1),console['log']('🌐\x20正在尝试自动打开浏览器...'),console['log'](''),console[_0x3ecbbe(0xe7)](_0x3ecbbe(0xea)),console[_0x3ecbbe(0xe7)]('')),openInBrowser(_0x3eebd1)['then'](_0x519afa=>{const _0x23c9ac=_0x3ecbbe;!_0x392576&&(_0x519afa?console[_0x23c9ac(0xe7)](_0x23c9ac(0xfa)):(console[_0x23c9ac(0xe7)](_0x23c9ac(0xd3)),console[_0x23c9ac(0xe7)](_0x23c9ac(0xdd),_0x3eebd1)),console[_0x23c9ac(0xe7)](''));})[_0x3ecbbe(0xdb)](()=>{const _0x19e1f7=_0x3ecbbe;!_0x392576&&(console[_0x19e1f7(0xe7)](_0x19e1f7(0xd3)),console[_0x19e1f7(0xe7)](_0x19e1f7(0xdd),_0x3eebd1),console['log'](''));});}),_0x4c36ed['on'](_0x3c26b1(0xf9),_0xef10b7=>{const _0x21a79b=_0x3c26b1;!_0x392576&&console[_0x21a79b(0xf9)](_0x21a79b(0xf0),_0xef10b7),_0x19f13c(_0xef10b7);});});}function openInBrowser(_0x2ab3d8){return new Promise(_0x210250=>{const _0x469899=a17_0x2277,_0x44b21e=process[_0x469899(0xf3)];let _0x2065c4;if(_0x44b21e===_0x469899(0xef))_0x2065c4=_0x469899(0xe3)+_0x2ab3d8+'\x22';else _0x44b21e===_0x469899(0xe5)?_0x2065c4='open\x20\x22'+_0x2ab3d8+'\x22':_0x2065c4=_0x469899(0xd4)+_0x2ab3d8+'\x22';exec(_0x2065c4,_0x261a1e=>{_0x261a1e?_0x210250(![]):_0x210250(!![]);});});}if(import.meta[a17_0x596cc6(0xf1)]){const isAuth=await authServer();console[a17_0x596cc6(0xe7)](a17_0x596cc6(0xda),isAuth);}
@@ -1 +1 @@
1
- const a18_0x54bb8c=a18_0x1709;function a18_0x29a6(){const _0x3e2ba5=['96556kAFulI','1415886aNJCZi','1057tClxnM','/.lovrabet','42UarvrW','1Lqilkp','11eDBfuS','/cookie','13024EIIAVj','4332924aDBBeb','7728170xiCSwN','299795DCupyd','661884rrXyqS'];a18_0x29a6=function(){return _0x3e2ba5;};return a18_0x29a6();}(function(_0x160bd8,_0x498d62){const _0x43f3f0=a18_0x1709,_0xdf9d86=_0x160bd8();while(!![]){try{const _0x2b45e5=parseInt(_0x43f3f0(0x1da))/0x1*(parseInt(_0x43f3f0(0x1d5))/0x2)+parseInt(_0x43f3f0(0x1d6))/0x3+-parseInt(_0x43f3f0(0x1d4))/0x4+parseInt(_0x43f3f0(0x1d3))/0x5*(-parseInt(_0x43f3f0(0x1d9))/0x6)+-parseInt(_0x43f3f0(0x1d7))/0x7*(-parseInt(_0x43f3f0(0x1dd))/0x8)+-parseInt(_0x43f3f0(0x1de))/0x9+parseInt(_0x43f3f0(0x1df))/0xa*(parseInt(_0x43f3f0(0x1db))/0xb);if(_0x2b45e5===_0x498d62)break;else _0xdf9d86['push'](_0xdf9d86['shift']());}catch(_0x5172b1){_0xdf9d86['push'](_0xdf9d86['shift']());}}}(a18_0x29a6,0x734c9));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a18_0x54bb8c(0x1d8);export const cookieFile=configDir+a18_0x54bb8c(0x1dc);function a18_0x1709(_0x5d829b,_0x4efd54){const _0x29a64e=a18_0x29a6();return a18_0x1709=function(_0x1709cc,_0x5858b8){_0x1709cc=_0x1709cc-0x1d3;let _0x105766=_0x29a64e[_0x1709cc];return _0x105766;},a18_0x1709(_0x5d829b,_0x4efd54);}mkdirSync(configDir,{'recursive':!![]});
1
+ function a18_0x16a7(_0x2f88fe,_0x363040){const _0x3e762e=a18_0x3e76();return a18_0x16a7=function(_0x16a718,_0x11e127){_0x16a718=_0x16a718-0x1c7;let _0x421591=_0x3e762e[_0x16a718];return _0x421591;},a18_0x16a7(_0x2f88fe,_0x363040);}const a18_0x1f3e33=a18_0x16a7;(function(_0x3bd691,_0x468ef0){const _0x308050=a18_0x16a7,_0x131db9=_0x3bd691();while(!![]){try{const _0x11e2cb=-parseInt(_0x308050(0x1d3))/0x1*(parseInt(_0x308050(0x1d2))/0x2)+-parseInt(_0x308050(0x1c7))/0x3+parseInt(_0x308050(0x1c9))/0x4*(parseInt(_0x308050(0x1cc))/0x5)+-parseInt(_0x308050(0x1d4))/0x6*(parseInt(_0x308050(0x1ce))/0x7)+-parseInt(_0x308050(0x1cd))/0x8*(-parseInt(_0x308050(0x1d5))/0x9)+-parseInt(_0x308050(0x1d0))/0xa*(-parseInt(_0x308050(0x1ca))/0xb)+parseInt(_0x308050(0x1cf))/0xc*(parseInt(_0x308050(0x1d1))/0xd);if(_0x11e2cb===_0x468ef0)break;else _0x131db9['push'](_0x131db9['shift']());}catch(_0x288c69){_0x131db9['push'](_0x131db9['shift']());}}}(a18_0x3e76,0xdb1ee));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a18_0x3e76(){const _0x456298=['2040gUousU','192120cWglaI','93977YRZOeq','2BOdlBH','337703gqmFse','1033674gyXxzP','9UFTutG','3575625fxkrzp','/.lovrabet','2826472vYmASq','396ONdbze','/cookie','5YiMsiB','8046952RurtSN','49lPYgsq'];a18_0x3e76=function(){return _0x456298;};return a18_0x3e76();}export const configDir=homedir()+a18_0x1f3e33(0x1c8);export const cookieFile=configDir+a18_0x1f3e33(0x1cb);mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a19_0xcb40(_0x80a051,_0x1a4777){var _0x3652ac=a19_0x3652();return a19_0xcb40=function(_0xcb4056,_0x3d2987){_0xcb4056=_0xcb4056-0x1cd;var _0x61caf0=_0x3652ac[_0xcb4056];return _0x61caf0;},a19_0xcb40(_0x80a051,_0x1a4777);}(function(_0x53fb5a,_0x1c1198){var _0x5bf6d3=a19_0xcb40,_0x2c1e07=_0x53fb5a();while(!![]){try{var _0x2160f8=-parseInt(_0x5bf6d3(0x1ce))/0x1*(-parseInt(_0x5bf6d3(0x1d2))/0x2)+-parseInt(_0x5bf6d3(0x1d1))/0x3*(-parseInt(_0x5bf6d3(0x1d4))/0x4)+-parseInt(_0x5bf6d3(0x1d0))/0x5+-parseInt(_0x5bf6d3(0x1d3))/0x6*(parseInt(_0x5bf6d3(0x1d5))/0x7)+-parseInt(_0x5bf6d3(0x1cf))/0x8+parseInt(_0x5bf6d3(0x1d7))/0x9*(-parseInt(_0x5bf6d3(0x1cd))/0xa)+-parseInt(_0x5bf6d3(0x1d8))/0xb*(-parseInt(_0x5bf6d3(0x1d6))/0xc);if(_0x2160f8===_0x1c1198)break;else _0x2c1e07['push'](_0x2c1e07['shift']());}catch(_0x142275){_0x2c1e07['push'](_0x2c1e07['shift']());}}}(a19_0x3652,0x970ae));import{readFileSync}from'node:fs';function a19_0x3652(){var _0x2c7814=['2002vRotqn','6418308yrKIhq','4INBAPl','7PNMMQy','59523852hCgwko','423ZGSkug','11FqgtQu','utf-8','246110WlDkDH','39bcxhjv','8007880oWaJHd','6117895qHkdpi','210927dNkIyk'];a19_0x3652=function(){return _0x2c7814;};return a19_0x3652();}import{cookieFile}from'./constant.js';export function getCookie(){var _0x550874=a19_0xcb40;try{return readFileSync(cookieFile,_0x550874(0x1d9));}catch{}return'';}
1
+ (function(_0x381f24,_0x4869a6){var _0x4c9460=a19_0x28c1,_0x344431=_0x381f24();while(!![]){try{var _0x574d08=-parseInt(_0x4c9460(0xe6))/0x1+parseInt(_0x4c9460(0xe8))/0x2+-parseInt(_0x4c9460(0xeb))/0x3+parseInt(_0x4c9460(0xec))/0x4+parseInt(_0x4c9460(0xe7))/0x5+-parseInt(_0x4c9460(0xe9))/0x6+parseInt(_0x4c9460(0xea))/0x7;if(_0x574d08===_0x4869a6)break;else _0x344431['push'](_0x344431['shift']());}catch(_0x85d8ff){_0x344431['push'](_0x344431['shift']());}}}(a19_0x5c7a,0x2b41f));import{readFileSync}from'node:fs';function a19_0x5c7a(){var _0x4fb18d=['1122228NeFqqf','302684CcHvvG','769285udnTIE','471928myvfIB','807492tHJtpB','345996pOvIRV','316071PbXboz'];a19_0x5c7a=function(){return _0x4fb18d;};return a19_0x5c7a();}import{cookieFile}from'./constant.js';function a19_0x28c1(_0x5d7724,_0x52ceea){var _0x5c7a03=a19_0x5c7a();return a19_0x28c1=function(_0x28c1e6,_0x2ab79e){_0x28c1e6=_0x28c1e6-0xe6;var _0x4c9096=_0x5c7a03[_0x28c1e6];return _0x4c9096;},a19_0x28c1(_0x5d7724,_0x52ceea);}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x34121a,_0x5a6367){const _0x32c752=a20_0x19e9,_0x23a35c=_0x34121a();while(!![]){try{const _0x5ae1af=-parseInt(_0x32c752(0x112))/0x1+parseInt(_0x32c752(0x10f))/0x2+parseInt(_0x32c752(0x10e))/0x3*(parseInt(_0x32c752(0x10c))/0x4)+-parseInt(_0x32c752(0x111))/0x5*(parseInt(_0x32c752(0x109))/0x6)+parseInt(_0x32c752(0x116))/0x7+parseInt(_0x32c752(0x10d))/0x8*(-parseInt(_0x32c752(0x110))/0x9)+parseInt(_0x32c752(0x10a))/0xa;if(_0x5ae1af===_0x5a6367)break;else _0x23a35c['push'](_0x23a35c['shift']());}catch(_0x24a3f6){_0x23a35c['push'](_0x23a35c['shift']());}}}(a20_0xf253,0x92563));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x3eb295=a20_0x19e9;try{if(!existsSync(cookieFile))return![];const _0x11711a=readFileSync(cookieFile,_0x3eb295(0x108)),_0xd2fcb5=await fetch(getUserDomain()+_0x3eb295(0x10b),{'headers':{'cookie':_0x11711a}})[_0x3eb295(0x114)](_0x2ab908=>_0x2ab908[_0x3eb295(0x113)]());return _0xd2fcb5&&_0xd2fcb5['session']&&_0xd2fcb5[_0x3eb295(0x115)];}catch{}return![];}function a20_0x19e9(_0x37c558,_0xc9951f){const _0xf253e9=a20_0xf253();return a20_0x19e9=function(_0x19e930,_0x547672){_0x19e930=_0x19e930-0x108;let _0x510abf=_0xf253e9[_0x19e930];return _0x510abf;},a20_0x19e9(_0x37c558,_0xc9951f);}function a20_0xf253(){const _0x36d370=['53288hvZWBv','194538MVpHCz','86432UeXIxg','774dJlIaJ','790yJKsIG','133280XKZgrN','json','then','user','33999BWoGCg','utf-8','210GhpENc','1605960PcMVYp','/api/auth/get-session','68iamQHx'];a20_0xf253=function(){return _0x36d370;};return a20_0xf253();}
1
+ function a20_0x3738(_0x4d1c3e,_0xa60d97){const _0x2829a5=a20_0x2829();return a20_0x3738=function(_0x37384d,_0x2e200f){_0x37384d=_0x37384d-0x149;let _0x530f3a=_0x2829a5[_0x37384d];return _0x530f3a;},a20_0x3738(_0x4d1c3e,_0xa60d97);}function a20_0x2829(){const _0x3d041a=['35wPxkCY','4027RIkgMj','12MbdIBK','205Jvcqbn','128442pRTotL','18843VwfGgj','then','136SMjlCN','47130WTOwXJ','216728fyarbn','2097ZYVCBh','utf-8','session','33539316ViYfTU','json','user','159992wgnMvJ'];a20_0x2829=function(){return _0x3d041a;};return a20_0x2829();}(function(_0x4348f4,_0x2c69b4){const _0x2f0a6e=a20_0x3738,_0x5c8056=_0x4348f4();while(!![]){try{const _0x7ef9e2=parseInt(_0x2f0a6e(0x14a))/0x1*(parseInt(_0x2f0a6e(0x150))/0x2)+parseInt(_0x2f0a6e(0x14b))/0x3*(-parseInt(_0x2f0a6e(0x159))/0x4)+parseInt(_0x2f0a6e(0x14c))/0x5*(-parseInt(_0x2f0a6e(0x14d))/0x6)+parseInt(_0x2f0a6e(0x149))/0x7*(-parseInt(_0x2f0a6e(0x152))/0x8)+-parseInt(_0x2f0a6e(0x153))/0x9*(parseInt(_0x2f0a6e(0x151))/0xa)+parseInt(_0x2f0a6e(0x14e))/0xb+parseInt(_0x2f0a6e(0x156))/0xc;if(_0x7ef9e2===_0x2c69b4)break;else _0x5c8056['push'](_0x5c8056['shift']());}catch(_0x1737c1){_0x5c8056['push'](_0x5c8056['shift']());}}}(a20_0x2829,0xc31fd));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xb99714=a20_0x3738;try{if(!existsSync(cookieFile))return![];const _0x3c60aa=readFileSync(cookieFile,_0xb99714(0x154)),_0x1d350d=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x3c60aa}})[_0xb99714(0x14f)](_0x4fdba8=>_0x4fdba8[_0xb99714(0x157)]());return _0x1d350d&&_0x1d350d[_0xb99714(0x155)]&&_0x1d350d[_0xb99714(0x158)];}catch{}return![];}
@@ -1 +1 @@
1
- function a21_0x5e7b(_0x44b729,_0x249a5e){var _0x15833a=a21_0x1583();return a21_0x5e7b=function(_0x5e7b89,_0xdf2fdf){_0x5e7b89=_0x5e7b89-0x164;var _0x51eb5e=_0x15833a[_0x5e7b89];return _0x51eb5e;},a21_0x5e7b(_0x44b729,_0x249a5e);}(function(_0x3c9052,_0x4e2fa0){var _0x352913=a21_0x5e7b,_0x3cb36e=_0x3c9052();while(!![]){try{var _0x386b5c=-parseInt(_0x352913(0x16c))/0x1*(-parseInt(_0x352913(0x16e))/0x2)+parseInt(_0x352913(0x167))/0x3*(parseInt(_0x352913(0x16b))/0x4)+parseInt(_0x352913(0x169))/0x5+-parseInt(_0x352913(0x166))/0x6+parseInt(_0x352913(0x164))/0x7+parseInt(_0x352913(0x168))/0x8+-parseInt(_0x352913(0x170))/0x9*(parseInt(_0x352913(0x16a))/0xa);if(_0x386b5c===_0x4e2fa0)break;else _0x3cb36e['push'](_0x3cb36e['shift']());}catch(_0x4c098d){_0x3cb36e['push'](_0x3cb36e['shift']());}}}(a21_0x1583,0xe743e));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a21_0x1583(){var _0x137a1b=['!\x20当前未登录','10LQXtiE','log','13410npqUSt','4720933JnVMOd','✓\x20已退出登录','1082634wQeCeP','23421QkbzWT','5492776FBDLWN','7433055jrpJMA','28660YAqFSn','628bDyudf','264943eHmOCK'];a21_0x1583=function(){return _0x137a1b;};return a21_0x1583();}export function logout(){var _0x3d5b97=a21_0x5e7b;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3d5b97(0x16f)](_0x3d5b97(0x165))):console[_0x3d5b97(0x16f)](_0x3d5b97(0x16d));}
1
+ function a21_0x15f3(){var _0x132f91=['33hBLptm','70FJudUT','1242550eSCFuN','log','4ORkFfK','!\x20当前未登录','2833299LyOUmL','646104lJoBty','3344421blAaPu','4oTXwcH','6844472WnrDVN','✓\x20已退出登录','2198590lKULWT','34301XEXkWJ'];a21_0x15f3=function(){return _0x132f91;};return a21_0x15f3();}function a21_0x263c(_0x4e1cf2,_0x1872aa){var _0x15f313=a21_0x15f3();return a21_0x263c=function(_0x263c34,_0x2ddf43){_0x263c34=_0x263c34-0xe5;var _0x104488=_0x15f313[_0x263c34];return _0x104488;},a21_0x263c(_0x4e1cf2,_0x1872aa);}(function(_0x4a7956,_0x3611ad){var _0x4bef5e=a21_0x263c,_0x178b5d=_0x4a7956();while(!![]){try{var _0x3baca6=-parseInt(_0x4bef5e(0xe8))/0x1*(-parseInt(_0x4bef5e(0xf2))/0x2)+-parseInt(_0x4bef5e(0xf1))/0x3*(-parseInt(_0x4bef5e(0xed))/0x4)+-parseInt(_0x4bef5e(0xe7))/0x5+parseInt(_0x4bef5e(0xf0))/0x6*(-parseInt(_0x4bef5e(0xea))/0x7)+parseInt(_0x4bef5e(0xe5))/0x8+-parseInt(_0x4bef5e(0xef))/0x9+-parseInt(_0x4bef5e(0xeb))/0xa*(-parseInt(_0x4bef5e(0xe9))/0xb);if(_0x3baca6===_0x3611ad)break;else _0x178b5d['push'](_0x178b5d['shift']());}catch(_0x2c3219){_0x178b5d['push'](_0x178b5d['shift']());}}}(a21_0x15f3,0x8db0c));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x544a4a=a21_0x263c;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x544a4a(0xec)](_0x544a4a(0xe6))):console[_0x544a4a(0xec)](_0x544a4a(0xee));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a22_0x3bd3(){const _0x1fffb5=['preview','1OxhhrB','exit','8VXzudT','menu-sync','watch','input','all','277070mWkwUh','1750938xaKDHE','init','env','page','build','执行预览命令','11458832wBtLja','279dXsqAE','info','setRawCommand','start','3184848gkmSDI','join','\x20(监听模式)','auth','667620RaRvQj','cwd','argv','trim','string','setLogPath','flags','api','执行启动命令','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','boolean','slice','logs','执行构建命令','error','35HGKVyD','mcp','2518467wVPSDF','config','add-page','1005362PhxSyy','appcode'];a22_0x3bd3=function(){return _0x1fffb5;};return a22_0x3bd3();}const a22_0x5451de=a22_0x2e2d;(function(_0x319d4d,_0xa1d880){const _0x5935b3=a22_0x2e2d,_0x57e4c6=_0x319d4d();while(!![]){try{const _0x40b9a8=parseInt(_0x5935b3(0x138))/0x1*(parseInt(_0x5935b3(0x163))/0x2)+-parseInt(_0x5935b3(0x160))/0x3+parseInt(_0x5935b3(0x13a))/0x4*(parseInt(_0x5935b3(0x14f))/0x5)+parseInt(_0x5935b3(0x140))/0x6*(-parseInt(_0x5935b3(0x15e))/0x7)+parseInt(_0x5935b3(0x14b))/0x8+-parseInt(_0x5935b3(0x147))/0x9*(-parseInt(_0x5935b3(0x13f))/0xa)+parseInt(_0x5935b3(0x146))/0xb;if(_0x40b9a8===_0xa1d880)break;else _0x57e4c6['push'](_0x57e4c6['shift']());}catch(_0x10b57d){_0x57e4c6['push'](_0x57e4c6['shift']());}}}(a22_0x3bd3,0xbbf44));import{jsx as a22_0x1e48f4}from'react/jsx-runtime';import a22_0x5ecd1a from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/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';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';const cli=a22_0x5ecd1a(a22_0x5451de(0x158),{'importMeta':import.meta,'flags':{'name':{'type':a22_0x5451de(0x153)},'clear':{'type':a22_0x5451de(0x159)},'env':{'type':a22_0x5451de(0x153)},'watch':{'type':'boolean'},'help':{'type':a22_0x5451de(0x159)},'appcode':{'type':a22_0x5451de(0x153)},'output':{'type':'string'},'params':{'type':a22_0x5451de(0x153)},'datasetcode':{'type':a22_0x5451de(0x153)}}});function a22_0x2e2d(_0x443db2,_0x4b659a){const _0x3bd30d=a22_0x3bd3();return a22_0x2e2d=function(_0x2e2d4f,_0x2c4eec){_0x2e2d4f=_0x2e2d4f-0x137;let _0x27cbe1=_0x3bd30d[_0x2e2d4f];return _0x27cbe1;},a22_0x2e2d(_0x443db2,_0x4b659a);}await run();async function run(){const _0x16ef5d=a22_0x5451de,_0x126eb8=cli[_0x16ef5d(0x13d)][0x0],_0x2b8a37=('lovrabet\x20'+process[_0x16ef5d(0x151)][_0x16ef5d(0x15a)](0x2)[_0x16ef5d(0x14c)]('\x20'))[_0x16ef5d(0x152)]();logger[_0x16ef5d(0x149)](_0x2b8a37);switch(_0x126eb8){case'init':{const _0x2c6b30=cli['flags'][_0x16ef5d(0x164)],_0x33e806=cli[_0x16ef5d(0x155)][_0x16ef5d(0x142)];logger['setLogPath'](process['cwd']()),logger[_0x16ef5d(0x148)](_0x16ef5d(0x141),'执行初始化配置命令'),render(a22_0x1e48f4(Init,{'appcode':_0x2c6b30,'env':_0x33e806}));break;}case'create':{const _0x427de6=cli[_0x16ef5d(0x13d)][0x1]?.['trim'](),_0x27664f=cli['flags'][_0x16ef5d(0x142)];render(a22_0x1e48f4(CreateApp,{'projectCode':_0x427de6,'env':_0x27664f}));break;}case'add':{cli[_0x16ef5d(0x13d)][0x1]===_0x16ef5d(0x143)&&(logger[_0x16ef5d(0x154)](process[_0x16ef5d(0x150)]()),logger[_0x16ef5d(0x148)](_0x16ef5d(0x162),'执行添加页面命令'),render(a22_0x1e48f4(AddPage,{})));break;}case _0x16ef5d(0x14a):{try{logger[_0x16ef5d(0x154)](process[_0x16ef5d(0x150)]()),logger[_0x16ef5d(0x148)](_0x16ef5d(0x14a),_0x16ef5d(0x157)),await runStart();}catch(_0x203244){console[_0x16ef5d(0x15d)](_0x203244),process[_0x16ef5d(0x139)](0x1);}break;}case _0x16ef5d(0x144):{try{logger[_0x16ef5d(0x154)](process[_0x16ef5d(0x150)]()),logger[_0x16ef5d(0x148)](_0x16ef5d(0x144),_0x16ef5d(0x15c)),await runBuild();}catch(_0x4f3d7f){console[_0x16ef5d(0x15d)](_0x4f3d7f),process['exit'](0x1);}break;}case _0x16ef5d(0x137):{const _0x545ddc=cli[_0x16ef5d(0x155)][_0x16ef5d(0x13c)];logger[_0x16ef5d(0x154)](process['cwd']()),logger[_0x16ef5d(0x148)](_0x16ef5d(0x137),_0x16ef5d(0x145)+(_0x545ddc?_0x16ef5d(0x14d):''));if(_0x545ddc)try{await Promise[_0x16ef5d(0x13e)]([runBuildWatch(),runPreview()]);}catch(_0x4efa4d){console[_0x16ef5d(0x15d)](_0x4efa4d),process['exit'](0x1);}else try{await runPreview();}catch(_0x4e4561){console['error'](_0x4e4561),process[_0x16ef5d(0x139)](0x1);}break;}case _0x16ef5d(0x161):{render(a22_0x1e48f4(Config,{'cli':cli}));break;}case _0x16ef5d(0x156):{await apiCli(cli);break;}case _0x16ef5d(0x14e):{render(a22_0x1e48f4(AuthServer,{}));break;}case'menu':{const _0x18db53=cli['input'][0x1];_0x18db53==='sync'&&(logger['setLogPath'](process['cwd']()),logger['info'](_0x16ef5d(0x13b),'执行菜单同步命令'),render(a22_0x1e48f4(AppMenuSyncUI,{})));break;}case'logout':{logout();break;}case _0x16ef5d(0x15f):{const _0x28fbe3=cli[_0x16ef5d(0x13d)][0x1];await mcpCommand(_0x28fbe3);break;}case _0x16ef5d(0x15b):{cli['flags']['clear']?clearLogs():showLogs();break;}default:render(a22_0x1e48f4(Help,{}));break;}}
2
+ const a22_0x513864=a22_0x5009;function a22_0x5009(_0x735f54,_0x480586){const _0x27919b=a22_0x2791();return a22_0x5009=function(_0x500917,_0x4d2bc6){_0x500917=_0x500917-0x76;let _0x10b410=_0x27919b[_0x500917];return _0x10b410;},a22_0x5009(_0x735f54,_0x480586);}(function(_0x439cf8,_0x482424){const _0xce89a2=a22_0x5009,_0x55d7bf=_0x439cf8();while(!![]){try{const _0x14678e=parseInt(_0xce89a2(0x79))/0x1*(parseInt(_0xce89a2(0xa6))/0x2)+parseInt(_0xce89a2(0x90))/0x3*(parseInt(_0xce89a2(0x91))/0x4)+parseInt(_0xce89a2(0x78))/0x5+parseInt(_0xce89a2(0x8f))/0x6*(parseInt(_0xce89a2(0x85))/0x7)+-parseInt(_0xce89a2(0x9f))/0x8*(parseInt(_0xce89a2(0x95))/0x9)+-parseInt(_0xce89a2(0x94))/0xa*(parseInt(_0xce89a2(0x89))/0xb)+-parseInt(_0xce89a2(0xa1))/0xc*(parseInt(_0xce89a2(0x93))/0xd);if(_0x14678e===_0x482424)break;else _0x55d7bf['push'](_0x55d7bf['shift']());}catch(_0x39d89c){_0x55d7bf['push'](_0x55d7bf['shift']());}}}(a22_0x2791,0xb957a));import{jsx as a22_0x41e98e}from'react/jsx-runtime';import a22_0x15d26c from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/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';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';function a22_0x2791(){const _0x402fd8=['cwd','menu','logout','执行添加页面命令','12kiWgSN','105HnFJhX','56020JiGibF','env','347880VoGJHp','50VsORAR','5098509vFrwaO','执行菜单同步命令','exit','sync','build','input','appcode','flags','slice','执行预览命令','16bBKkzZ','menu-sync','300rwzDed','执行构建命令','join','start','add','534ToCgsn','auth','trim','setLogPath','error','lovrabet\x20','6498290joTpOA','534jMbgBD','执行初始化配置命令','init','preview','mcp','执行启动命令','add-page','info','clear','boolean','create','config','4812178SxRePD','string','api','\x20(监听模式)','1641541NBUdhT','all'];a22_0x2791=function(){return _0x402fd8;};return a22_0x2791();}import{mcpCommand}from'./mcp/main.js';const cli=a22_0x15d26c('\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a',{'importMeta':import.meta,'flags':{'name':{'type':a22_0x513864(0x86)},'clear':{'type':'boolean'},'env':{'type':a22_0x513864(0x86)},'watch':{'type':a22_0x513864(0x82)},'help':{'type':a22_0x513864(0x82)},'appcode':{'type':a22_0x513864(0x86)},'output':{'type':'string'},'params':{'type':'string'},'datasetcode':{'type':a22_0x513864(0x86)}}});await run();async function run(){const _0x3355e7=a22_0x513864,_0x219f80=cli['input'][0x0],_0x47e8d2=(_0x3355e7(0x77)+process['argv'][_0x3355e7(0x9d)](0x2)[_0x3355e7(0xa3)]('\x20'))['trim']();logger['setRawCommand'](_0x47e8d2);switch(_0x219f80){case _0x3355e7(0x7b):{const _0x23ed1e=cli[_0x3355e7(0x9c)][_0x3355e7(0x9b)],_0x5390e7=cli[_0x3355e7(0x9c)][_0x3355e7(0x92)];logger[_0x3355e7(0xa9)](process['cwd']()),logger[_0x3355e7(0x80)](_0x3355e7(0x7b),_0x3355e7(0x7a)),render(a22_0x41e98e(Init,{'appcode':_0x23ed1e,'env':_0x5390e7}));break;}case _0x3355e7(0x83):{const _0x40e663=cli[_0x3355e7(0x9a)][0x1]?.[_0x3355e7(0xa8)](),_0xf0ee2a=cli[_0x3355e7(0x9c)][_0x3355e7(0x92)];render(a22_0x41e98e(CreateApp,{'projectCode':_0x40e663,'env':_0xf0ee2a}));break;}case _0x3355e7(0xa5):{cli[_0x3355e7(0x9a)][0x1]==='page'&&(logger[_0x3355e7(0xa9)](process['cwd']()),logger['info'](_0x3355e7(0x7f),_0x3355e7(0x8e)),render(a22_0x41e98e(AddPage,{})));break;}case _0x3355e7(0xa4):{try{logger[_0x3355e7(0xa9)](process[_0x3355e7(0x8b)]()),logger[_0x3355e7(0x80)]('start',_0x3355e7(0x7e)),await runStart();}catch(_0x560ccc){console['error'](_0x560ccc),process[_0x3355e7(0x97)](0x1);}break;}case _0x3355e7(0x99):{try{logger[_0x3355e7(0xa9)](process[_0x3355e7(0x8b)]()),logger[_0x3355e7(0x80)]('build',_0x3355e7(0xa2)),await runBuild();}catch(_0xa47685){console['error'](_0xa47685),process['exit'](0x1);}break;}case _0x3355e7(0x7c):{const _0x1a9aab=cli[_0x3355e7(0x9c)]['watch'];logger[_0x3355e7(0xa9)](process[_0x3355e7(0x8b)]()),logger[_0x3355e7(0x80)]('preview',_0x3355e7(0x9e)+(_0x1a9aab?_0x3355e7(0x88):''));if(_0x1a9aab)try{await Promise[_0x3355e7(0x8a)]([runBuildWatch(),runPreview()]);}catch(_0x3bc002){console[_0x3355e7(0x76)](_0x3bc002),process[_0x3355e7(0x97)](0x1);}else try{await runPreview();}catch(_0x2730cd){console[_0x3355e7(0x76)](_0x2730cd),process[_0x3355e7(0x97)](0x1);}break;}case _0x3355e7(0x84):{render(a22_0x41e98e(Config,{'cli':cli}));break;}case _0x3355e7(0x87):{await apiCli(cli);break;}case _0x3355e7(0xa7):{render(a22_0x41e98e(AuthServer,{}));break;}case _0x3355e7(0x8c):{const _0x6d3158=cli[_0x3355e7(0x9a)][0x1];_0x6d3158===_0x3355e7(0x98)&&(logger[_0x3355e7(0xa9)](process['cwd']()),logger[_0x3355e7(0x80)](_0x3355e7(0xa0),_0x3355e7(0x96)),render(a22_0x41e98e(AppMenuSyncUI,{})));break;}case _0x3355e7(0x8d):{logout();break;}case _0x3355e7(0x7d):{const _0x39f0ff=cli[_0x3355e7(0x9a)][0x1];await mcpCommand(_0x39f0ff);break;}case'logs':{cli['flags'][_0x3355e7(0x81)]?clearLogs():showLogs();break;}default:render(a22_0x41e98e(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x1d7e33,_0x1772e5){const _0xdee5b4=a23_0x2d46,_0x2e1d9f=_0x1d7e33();while(!![]){try{const _0x540f82=-parseInt(_0xdee5b4(0x1bc))/0x1+-parseInt(_0xdee5b4(0x1b8))/0x2+-parseInt(_0xdee5b4(0x1b5))/0x3+-parseInt(_0xdee5b4(0x1b0))/0x4+-parseInt(_0xdee5b4(0x1b1))/0x5*(-parseInt(_0xdee5b4(0x1af))/0x6)+-parseInt(_0xdee5b4(0x1b4))/0x7+parseInt(_0xdee5b4(0x1ad))/0x8;if(_0x540f82===_0x1772e5)break;else _0x2e1d9f['push'](_0x2e1d9f['shift']());}catch(_0x4e68e2){_0x2e1d9f['push'](_0x2e1d9f['shift']());}}}(a23_0x33e2,0x770ab));function a23_0x33e2(){const _0x16cc94=['.bin','vite','error','22856lNfwcF','PATH','17006520kCaVPb','build','19938rsPJCs','1660556MoolxQ','940RnqwhK','node_modules','env','5548172YyHTHB','1460538ioktMh','--watch','cwd','1091014RBJLyD'];a23_0x33e2=function(){return _0x16cc94;};return a23_0x33e2();}function a23_0x2d46(_0x51662d,_0xd087e4){const _0x33e2be=a23_0x33e2();return a23_0x2d46=function(_0x2d46f9,_0x9256b1){_0x2d46f9=_0x2d46f9-0x1ad;let _0x35a690=_0x33e2be[_0x2d46f9];return _0x35a690;},a23_0x2d46(_0x51662d,_0xd087e4);}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x2f6b34,_0x5833fc)=>{const _0x267efa=a23_0x2d46,_0x3f9b6a=spawn(_0x267efa(0x1ba),[_0x267efa(0x1ae),_0x267efa(0x1b6)],{'stdio':'inherit','shell':!![],'env':{...process[_0x267efa(0x1b3)],'PATH':''+join(process[_0x267efa(0x1b7)](),_0x267efa(0x1b2),_0x267efa(0x1b9))+delimiter+process[_0x267efa(0x1b3)][_0x267efa(0x1bd)]}});_0x3f9b6a['on']('close',_0x12fdaa=>{if(_0x12fdaa===0x0||_0x12fdaa===null)_0x2f6b34();else _0x5833fc(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x12fdaa));}),_0x3f9b6a['on'](_0x267efa(0x1bb),_0x5833fc);});}
1
+ (function(_0x17dce7,_0x51b0e0){const _0x3512be=a23_0x2ff1,_0x355ea1=_0x17dce7();while(!![]){try{const _0x7c73ec=-parseInt(_0x3512be(0xdf))/0x1*(-parseInt(_0x3512be(0xe3))/0x2)+-parseInt(_0x3512be(0xdd))/0x3+-parseInt(_0x3512be(0xe4))/0x4+-parseInt(_0x3512be(0xdb))/0x5+-parseInt(_0x3512be(0xe5))/0x6+parseInt(_0x3512be(0xe1))/0x7*(parseInt(_0x3512be(0xd9))/0x8)+-parseInt(_0x3512be(0xd5))/0x9;if(_0x7c73ec===_0x51b0e0)break;else _0x355ea1['push'](_0x355ea1['shift']());}catch(_0x1a4f14){_0x355ea1['push'](_0x355ea1['shift']());}}}(a23_0x3111,0x5cac4));function a23_0x2ff1(_0x30272e,_0x10d090){const _0x3111cd=a23_0x3111();return a23_0x2ff1=function(_0x2ff1b9,_0x399262){_0x2ff1b9=_0x2ff1b9-0xd5;let _0x5738f7=_0x3111cd[_0x2ff1b9];return _0x5738f7;},a23_0x2ff1(_0x30272e,_0x10d090);}import{spawn}from'node:child_process';function a23_0x3111(){const _0x362d16=['476253swMZBk','vite','4368266SKblpg','inherit','2uCsgdL','821916sYiJyP','1370688hiBpdA','1196118WlctGv','env','close','build','8dOgSzl','PATH','624820tntjpp','cwd','86730pXMYXN','npm\x20run\x20build\x20exited\x20with\x20code\x20'];a23_0x3111=function(){return _0x362d16;};return a23_0x3111();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x356145,_0x422844)=>{const _0x69c893=a23_0x2ff1,_0x158f66=spawn(_0x69c893(0xe0),[_0x69c893(0xd8),'--watch'],{'stdio':_0x69c893(0xe2),'shell':!![],'env':{...process[_0x69c893(0xd6)],'PATH':''+join(process[_0x69c893(0xdc)](),'node_modules','.bin')+delimiter+process[_0x69c893(0xd6)][_0x69c893(0xda)]}});_0x158f66['on'](_0x69c893(0xd7),_0x99d022=>{const _0x328a04=_0x69c893;if(_0x99d022===0x0||_0x99d022===null)_0x356145();else _0x422844(new Error(_0x328a04(0xde)+_0x99d022));}),_0x158f66['on']('error',_0x422844);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3fe083,_0x5bc9d1){const _0x519438=a24_0x16f2,_0x356bf8=_0x3fe083();while(!![]){try{const _0x4f6e0f=-parseInt(_0x519438(0x118))/0x1+-parseInt(_0x519438(0x122))/0x2+parseInt(_0x519438(0x128))/0x3*(-parseInt(_0x519438(0x121))/0x4)+parseInt(_0x519438(0x126))/0x5*(-parseInt(_0x519438(0x11a))/0x6)+parseInt(_0x519438(0x11c))/0x7+-parseInt(_0x519438(0x11e))/0x8+-parseInt(_0x519438(0x112))/0x9*(-parseInt(_0x519438(0x12a))/0xa);if(_0x4f6e0f===_0x5bc9d1)break;else _0x356bf8['push'](_0x356bf8['shift']());}catch(_0x41bd32){_0x356bf8['push'](_0x356bf8['shift']());}}}(a24_0x5579,0x69f48));import{delimiter,join}from'node:path';function a24_0x16f2(_0x164d98,_0x26d2c2){const _0x557923=a24_0x5579();return a24_0x16f2=function(_0x16f2a1,_0x405c65){_0x16f2a1=_0x16f2a1-0x10d;let _0x3adb91=_0x557923[_0x16f2a1];return _0x3adb91;},a24_0x16f2(_0x164d98,_0x26d2c2);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x38dc1d,_0x4fd335)=>{const _0x505f00=a24_0x16f2,_0x31acca=Date['now']();logger[_0x505f00(0x117)](_0x505f00(0x11d),_0x505f00(0x111),{'command':_0x505f00(0x119)});let _0x42f14f='';const _0x142f75=spawn('npm',['run',_0x505f00(0x11d)],{'stdio':[_0x505f00(0x114),'inherit',_0x505f00(0x11f)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x505f00(0x10d)](),_0x505f00(0x10e),'.bin')+delimiter+process[_0x505f00(0x129)]['PATH']}});_0x142f75[_0x505f00(0x116)]?.['on'](_0x505f00(0x10f),_0x2a606e=>{const _0x2dfc12=_0x505f00;_0x42f14f+=_0x2a606e[_0x2dfc12(0x113)]();}),_0x142f75['on'](_0x505f00(0x120),_0xec5726=>{const _0x11fb3b=_0x505f00,_0x266a66=Date['now']()-_0x31acca;if(_0xec5726===0x0||_0xec5726===null)logger['success']('build',_0x11fb3b(0x125),_0x266a66),_0x38dc1d();else{const _0x6f3ac7={'exitCode':_0xec5726,'duration':_0x266a66,'command':_0x11fb3b(0x119),'cwd':process[_0x11fb3b(0x10d)]()};_0x42f14f[_0x11fb3b(0x123)]()&&(_0x6f3ac7[_0x11fb3b(0x116)]=_0x42f14f[_0x11fb3b(0x123)]()),logger[_0x11fb3b(0x11b)]('build',_0x11fb3b(0x124),_0x6f3ac7),_0x4fd335(new Error(_0x11fb3b(0x115)+_0xec5726));}}),_0x142f75['on'](_0x505f00(0x11b),_0x47d3ad=>{const _0x3cef52=_0x505f00,_0x443bed=Date[_0x3cef52(0x127)]()-_0x31acca;logger[_0x3cef52(0x11b)](_0x3cef52(0x11d),_0x3cef52(0x110),{'error':_0x47d3ad[_0x3cef52(0x12b)],'duration':_0x443bed,'stderr':_0x42f14f[_0x3cef52(0x123)]()||undefined}),_0x4fd335(_0x47d3ad);});});}function a24_0x5579(){const _0x2c9a0f=['pipe','close','69872UiQdrH','258800qqLxCc','trim','项目构建失败','项目构建成功','10uURpPj','now','93CBvUXZ','env','49630LnlcDI','message','cwd','node_modules','data','项目构建出错','开始构建项目','4311SbXvXc','toString','inherit','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','info','733831pSnNst','npm\x20run\x20build','664590DKQLLi','error','1525384UFBezF','build','4279424qViBAF'];a24_0x5579=function(){return _0x2c9a0f;};return a24_0x5579();}
1
+ (function(_0xec2496,_0xd101ea){const _0x4c1da6=a24_0x4bad,_0x2eee24=_0xec2496();while(!![]){try{const _0x36330b=-parseInt(_0x4c1da6(0x185))/0x1*(parseInt(_0x4c1da6(0x17c))/0x2)+-parseInt(_0x4c1da6(0x16c))/0x3*(-parseInt(_0x4c1da6(0x189))/0x4)+-parseInt(_0x4c1da6(0x17b))/0x5*(-parseInt(_0x4c1da6(0x173))/0x6)+-parseInt(_0x4c1da6(0x182))/0x7+-parseInt(_0x4c1da6(0x18b))/0x8*(-parseInt(_0x4c1da6(0x184))/0x9)+parseInt(_0x4c1da6(0x172))/0xa*(-parseInt(_0x4c1da6(0x181))/0xb)+parseInt(_0x4c1da6(0x16e))/0xc*(-parseInt(_0x4c1da6(0x18a))/0xd);if(_0x36330b===_0xd101ea)break;else _0x2eee24['push'](_0x2eee24['shift']());}catch(_0x21b7ee){_0x2eee24['push'](_0x2eee24['shift']());}}}(a24_0x17e5,0x8e972));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a24_0x4bad(_0x21b33f,_0x1266a0){const _0x17e5ef=a24_0x17e5();return a24_0x4bad=function(_0x4bad0a,_0x23cfec){_0x4bad0a=_0x4bad0a-0x16b;let _0x1b5833=_0x17e5ef[_0x4bad0a];return _0x1b5833;},a24_0x4bad(_0x21b33f,_0x1266a0);}function a24_0x17e5(){const _0xed4993=['9lEmXqr','npm\x20run\x20build','12HFznsT','inherit','PATH','npm\x20run\x20build\x20exited\x20with\x20code\x20','2025350RfbCJK','3149304lxfQVN','message','项目构建成功','项目构建出错','run','now','项目构建失败','npm','5uJnHQN','396946UiAAOc','开始构建项目','cwd','.bin','stderr','11OycMEP','1646134KwpxPN','node_modules','8348031THjPty','1PjhASa','toString','error','trim','651528PiffIE','9371297wzRpOB','8QIjwkQ','close','pipe','build'];a24_0x17e5=function(){return _0xed4993;};return a24_0x17e5();}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x45d655,_0x79e0df)=>{const _0x51ea66=a24_0x4bad,_0x4c9550=Date[_0x51ea66(0x178)]();logger['info']('build',_0x51ea66(0x17d),{'command':_0x51ea66(0x16d)});let _0x212e25='';const _0x3ba8a0=spawn(_0x51ea66(0x17a),[_0x51ea66(0x177),_0x51ea66(0x16b)],{'stdio':[_0x51ea66(0x16f),_0x51ea66(0x16f),_0x51ea66(0x18d)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x51ea66(0x17e)](),_0x51ea66(0x183),_0x51ea66(0x17f))+delimiter+process['env'][_0x51ea66(0x170)]}});_0x3ba8a0[_0x51ea66(0x180)]?.['on']('data',_0x45929b=>{const _0x5bd012=_0x51ea66;_0x212e25+=_0x45929b[_0x5bd012(0x186)]();}),_0x3ba8a0['on'](_0x51ea66(0x18c),_0x5aa2a7=>{const _0x503916=_0x51ea66,_0x5f21bb=Date[_0x503916(0x178)]()-_0x4c9550;if(_0x5aa2a7===0x0||_0x5aa2a7===null)logger['success'](_0x503916(0x16b),_0x503916(0x175),_0x5f21bb),_0x45d655();else{const _0x4f47bf={'exitCode':_0x5aa2a7,'duration':_0x5f21bb,'command':_0x503916(0x16d),'cwd':process[_0x503916(0x17e)]()};_0x212e25['trim']()&&(_0x4f47bf[_0x503916(0x180)]=_0x212e25[_0x503916(0x188)]()),logger[_0x503916(0x187)](_0x503916(0x16b),_0x503916(0x179),_0x4f47bf),_0x79e0df(new Error(_0x503916(0x171)+_0x5aa2a7));}}),_0x3ba8a0['on'](_0x51ea66(0x187),_0x5e41b8=>{const _0x26e645=_0x51ea66,_0x10cf99=Date[_0x26e645(0x178)]()-_0x4c9550;logger[_0x26e645(0x187)]('build',_0x26e645(0x176),{'error':_0x5e41b8[_0x26e645(0x174)],'duration':_0x10cf99,'stderr':_0x212e25[_0x26e645(0x188)]()||undefined}),_0x79e0df(_0x5e41b8);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x16f778,_0x44b104){const _0x5cbcf9=a25_0x1765,_0x209fe7=_0x16f778();while(!![]){try{const _0x426018=-parseInt(_0x5cbcf9(0x12d))/0x1*(parseInt(_0x5cbcf9(0x13b))/0x2)+parseInt(_0x5cbcf9(0x12c))/0x3*(-parseInt(_0x5cbcf9(0x131))/0x4)+-parseInt(_0x5cbcf9(0x141))/0x5*(-parseInt(_0x5cbcf9(0x139))/0x6)+-parseInt(_0x5cbcf9(0x142))/0x7*(-parseInt(_0x5cbcf9(0x13a))/0x8)+-parseInt(_0x5cbcf9(0x13f))/0x9+parseInt(_0x5cbcf9(0x13d))/0xa+parseInt(_0x5cbcf9(0x130))/0xb*(parseInt(_0x5cbcf9(0x13c))/0xc);if(_0x426018===_0x44b104)break;else _0x209fe7['push'](_0x209fe7['shift']());}catch(_0x260164){_0x209fe7['push'](_0x209fe7['shift']());}}}(a25_0x3a27,0x38b95));function a25_0x1765(_0x11ca61,_0x5b161a){const _0x3a278e=a25_0x3a27();return a25_0x1765=function(_0x176575,_0x4d0eae){_0x176575=_0x176575-0x12a;let _0x2d2a15=_0x3a278e[_0x176575];return _0x2d2a15;},a25_0x1765(_0x11ca61,_0x5b161a);}function a25_0x3a27(){const _0x38fba7=['cwd','1086273plbSRR','*\x20暂无日志记录','383035mwmwyl','4067HePnTa','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','level','setLogPath','log','84387ONOKDu','1TZEMAl','timestamp','toLocaleString','44XbUVxX','8cYQDJq','clearLogs','success','\x20\x20\x20时间:\x20','stringify','error','details','length','24joTqCj','2896vFdhfY','902172hgwVHf','781836TRypzA','830200DhlwVk'];a25_0x3a27=function(){return _0x38fba7;};return a25_0x3a27();}import{logger}from'../utils/logger.js';export function showLogs(){const _0x2228f6=a25_0x1765;logger['setLogPath'](process[_0x2228f6(0x13e)]());const _0x32da1b=logger['readLogs']();if(_0x32da1b[_0x2228f6(0x138)]===0x0){console[_0x2228f6(0x12b)](_0x2228f6(0x140));return;}console[_0x2228f6(0x12b)](_0x2228f6(0x143)),_0x32da1b['forEach']((_0x4515e2,_0x572394)=>{const _0x135b94=_0x2228f6,_0x20a586=new Date(_0x4515e2[_0x135b94(0x12e)])[_0x135b94(0x12f)]('zh-CN'),_0x14c2c7=_0x4515e2[_0x135b94(0x144)]===_0x135b94(0x133)?'√':_0x4515e2[_0x135b94(0x144)]===_0x135b94(0x136)?'×':_0x4515e2[_0x135b94(0x144)]==='warn'?'!':'i';console['log'](_0x572394+0x1+'.\x20'+_0x14c2c7+'\x20['+_0x4515e2['command']+']\x20'+_0x4515e2['message']),console['log'](_0x135b94(0x134)+_0x20a586),_0x4515e2['duration']&&console[_0x135b94(0x12b)]('\x20\x20\x20耗时:\x20'+_0x4515e2['duration']+'ms'),_0x4515e2[_0x135b94(0x137)]&&Object['keys'](_0x4515e2['details'])[_0x135b94(0x138)]>0x0&&console[_0x135b94(0x12b)]('\x20\x20\x20详情:\x20'+JSON[_0x135b94(0x135)](_0x4515e2[_0x135b94(0x137)],null,0x2)),console[_0x135b94(0x12b)]('');});}export function clearLogs(){const _0x385bc8=a25_0x1765;logger[_0x385bc8(0x12a)](process[_0x385bc8(0x13e)]()),logger[_0x385bc8(0x132)](),console['log']('*\x20日志已清空');}
1
+ (function(_0x4646af,_0x400421){const _0x521ef0=a25_0x3d81,_0x2ea7f9=_0x4646af();while(!![]){try{const _0x443d2e=parseInt(_0x521ef0(0xdf))/0x1*(parseInt(_0x521ef0(0xe3))/0x2)+-parseInt(_0x521ef0(0xea))/0x3*(-parseInt(_0x521ef0(0xd6))/0x4)+parseInt(_0x521ef0(0xe2))/0x5*(-parseInt(_0x521ef0(0xdd))/0x6)+parseInt(_0x521ef0(0xeb))/0x7*(parseInt(_0x521ef0(0xe4))/0x8)+-parseInt(_0x521ef0(0xd5))/0x9+parseInt(_0x521ef0(0xe5))/0xa+-parseInt(_0x521ef0(0xd9))/0xb*(-parseInt(_0x521ef0(0xe8))/0xc);if(_0x443d2e===_0x400421)break;else _0x2ea7f9['push'](_0x2ea7f9['shift']());}catch(_0x28d40a){_0x2ea7f9['push'](_0x2ea7f9['shift']());}}}(a25_0x3034,0x768d0));function a25_0x3d81(_0x56f520,_0x431288){const _0x3034f1=a25_0x3034();return a25_0x3d81=function(_0x3d8132,_0x1c6183){_0x3d8132=_0x3d8132-0xcd;let _0x44d0bb=_0x3034f1[_0x3d8132];return _0x44d0bb;},a25_0x3d81(_0x56f520,_0x431288);}import{logger}from'../utils/logger.js';export function showLogs(){const _0x355aad=a25_0x3d81;logger[_0x355aad(0xd3)](process[_0x355aad(0xde)]());const _0x394f0c=logger[_0x355aad(0xe6)]();if(_0x394f0c[_0x355aad(0xdb)]===0x0){console[_0x355aad(0xcf)](_0x355aad(0xe1));return;}console['log'](_0x355aad(0xd4)),_0x394f0c[_0x355aad(0xdc)]((_0x1cadc9,_0x57a355)=>{const _0x2ea158=_0x355aad,_0x1c8c78=new Date(_0x1cadc9[_0x2ea158(0xce)])[_0x2ea158(0xd1)](_0x2ea158(0xda)),_0x5452e4=_0x1cadc9['level']===_0x2ea158(0xd7)?'√':_0x1cadc9[_0x2ea158(0xd0)]===_0x2ea158(0xe9)?'×':_0x1cadc9[_0x2ea158(0xd0)]===_0x2ea158(0xd2)?'!':'i';console['log'](_0x57a355+0x1+'.\x20'+_0x5452e4+'\x20['+_0x1cadc9['command']+']\x20'+_0x1cadc9['message']),console['log']('\x20\x20\x20时间:\x20'+_0x1c8c78),_0x1cadc9['duration']&&console['log'](_0x2ea158(0xd8)+_0x1cadc9['duration']+'ms'),_0x1cadc9[_0x2ea158(0xe0)]&&Object['keys'](_0x1cadc9[_0x2ea158(0xe0)])[_0x2ea158(0xdb)]>0x0&&console[_0x2ea158(0xcf)]('\x20\x20\x20详情:\x20'+JSON[_0x2ea158(0xcd)](_0x1cadc9[_0x2ea158(0xe0)],null,0x2)),console[_0x2ea158(0xcf)]('');});}function a25_0x3034(){const _0x25b721=['error','26541CSVCXa','133CvXELp','clearLogs','stringify','timestamp','log','level','toLocaleString','warn','setLogPath','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','5800428BTeMjU','324HKTjsB','success','\x20\x20\x20耗时:\x20','1067wHlXqn','zh-CN','length','forEach','52932zRKnLv','cwd','6gVbHTl','details','*\x20暂无日志记录','460xIbcxx','18168KVnZEr','281976GqzEoq','3756690KDUDGT','readLogs','*\x20日志已清空','15492QZKOYO'];a25_0x3034=function(){return _0x25b721;};return a25_0x3034();}export function clearLogs(){const _0x433c25=a25_0x3d81;logger[_0x433c25(0xd3)](process[_0x433c25(0xde)]()),logger[_0x433c25(0xec)](),console['log'](_0x433c25(0xe7));}
@@ -1 +1 @@
1
- function a26_0xfdb5(){const _0x10bda4=['now','1231900DLFKcl','预览服务器启动失败','toString','.bin','cwd','3aSarpN','close','pipe','preview','inherit','info','node_modules','启动预览服务器','401268nkfiBU','message','1019476zOZsVN','预览服务器启动出错','78SoznSr','data','68385ZgNiUe','stderr','env','4681910fMBRzr','135312TcuGif','9FcSctO','trim','2074242wmDGgI'];a26_0xfdb5=function(){return _0x10bda4;};return a26_0xfdb5();}(function(_0x1d0f9c,_0x867c8){const _0x534a60=a26_0x1797,_0x2deae5=_0x1d0f9c();while(!![]){try{const _0x4c7b85=parseInt(_0x534a60(0x1f5))/0x1+parseInt(_0x534a60(0x1e4))/0x2*(-parseInt(_0x534a60(0x1eb))/0x3)+parseInt(_0x534a60(0x1e6))/0x4+parseInt(_0x534a60(0x1f9))/0x5+-parseInt(_0x534a60(0x1f7))/0x6*(-parseInt(_0x534a60(0x1f3))/0x7)+-parseInt(_0x534a60(0x1fd))/0x8*(parseInt(_0x534a60(0x1e2))/0x9)+-parseInt(_0x534a60(0x1fc))/0xa;if(_0x4c7b85===_0x867c8)break;else _0x2deae5['push'](_0x2deae5['shift']());}catch(_0x79020b){_0x2deae5['push'](_0x2deae5['shift']());}}}(a26_0xfdb5,0x89b92));function a26_0x1797(_0x2d0935,_0x902b8){const _0xfdb526=a26_0xfdb5();return a26_0x1797=function(_0x179709,_0x2ff102){_0x179709=_0x179709-0x1e2;let _0x1401e3=_0xfdb526[_0x179709];return _0x1401e3;},a26_0x1797(_0x2d0935,_0x902b8);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x14065a,_0x3863ba)=>{const _0x5018da=a26_0x1797,_0x1373ad=Date[_0x5018da(0x1e5)]();logger[_0x5018da(0x1f0)](_0x5018da(0x1ee),_0x5018da(0x1f2),{'command':'vite\x20preview'});let _0x333763='';const _0x453057=spawn('vite',['preview'],{'stdio':['inherit',_0x5018da(0x1ef),_0x5018da(0x1ed)],'shell':!![],'env':{...process[_0x5018da(0x1fb)],'PATH':''+join(process[_0x5018da(0x1ea)](),_0x5018da(0x1f1),_0x5018da(0x1e9))+delimiter+process[_0x5018da(0x1fb)]['PATH']}});_0x453057['stderr']?.['on'](_0x5018da(0x1f8),_0x35eaeb=>{const _0x6bc63a=_0x5018da;_0x333763+=_0x35eaeb[_0x6bc63a(0x1e8)]();}),_0x453057['on'](_0x5018da(0x1ec),_0x2ac530=>{const _0x1f39e8=_0x5018da,_0x395c92=Date[_0x1f39e8(0x1e5)]()-_0x1373ad;if(_0x2ac530===0x0||_0x2ac530===null)logger['success'](_0x1f39e8(0x1ee),'预览服务器启动成功',_0x395c92),_0x14065a();else{const _0x6aa234={'exitCode':_0x2ac530,'duration':_0x395c92,'command':'vite\x20preview','cwd':process['cwd']()};_0x333763['trim']()&&(_0x6aa234[_0x1f39e8(0x1fa)]=_0x333763[_0x1f39e8(0x1e3)]()),logger['error'](_0x1f39e8(0x1ee),_0x1f39e8(0x1e7),_0x6aa234),_0x3863ba(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x2ac530));}}),_0x453057['on']('error',_0x383ab2=>{const _0x5cec4d=_0x5018da,_0x111038=Date[_0x5cec4d(0x1e5)]()-_0x1373ad;logger['error']('preview',_0x5cec4d(0x1f6),{'error':_0x383ab2[_0x5cec4d(0x1f4)],'duration':_0x111038,'stderr':_0x333763[_0x5cec4d(0x1e3)]()||undefined}),_0x3863ba(_0x383ab2);});});}
1
+ (function(_0xb44f32,_0x4a45ea){const _0x4bb537=a26_0xe0d6,_0x2211cc=_0xb44f32();while(!![]){try{const _0x505923=parseInt(_0x4bb537(0x182))/0x1*(parseInt(_0x4bb537(0x184))/0x2)+parseInt(_0x4bb537(0x197))/0x3+parseInt(_0x4bb537(0x185))/0x4*(parseInt(_0x4bb537(0x188))/0x5)+-parseInt(_0x4bb537(0x19d))/0x6*(parseInt(_0x4bb537(0x199))/0x7)+-parseInt(_0x4bb537(0x18a))/0x8*(parseInt(_0x4bb537(0x194))/0x9)+-parseInt(_0x4bb537(0x19a))/0xa+parseInt(_0x4bb537(0x18b))/0xb*(parseInt(_0x4bb537(0x1a1))/0xc);if(_0x505923===_0x4a45ea)break;else _0x2211cc['push'](_0x2211cc['shift']());}catch(_0x3b05e2){_0x2211cc['push'](_0x2211cc['shift']());}}}(a26_0x2076,0xd542f));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a26_0xe0d6(_0x59d36c,_0x11af00){const _0x2076ae=a26_0x2076();return a26_0xe0d6=function(_0xe0d6ef,_0x25a9ae){_0xe0d6ef=_0xe0d6ef-0x182;let _0x4a8de7=_0x2076ae[_0xe0d6ef];return _0x4a8de7;},a26_0xe0d6(_0x59d36c,_0x11af00);}import{logger}from'../utils/logger.js';function a26_0x2076(){const _0x362106=['.bin','error','now','12Tjjbgn','预览服务器启动失败','146469tkWjkI','close','12RsXxSl','88rbnbPV','vite','PATH','105545HoHxSE','vite\x20preview\x20exited\x20with\x20code\x20','3432LveLIO','16249816DdtXji','message','success','vite\x20preview','info','预览服务器启动出错','preview','cwd','inherit','18243rvFUXg','node_modules','data','2307324PQBdGY','启动预览服务器','217ptjHEu','3953330qKqiGK','stderr','trim','280866bWPllH'];a26_0x2076=function(){return _0x362106;};return a26_0x2076();}export function runPreview(){return new Promise((_0x4a1888,_0x4ca063)=>{const _0x5de028=a26_0xe0d6,_0x6fe6f3=Date[_0x5de028(0x1a0)]();logger[_0x5de028(0x18f)](_0x5de028(0x191),_0x5de028(0x198),{'command':_0x5de028(0x18e)});let _0x23c106='';const _0x3b7a61=spawn(_0x5de028(0x186),['preview'],{'stdio':[_0x5de028(0x193),'inherit','pipe'],'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x5de028(0x195),_0x5de028(0x19e))+delimiter+process['env'][_0x5de028(0x187)]}});_0x3b7a61[_0x5de028(0x19b)]?.['on'](_0x5de028(0x196),_0x303f5c=>{_0x23c106+=_0x303f5c['toString']();}),_0x3b7a61['on'](_0x5de028(0x183),_0x282a60=>{const _0x5abe3a=_0x5de028,_0x2a8a98=Date[_0x5abe3a(0x1a0)]()-_0x6fe6f3;if(_0x282a60===0x0||_0x282a60===null)logger[_0x5abe3a(0x18d)](_0x5abe3a(0x191),'预览服务器启动成功',_0x2a8a98),_0x4a1888();else{const _0x4c78cb={'exitCode':_0x282a60,'duration':_0x2a8a98,'command':'vite\x20preview','cwd':process[_0x5abe3a(0x192)]()};_0x23c106['trim']()&&(_0x4c78cb[_0x5abe3a(0x19b)]=_0x23c106[_0x5abe3a(0x19c)]()),logger['error']('preview',_0x5abe3a(0x1a2),_0x4c78cb),_0x4ca063(new Error(_0x5abe3a(0x189)+_0x282a60));}}),_0x3b7a61['on'](_0x5de028(0x19f),_0x4955af=>{const _0x447cf6=_0x5de028,_0x23e0c9=Date['now']()-_0x6fe6f3;logger['error'](_0x447cf6(0x191),_0x447cf6(0x190),{'error':_0x4955af[_0x447cf6(0x18c)],'duration':_0x23e0c9,'stderr':_0x23c106['trim']()||undefined}),_0x4ca063(_0x4955af);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x56ec2f,_0x48b074){const _0x34fef0=a27_0x2a56,_0x109c4e=_0x56ec2f();while(!![]){try{const _0x2d8d52=-parseInt(_0x34fef0(0x1ff))/0x1*(-parseInt(_0x34fef0(0x208))/0x2)+parseInt(_0x34fef0(0x20f))/0x3*(parseInt(_0x34fef0(0x1f6))/0x4)+-parseInt(_0x34fef0(0x212))/0x5*(-parseInt(_0x34fef0(0x20a))/0x6)+-parseInt(_0x34fef0(0x206))/0x7*(parseInt(_0x34fef0(0x201))/0x8)+parseInt(_0x34fef0(0x202))/0x9*(parseInt(_0x34fef0(0x213))/0xa)+-parseInt(_0x34fef0(0x1fa))/0xb+-parseInt(_0x34fef0(0x200))/0xc;if(_0x2d8d52===_0x48b074)break;else _0x109c4e['push'](_0x109c4e['shift']());}catch(_0x26e9ff){_0x109c4e['push'](_0x109c4e['shift']());}}}(a27_0x555f,0xdb80d));import{delimiter,join}from'node:path';function a27_0x2a56(_0x59b180,_0x3fa64e){const _0x555fb4=a27_0x555f();return a27_0x2a56=function(_0x2a567d,_0x23e058){_0x2a567d=_0x2a567d-0x1f4;let _0x134e44=_0x555fb4[_0x2a567d];return _0x134e44;},a27_0x2a56(_0x59b180,_0x3fa64e);}function a27_0x555f(){const _0x1bd778=['start','.bin','success','node_modules','1314qhnRiL','25138332MLDADF','2200rdQSsr','51561jBMNCB','trim','env','开发服务器启动失败','16051DvgomV','close','2596OEMHIx','data','4228722OfZCaX','stderr','error','message','vite','1638156RqREuC','vite\x20exited\x20with\x20code\x20','PATH','5lwpXTa','1790KORQRT','启动开发服务器','toString','now','8ySrznl','inherit','pipe','cwd','9937763VNWsou'];a27_0x555f=function(){return _0x1bd778;};return a27_0x555f();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x147169){return new Promise((_0x23181f,_0x7b2c4b)=>{const _0xfa67a4=a27_0x2a56,_0x3d4cb3=Date[_0xfa67a4(0x1f5)](),_0x40cbae=_0x147169||process[_0xfa67a4(0x1f9)]();logger['info'](_0xfa67a4(0x1fb),_0xfa67a4(0x214),{'command':'vite','cwd':_0x40cbae});let _0x32c572='';const _0x3bf2f6=spawn(_0xfa67a4(0x20e),{'stdio':[_0xfa67a4(0x1f7),_0xfa67a4(0x1f7),_0xfa67a4(0x1f8)],'shell':!![],'cwd':_0x40cbae,'env':{...process[_0xfa67a4(0x204)],'PATH':''+join(_0x40cbae,_0xfa67a4(0x1fe),_0xfa67a4(0x1fc))+delimiter+process[_0xfa67a4(0x204)][_0xfa67a4(0x211)]}});_0x3bf2f6['stderr']?.['on'](_0xfa67a4(0x209),_0x5e8ef8=>{const _0x4abc35=_0xfa67a4,_0x212bbd=_0x5e8ef8[_0x4abc35(0x1f4)]();_0x32c572+=_0x212bbd,process['stderr']['write'](_0x212bbd);}),_0x3bf2f6['on'](_0xfa67a4(0x207),_0x6c63f0=>{const _0x63e145=_0xfa67a4,_0x2a49f7=Date[_0x63e145(0x1f5)]()-_0x3d4cb3;if(_0x6c63f0===0x0||_0x6c63f0===null)logger[_0x63e145(0x1fd)](_0x63e145(0x1fb),'开发服务器启动成功',_0x2a49f7),_0x23181f();else{const _0x164681={'exitCode':_0x6c63f0,'duration':_0x2a49f7,'command':'vite','cwd':_0x40cbae};_0x32c572['trim']()&&(_0x164681[_0x63e145(0x20b)]=_0x32c572[_0x63e145(0x203)]()),logger[_0x63e145(0x20c)](_0x63e145(0x1fb),_0x63e145(0x205),_0x164681),_0x7b2c4b(new Error(_0x63e145(0x210)+_0x6c63f0));}}),_0x3bf2f6['on']('error',_0x40099b=>{const _0x4e9e3d=_0xfa67a4,_0x48292e=Date[_0x4e9e3d(0x1f5)]()-_0x3d4cb3,_0x543862={'error':_0x40099b[_0x4e9e3d(0x20d)],'duration':_0x48292e,'command':_0x4e9e3d(0x20e),'cwd':_0x40cbae};_0x32c572[_0x4e9e3d(0x203)]()&&(_0x543862[_0x4e9e3d(0x20b)]=_0x32c572[_0x4e9e3d(0x203)]()),logger[_0x4e9e3d(0x20c)](_0x4e9e3d(0x1fb),'开发服务器启动出错',_0x543862),_0x7b2c4b(_0x40099b);});});}
1
+ (function(_0x3c645e,_0x4b2ad1){const _0x54e554=a27_0x214f,_0x39c24a=_0x3c645e();while(!![]){try{const _0x56bcbe=-parseInt(_0x54e554(0x199))/0x1*(parseInt(_0x54e554(0x19f))/0x2)+-parseInt(_0x54e554(0x192))/0x3+parseInt(_0x54e554(0x19c))/0x4+-parseInt(_0x54e554(0x1a3))/0x5+-parseInt(_0x54e554(0x19b))/0x6+-parseInt(_0x54e554(0x1a0))/0x7*(-parseInt(_0x54e554(0x196))/0x8)+parseInt(_0x54e554(0x19e))/0x9;if(_0x56bcbe===_0x4b2ad1)break;else _0x39c24a['push'](_0x39c24a['shift']());}catch(_0x20b77a){_0x39c24a['push'](_0x39c24a['shift']());}}}(a27_0x3660,0xe874f));import{delimiter,join}from'node:path';function a27_0x3660(){const _0x3fe9bf=['start','22876974FoXiMB','4DSDBbj','878136psZmvz','pipe','success','6882620nJPAmw','data','开发服务器启动成功','stderr','info','now','error','.bin','toString','cwd','vite','trim','1294791aKSygj','message','开发服务器启动失败','vite\x20exited\x20with\x20code\x20','64hupPSb','PATH','开发服务器启动出错','550179DpdvjE','env','3994314mBQhhF','3923484SRRCnz'];a27_0x3660=function(){return _0x3fe9bf;};return a27_0x3660();}import{spawn}from'node:child_process';function a27_0x214f(_0x24a682,_0x33a1f4){const _0x366099=a27_0x3660();return a27_0x214f=function(_0x214f05,_0x3b8a85){_0x214f05=_0x214f05-0x192;let _0x1c3f33=_0x366099[_0x214f05];return _0x1c3f33;},a27_0x214f(_0x24a682,_0x33a1f4);}import{logger}from'../utils/logger.js';export function runStart(_0x2641cc){return new Promise((_0x1e0323,_0x468120)=>{const _0x4d5c0c=a27_0x214f,_0x3f7ecf=Date[_0x4d5c0c(0x1a8)](),_0x408218=_0x2641cc||process[_0x4d5c0c(0x1ac)]();logger[_0x4d5c0c(0x1a7)](_0x4d5c0c(0x19d),'启动开发服务器',{'command':'vite','cwd':_0x408218});let _0x11cf84='';const _0x3b0e0c=spawn(_0x4d5c0c(0x1ad),{'stdio':['inherit','inherit',_0x4d5c0c(0x1a1)],'shell':!![],'cwd':_0x408218,'env':{...process[_0x4d5c0c(0x19a)],'PATH':''+join(_0x408218,'node_modules',_0x4d5c0c(0x1aa))+delimiter+process['env'][_0x4d5c0c(0x197)]}});_0x3b0e0c[_0x4d5c0c(0x1a6)]?.['on'](_0x4d5c0c(0x1a4),_0x3ab760=>{const _0x3cc88e=_0x4d5c0c,_0x29bf76=_0x3ab760[_0x3cc88e(0x1ab)]();_0x11cf84+=_0x29bf76,process[_0x3cc88e(0x1a6)]['write'](_0x29bf76);}),_0x3b0e0c['on']('close',_0x3c50b6=>{const _0x315824=_0x4d5c0c,_0x22531b=Date[_0x315824(0x1a8)]()-_0x3f7ecf;if(_0x3c50b6===0x0||_0x3c50b6===null)logger[_0x315824(0x1a2)](_0x315824(0x19d),_0x315824(0x1a5),_0x22531b),_0x1e0323();else{const _0x39ea50={'exitCode':_0x3c50b6,'duration':_0x22531b,'command':_0x315824(0x1ad),'cwd':_0x408218};_0x11cf84[_0x315824(0x1ae)]()&&(_0x39ea50[_0x315824(0x1a6)]=_0x11cf84[_0x315824(0x1ae)]()),logger[_0x315824(0x1a9)](_0x315824(0x19d),_0x315824(0x194),_0x39ea50),_0x468120(new Error(_0x315824(0x195)+_0x3c50b6));}}),_0x3b0e0c['on'](_0x4d5c0c(0x1a9),_0x1ce8dc=>{const _0x1d57c9=_0x4d5c0c,_0x581fd7=Date['now']()-_0x3f7ecf,_0x2309a0={'error':_0x1ce8dc[_0x1d57c9(0x193)],'duration':_0x581fd7,'command':_0x1d57c9(0x1ad),'cwd':_0x408218};_0x11cf84[_0x1d57c9(0x1ae)]()&&(_0x2309a0[_0x1d57c9(0x1a6)]=_0x11cf84[_0x1d57c9(0x1ae)]()),logger['error'](_0x1d57c9(0x19d),_0x1d57c9(0x198),_0x2309a0),_0x468120(_0x1ce8dc);});});}
@@ -1 +1 @@
1
- (function(_0x16d9b8,_0x31c478){const _0x371abc=a28_0x2936,_0x56f0f2=_0x16d9b8();while(!![]){try{const _0x4f358c=parseInt(_0x371abc(0x179))/0x1+parseInt(_0x371abc(0x173))/0x2*(parseInt(_0x371abc(0x164))/0x3)+-parseInt(_0x371abc(0x16b))/0x4*(parseInt(_0x371abc(0x16a))/0x5)+-parseInt(_0x371abc(0x162))/0x6*(-parseInt(_0x371abc(0x168))/0x7)+-parseInt(_0x371abc(0x167))/0x8*(parseInt(_0x371abc(0x165))/0x9)+parseInt(_0x371abc(0x166))/0xa+parseInt(_0x371abc(0x169))/0xb;if(_0x4f358c===_0x31c478)break;else _0x56f0f2['push'](_0x56f0f2['shift']());}catch(_0x126636){_0x56f0f2['push'](_0x56f0f2['shift']());}}}(a28_0x3c75,0x2f490));import{jsxs as a28_0x14fc0c,jsx as a28_0x43d785}from'react/jsx-runtime';function a28_0x3c75(){const _0x26ef26=['获取配置项','6NdFbyR','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','72znJugD','8289EprKpe','1284840FzjwPi','2848zsnahH','928417lZPqbD','1606319cbopEM','55pyQybQ','16376irCrsf','\x20*\x20配置示例:','\x20\x20\x20\x20','设置环境\x20(online/daily)','description','command','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','3282mXLnVO','列出所有配置项','设置配置项','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','map','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','120062LSIsDZ','配置当前项目的\x20App\x20Code','无效的命令,可用命令如下:'];a28_0x3c75=function(){return _0x26ef26;};return a28_0x3c75();}function a28_0x2936(_0x815520,_0x5856a9){const _0x3c7546=a28_0x3c75();return a28_0x2936=function(_0x293686,_0x128860){_0x293686=_0x293686-0x162;let _0xeac33c=_0x3c7546[_0x293686];return _0xeac33c;},a28_0x2936(_0x815520,_0x5856a9);}import{Box,Text}from'ink';export function ConfigHelp(){const _0x467376=a28_0x2936,_0x479262=[{'command':_0x467376(0x163),'description':_0x467376(0x175)},{'command':_0x467376(0x178),'description':_0x467376(0x17c)},{'command':_0x467376(0x171),'description':_0x467376(0x174)}],_0x10bfc8=[{'command':_0x467376(0x176),'description':_0x467376(0x17a)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x467376(0x16e)}];return a28_0x14fc0c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a28_0x43d785(Box,{'marginBottom':0x1,'children':a28_0x14fc0c(Text,{'color':_0x467376(0x172),'children':['\x20!','\x20\x20',_0x467376(0x17b)]})}),_0x479262[_0x467376(0x177)](_0x5852e4=>a28_0x14fc0c(Box,{'children':[a28_0x14fc0c(Text,{'children':[_0x467376(0x16d),_0x5852e4[_0x467376(0x170)]]}),a28_0x43d785(Text,{'color':_0x467376(0x172),'children':_0x5852e4[_0x467376(0x16f)]})]},_0x5852e4[_0x467376(0x170)])),a28_0x43d785(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x43d785(Text,{'color':'gray','children':_0x467376(0x16c)})}),_0x10bfc8['map'](_0x4d4e0f=>a28_0x14fc0c(Box,{'children':[a28_0x14fc0c(Text,{'children':[_0x467376(0x16d),_0x4d4e0f[_0x467376(0x170)]]}),a28_0x43d785(Text,{'color':_0x467376(0x172),'children':_0x4d4e0f[_0x467376(0x16f)]})]},_0x4d4e0f['command']))]});}
1
+ function a28_0x4ede(){const _0x53938a=['12040940KtBVpO','76EybONc','\x20*\x20配置示例:','1112ZAWyHz','478635LCUACZ','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','设置配置项','设置环境\x20(online/daily)','description','获取配置项','列出所有配置项','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','66861XddAqq','\x20\x20\x20\x20','407MpAuLY','map','14fiAgyL','无效的命令,可用命令如下:','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','配置当前项目的\x20App\x20Code','command','27cPMDkY','78504PGhfSD','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2759160RqxOBx','4587852APvQly','column','2066676MNiVBZ'];a28_0x4ede=function(){return _0x53938a;};return a28_0x4ede();}(function(_0x5389f2,_0x440394){const _0x888a8f=a28_0x3192,_0x5a61c6=_0x5389f2();while(!![]){try{const _0x2330f7=parseInt(_0x888a8f(0x1ee))/0x1*(parseInt(_0x888a8f(0x1ef))/0x2)+-parseInt(_0x888a8f(0x1f1))/0x3+-parseInt(_0x888a8f(0x1f6))/0x4*(parseInt(_0x888a8f(0x1f9))/0x5)+parseInt(_0x888a8f(0x1f2))/0x6*(-parseInt(_0x888a8f(0x205))/0x7)+parseInt(_0x888a8f(0x1f8))/0x8*(-parseInt(_0x888a8f(0x201))/0x9)+-parseInt(_0x888a8f(0x1f5))/0xa+-parseInt(_0x888a8f(0x203))/0xb*(-parseInt(_0x888a8f(0x1f4))/0xc);if(_0x2330f7===_0x440394)break;else _0x5a61c6['push'](_0x5a61c6['shift']());}catch(_0x3596cc){_0x5a61c6['push'](_0x5a61c6['shift']());}}}(a28_0x4ede,0xe2719));import{jsxs as a28_0x3685c5,jsx as a28_0x1fba57}from'react/jsx-runtime';import{Box,Text}from'ink';function a28_0x3192(_0x4093dc,_0x16f287){const _0x4edeb8=a28_0x4ede();return a28_0x3192=function(_0x319232,_0x10a3f6){_0x319232=_0x319232-0x1ea;let _0x3d90e2=_0x4edeb8[_0x319232];return _0x3d90e2;},a28_0x3192(_0x4093dc,_0x16f287);}export function ConfigHelp(){const _0x283cb0=a28_0x3192,_0x1dcd51=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x283cb0(0x1fb)},{'command':_0x283cb0(0x1f0),'description':_0x283cb0(0x1fe)},{'command':_0x283cb0(0x1ea),'description':_0x283cb0(0x1ff)}],_0x517cf9=[{'command':_0x283cb0(0x200),'description':_0x283cb0(0x1ec)},{'command':_0x283cb0(0x1fa),'description':_0x283cb0(0x1fc)}];return a28_0x3685c5(Box,{'flexDirection':_0x283cb0(0x1f3),'marginTop':0x1,'marginBottom':0x1,'children':[a28_0x1fba57(Box,{'marginBottom':0x1,'children':a28_0x3685c5(Text,{'color':_0x283cb0(0x1eb),'children':['\x20!','\x20\x20',_0x283cb0(0x206)]})}),_0x1dcd51[_0x283cb0(0x204)](_0xaa16c9=>a28_0x3685c5(Box,{'children':[a28_0x3685c5(Text,{'children':[_0x283cb0(0x202),_0xaa16c9[_0x283cb0(0x1ed)]]}),a28_0x1fba57(Text,{'color':_0x283cb0(0x1eb),'children':_0xaa16c9[_0x283cb0(0x1fd)]})]},_0xaa16c9[_0x283cb0(0x1ed)])),a28_0x1fba57(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1fba57(Text,{'color':_0x283cb0(0x1eb),'children':_0x283cb0(0x1f7)})}),_0x517cf9[_0x283cb0(0x204)](_0x352c86=>a28_0x3685c5(Box,{'children':[a28_0x3685c5(Text,{'children':['\x20\x20\x20\x20',_0x352c86[_0x283cb0(0x1ed)]]}),a28_0x1fba57(Text,{'color':'gray','children':_0x352c86[_0x283cb0(0x1fd)]})]},_0x352c86['command']))]});}
@@ -1 +1 @@
1
- function a29_0x3d35(){const _0x3267e7=['mkdirSync','保存配置失败','1299942xKpqoe','435369xMMrio','20RjsUpg','error','1026838CCdoiU','配置值无效或过长','message','log','online','3UWPTAk','保存配置失败:\x20','7224LhTRtS','input','stringify','env','318960OtVbgZ','2480027OKFobU','includes','string','--help','set','undefined','app','appcode','length','get','环境配置已设置为:\x20','flags','daily','dirname','renameSync','parse','red','未提供配置值','utf8','unlinkSync','2665068SKXeHX','10sjCwSQ','1629EcGVhU','help','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','.tmp'];a29_0x3d35=function(){return _0x3267e7;};return a29_0x3d35();}(function(_0x2807cb,_0x285eb6){const _0x29cfb5=a29_0x126c,_0x72d076=_0x2807cb();while(!![]){try{const _0x427472=parseInt(_0x29cfb5(0x90))/0x1+parseInt(_0x29cfb5(0x93))/0x2*(parseInt(_0x29cfb5(0x98))/0x3)+-parseInt(_0x29cfb5(0x9e))/0x4+-parseInt(_0x29cfb5(0x88))/0x5*(-parseInt(_0x29cfb5(0x8f))/0x6)+-parseInt(_0x29cfb5(0x87))/0x7+parseInt(_0x29cfb5(0x9a))/0x8*(-parseInt(_0x29cfb5(0x89))/0x9)+parseInt(_0x29cfb5(0x91))/0xa*(-parseInt(_0x29cfb5(0x9f))/0xb);if(_0x427472===_0x285eb6)break;else _0x72d076['push'](_0x72d076['shift']());}catch(_0x2ef7cc){_0x72d076['push'](_0x72d076['shift']());}}}(a29_0x3d35,0x4b051));import{jsx as a29_0x290fc5,jsxs as a29_0x2698ba}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a29_0x5aee62 from'node:fs';import a29_0x322b46 from'node:path';import{ConfigHelp}from'./config-help.js';function a29_0x126c(_0x5ae2f4,_0x56890c){const _0x3d353a=a29_0x3d35();return a29_0x126c=function(_0x126c62,_0x30080b){_0x126c62=_0x126c62-0x74;let _0x47ad4b=_0x3d353a[_0x126c62];return _0x47ad4b;},a29_0x126c(_0x5ae2f4,_0x56890c);}import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x3b80fe){const _0x4b3c43=a29_0x126c,{cli:_0x1b44ce}=_0x3b80fe,_0x37b46d=_0x1b44ce[_0x4b3c43(0x9b)][0x1],_0x20aff6=_0x1b44ce[_0x4b3c43(0x9b)][0x2],_0x9143b0=[_0x4b3c43(0x77),_0x4b3c43(0x7c)][_0x4b3c43(0x74)](_0x37b46d||''),_0x406555=_0x1b44ce[_0x4b3c43(0x9b)][_0x4b3c43(0x7b)]>=0x3;if(_0x20aff6===_0x4b3c43(0x76)||_0x1b44ce[_0x4b3c43(0x7e)][_0x4b3c43(0x8a)])return a29_0x290fc5(ConfigHelp,{});const _0x389d25=readConfig();if(_0x37b46d==='set'){if(_0x20aff6){const _0x6aaa33=_0x1b44ce[_0x4b3c43(0x9b)][0x3];if(typeof _0x6aaa33!==_0x4b3c43(0x78)){if(_0x20aff6===_0x4b3c43(0x9d)&&![_0x4b3c43(0x97),_0x4b3c43(0x7f)]['includes'](_0x6aaa33))return a29_0x290fc5(Box,{'children':a29_0x290fc5(Text,{'color':_0x4b3c43(0x83),'children':_0x4b3c43(0x8b)})});const _0x2a6b28=isInProject(),_0x57ad5d=_0x2a6b28?projectConfigPath:globalConfigPath;let _0x4faec7={};try{if(existsSync(_0x57ad5d)){const _0x4df5f8=readFileSync(_0x57ad5d,{'encoding':_0x4b3c43(0x85)});_0x4df5f8&&(_0x4faec7=JSON[_0x4b3c43(0x82)](_0x4df5f8));}}catch(_0x17538d){}if(typeof _0x6aaa33!==_0x4b3c43(0x75)||_0x6aaa33[_0x4b3c43(0x7b)]>0x1f4)return a29_0x290fc5(Box,{'children':a29_0x290fc5(Text,{'color':_0x4b3c43(0x83),'children':_0x4b3c43(0x94)})});let _0xd985e8=_0x20aff6;_0x20aff6===_0x4b3c43(0x79)&&(_0xd985e8=_0x4b3c43(0x7a),delete _0x4faec7[_0x4b3c43(0x79)]);_0x20aff6==='appcode'&&delete _0x4faec7[_0x4b3c43(0x79)];_0x4faec7[_0xd985e8]=_0x6aaa33;try{const _0xd77295=a29_0x322b46[_0x4b3c43(0x80)](_0x57ad5d);!existsSync(_0xd77295)&&a29_0x5aee62[_0x4b3c43(0x8d)](_0xd77295,{'recursive':!![]});const _0x5a4d6c=_0x57ad5d+_0x4b3c43(0x8c);writeFileSync(_0x5a4d6c,JSON[_0x4b3c43(0x9c)](_0x4faec7,null,0x2),{'encoding':'utf8','mode':0x180}),a29_0x5aee62[_0x4b3c43(0x81)](_0x5a4d6c,_0x57ad5d);if(_0x20aff6===_0x4b3c43(0x9d)){const _0x427a6c=_0x2a6b28?'项目':'全局';console[_0x4b3c43(0x96)]('✓\x20'+_0x427a6c+_0x4b3c43(0x7d)+_0x6aaa33);}}catch(_0x51be6c){const _0x43aa73=_0x57ad5d+_0x4b3c43(0x8c);try{existsSync(_0x43aa73)&&a29_0x5aee62[_0x4b3c43(0x86)](_0x43aa73);}catch(_0x75c54b){}return logger[_0x4b3c43(0x92)]('config',_0x4b3c43(0x8e),{'error':_0x51be6c instanceof Error?_0x51be6c['message']:String(_0x51be6c),'configKey':_0x20aff6,'configValue':_0x6aaa33,'targetConfigPath':_0x57ad5d}),a29_0x290fc5(Box,{'children':a29_0x2698ba(Text,{'color':_0x4b3c43(0x83),'children':[_0x4b3c43(0x99),_0x51be6c instanceof Error?_0x51be6c[_0x4b3c43(0x95)]:String(_0x51be6c)]})});}return null;}return a29_0x290fc5(Box,{'children':a29_0x290fc5(Text,{'color':_0x4b3c43(0x83),'children':_0x4b3c43(0x84)})});}}if(_0x37b46d===_0x4b3c43(0x7c)){if(_0x20aff6){let _0x475d90=_0x20aff6;return _0x20aff6==='app'&&(_0x475d90='appcode'),console[_0x4b3c43(0x96)](_0x389d25[_0x475d90]||_0x4b3c43(0x78)),null;}return null;}if(_0x37b46d==='list')return console[_0x4b3c43(0x96)](JSON['stringify'](_0x389d25,null,0x2)),null;if(!_0x9143b0||!_0x406555)return a29_0x290fc5(ConfigHelp,{});return null;}
1
+ (function(_0x5eb512,_0x3fdd38){const _0x502ced=a29_0x12a6,_0x2b3ba8=_0x5eb512();while(!![]){try{const _0x2db8d3=parseInt(_0x502ced(0x153))/0x1+parseInt(_0x502ced(0x158))/0x2*(-parseInt(_0x502ced(0x14d))/0x3)+-parseInt(_0x502ced(0x13f))/0x4+parseInt(_0x502ced(0x15b))/0x5+parseInt(_0x502ced(0x13a))/0x6+-parseInt(_0x502ced(0x152))/0x7*(-parseInt(_0x502ced(0x138))/0x8)+-parseInt(_0x502ced(0x13d))/0x9;if(_0x2db8d3===_0x3fdd38)break;else _0x2b3ba8['push'](_0x2b3ba8['shift']());}catch(_0x416332){_0x2b3ba8['push'](_0x2b3ba8['shift']());}}}(a29_0x3b90,0x2a451));import{jsx as a29_0x143643,jsxs as a29_0xd41c07}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a29_0x12a6(_0x59d06a,_0x454d56){const _0x3b9020=a29_0x3b90();return a29_0x12a6=function(_0x12a626,_0xe2b2df){_0x12a626=_0x12a626-0x136;let _0x500a27=_0x3b9020[_0x12a626];return _0x500a27;},a29_0x12a6(_0x59d06a,_0x454d56);}import a29_0x3a091f from'node:fs';import a29_0x389317 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x3f1126){const _0x32a709=a29_0x12a6,{cli:_0x1a1325}=_0x3f1126,_0x1fdbe7=_0x1a1325['input'][0x1],_0xcb2a5d=_0x1a1325[_0x32a709(0x15d)][0x2],_0x85f4e0=[_0x32a709(0x15a),_0x32a709(0x144)][_0x32a709(0x156)](_0x1fdbe7||''),_0x54abff=_0x1a1325[_0x32a709(0x15d)]['length']>=0x3;if(_0xcb2a5d===_0x32a709(0x146)||_0x1a1325[_0x32a709(0x148)][_0x32a709(0x147)])return a29_0x143643(ConfigHelp,{});const _0x553fac=readConfig();if(_0x1fdbe7===_0x32a709(0x15a)){if(_0xcb2a5d){const _0x9517e3=_0x1a1325[_0x32a709(0x15d)][0x3];if(typeof _0x9517e3!=='undefined'){if(_0xcb2a5d===_0x32a709(0x159)&&![_0x32a709(0x13b),_0x32a709(0x13c)][_0x32a709(0x156)](_0x9517e3))return a29_0x143643(Box,{'children':a29_0x143643(Text,{'color':_0x32a709(0x15c),'children':_0x32a709(0x14a)})});const _0x51000d=isInProject(),_0xa4fda0=_0x51000d?projectConfigPath:globalConfigPath;let _0x6ebff7={};try{if(existsSync(_0xa4fda0)){const _0x37396e=readFileSync(_0xa4fda0,{'encoding':_0x32a709(0x155)});_0x37396e&&(_0x6ebff7=JSON['parse'](_0x37396e));}}catch(_0x2c78d9){}if(typeof _0x9517e3!==_0x32a709(0x157)||_0x9517e3[_0x32a709(0x136)]>0x1f4)return a29_0x143643(Box,{'children':a29_0x143643(Text,{'color':_0x32a709(0x15c),'children':_0x32a709(0x150)})});let _0x316523=_0xcb2a5d;_0xcb2a5d==='app'&&(_0x316523=_0x32a709(0x141),delete _0x6ebff7['app']);_0xcb2a5d==='appcode'&&delete _0x6ebff7[_0x32a709(0x143)];_0x6ebff7[_0x316523]=_0x9517e3;try{const _0x41d3f9=a29_0x389317[_0x32a709(0x154)](_0xa4fda0);!existsSync(_0x41d3f9)&&a29_0x3a091f[_0x32a709(0x149)](_0x41d3f9,{'recursive':!![]});const _0x4b7e14=_0xa4fda0+_0x32a709(0x14b);writeFileSync(_0x4b7e14,JSON[_0x32a709(0x137)](_0x6ebff7,null,0x2),{'encoding':'utf8','mode':0x180}),a29_0x3a091f[_0x32a709(0x14f)](_0x4b7e14,_0xa4fda0);if(_0xcb2a5d===_0x32a709(0x159)){const _0x36f7ce=_0x51000d?'项目':'全局';console['log']('✓\x20'+_0x36f7ce+_0x32a709(0x14e)+_0x9517e3);}}catch(_0x571575){const _0x5a9da2=_0xa4fda0+_0x32a709(0x14b);try{existsSync(_0x5a9da2)&&a29_0x3a091f[_0x32a709(0x142)](_0x5a9da2);}catch(_0x55c0db){}return logger[_0x32a709(0x13e)]('config','保存配置失败',{'error':_0x571575 instanceof Error?_0x571575[_0x32a709(0x139)]:String(_0x571575),'configKey':_0xcb2a5d,'configValue':_0x9517e3,'targetConfigPath':_0xa4fda0}),a29_0x143643(Box,{'children':a29_0xd41c07(Text,{'color':_0x32a709(0x15c),'children':[_0x32a709(0x145),_0x571575 instanceof Error?_0x571575[_0x32a709(0x139)]:String(_0x571575)]})});}return null;}return a29_0x143643(Box,{'children':a29_0x143643(Text,{'color':'red','children':_0x32a709(0x140)})});}}if(_0x1fdbe7===_0x32a709(0x144)){if(_0xcb2a5d){let _0x316946=_0xcb2a5d;return _0xcb2a5d===_0x32a709(0x143)&&(_0x316946=_0x32a709(0x141)),console['log'](_0x553fac[_0x316946]||'undefined'),null;}return null;}if(_0x1fdbe7===_0x32a709(0x14c))return console[_0x32a709(0x151)](JSON[_0x32a709(0x137)](_0x553fac,null,0x2)),null;if(!_0x85f4e0||!_0x54abff)return a29_0x143643(ConfigHelp,{});return null;}function a29_0x3b90(){const _0x1cfe34=['1390548BDggUe','online','daily','2947338idcyur','error','1177348ItFbpw','未提供配置值','appcode','unlinkSync','app','get','保存配置失败:\x20','--help','help','flags','mkdirSync','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','.tmp','list','18HTaJMK','环境配置已设置为:\x20','renameSync','配置值无效或过长','log','57596WBErLp','101483oQYVvN','dirname','utf8','includes','string','60498WzfNFL','env','set','1693865XGVZSP','red','input','length','stringify','296Rrlpaa','message'];a29_0x3b90=function(){return _0x1cfe34;};return a29_0x3b90();}
@@ -1 +1 @@
1
- const a30_0x1477eb=a30_0x1b80;(function(_0x2b7721,_0x3fdacf){const _0x58e099=a30_0x1b80,_0x2de311=_0x2b7721();while(!![]){try{const _0x59b47a=-parseInt(_0x58e099(0x136))/0x1+-parseInt(_0x58e099(0x140))/0x2+-parseInt(_0x58e099(0x137))/0x3+-parseInt(_0x58e099(0x13a))/0x4+parseInt(_0x58e099(0x13c))/0x5*(-parseInt(_0x58e099(0x138))/0x6)+-parseInt(_0x58e099(0x13f))/0x7+-parseInt(_0x58e099(0x141))/0x8*(-parseInt(_0x58e099(0x13e))/0x9);if(_0x59b47a===_0x3fdacf)break;else _0x2de311['push'](_0x2de311['shift']());}catch(_0x2cc88d){_0x2de311['push'](_0x2de311['shift']());}}}(a30_0x3330,0xe55df));import{getEnv}from'./env.js';function a30_0x1b80(_0x2494b2,_0x4425e5){const _0x3330b7=a30_0x3330();return a30_0x1b80=function(_0x1b80cc,_0x51547f){_0x1b80cc=_0x1b80cc-0x136;let _0x7b0a3f=_0x3330b7[_0x1b80cc];return _0x7b0a3f;},a30_0x1b80(_0x2494b2,_0x4425e5);}export const getUserDomain=()=>getEnv()===a30_0x1477eb(0x139)?a30_0x1477eb(0x13d):'https://user-daily.lovrabet.com';function a30_0x3330(){const _0x3bc7a9=['5153560UCddDH','https://api.lovrabet.com','1539685vyYQZV','https://user.lovrabet.com','2543121lJoHrB','1754179SAPLET','1364970WcQmiT','176ttsYCg','1249787TnNoAe','798261uDiUwn','30oicqrn','online'];a30_0x3330=function(){return _0x3bc7a9;};return a30_0x3330();}export const getApiDomain=()=>getEnv()===a30_0x1477eb(0x139)?a30_0x1477eb(0x13b):'https://daily-api.lovrabet.com';
1
+ function a30_0x193b(_0x3ec904,_0x2c0524){const _0x2a8f27=a30_0x2a8f();return a30_0x193b=function(_0x193b96,_0xc5be4f){_0x193b96=_0x193b96-0x1c4;let _0x341e5b=_0x2a8f27[_0x193b96];return _0x341e5b;},a30_0x193b(_0x3ec904,_0x2c0524);}const a30_0x2e2e63=a30_0x193b;(function(_0x314f68,_0x376ff2){const _0x3f1c6e=a30_0x193b,_0x12c6c7=_0x314f68();while(!![]){try{const _0x4fcc63=parseInt(_0x3f1c6e(0x1cd))/0x1+-parseInt(_0x3f1c6e(0x1cb))/0x2+parseInt(_0x3f1c6e(0x1c9))/0x3*(-parseInt(_0x3f1c6e(0x1c4))/0x4)+-parseInt(_0x3f1c6e(0x1ca))/0x5+-parseInt(_0x3f1c6e(0x1c8))/0x6+parseInt(_0x3f1c6e(0x1cc))/0x7+-parseInt(_0x3f1c6e(0x1ce))/0x8*(-parseInt(_0x3f1c6e(0x1c7))/0x9);if(_0x4fcc63===_0x376ff2)break;else _0x12c6c7['push'](_0x12c6c7['shift']());}catch(_0x247925){_0x12c6c7['push'](_0x12c6c7['shift']());}}}(a30_0x2a8f,0xc8718));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a30_0x2e2e63(0x1c6)?'https://user.lovrabet.com':'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a30_0x2e2e63(0x1c6)?a30_0x2e2e63(0x1c5):'https://daily-api.lovrabet.com';function a30_0x2a8f(){const _0x474388=['https://api.lovrabet.com','online','8432748fcvJAF','6423300rBsIUl','279IFqxSE','6571295GgOPza','1940426PNQypZ','2065749GfyzUB','1573796jLQAGd','24ovqYdt','21668bNEubn'];a30_0x2a8f=function(){return _0x474388;};return a30_0x2a8f();}
@@ -1 +1 @@
1
- function a31_0x8d0a(){const _0x30ec51=['1636YiDyzY','36747dusayE','792480dZVVEZ','868807BqLrkM','6rAoPDJ','1172334rSiXYr','16360490XDPFZM','env','4759755npUFRG','8985rfyBbr','1272UNkgSR'];a31_0x8d0a=function(){return _0x30ec51;};return a31_0x8d0a();}function a31_0x2b62(_0x220003,_0x4f341a){const _0x8d0af6=a31_0x8d0a();return a31_0x2b62=function(_0x2b6238,_0xb8904f){_0x2b6238=_0x2b6238-0x152;let _0x21605e=_0x8d0af6[_0x2b6238];return _0x21605e;},a31_0x2b62(_0x220003,_0x4f341a);}const a31_0x543a70=a31_0x2b62;(function(_0x165b87,_0x590e6a){const _0x2df19e=a31_0x2b62,_0x5ee8cd=_0x165b87();while(!![]){try{const _0x52846a=parseInt(_0x2df19e(0x154))/0x1+-parseInt(_0x2df19e(0x156))/0x2*(parseInt(_0x2df19e(0x155))/0x3)+-parseInt(_0x2df19e(0x15c))/0x4*(-parseInt(_0x2df19e(0x15a))/0x5)+-parseInt(_0x2df19e(0x153))/0x6+-parseInt(_0x2df19e(0x159))/0x7+-parseInt(_0x2df19e(0x15b))/0x8*(parseInt(_0x2df19e(0x152))/0x9)+parseInt(_0x2df19e(0x157))/0xa;if(_0x52846a===_0x590e6a)break;else _0x5ee8cd['push'](_0x5ee8cd['shift']());}catch(_0x91cee9){_0x5ee8cd['push'](_0x5ee8cd['shift']());}}}(a31_0x8d0a,0x9402d));let env=process[a31_0x543a70(0x158)]['LOVRABET_ENV']||'online';export function getEnv(){return env;}export function initEnv(_0xd426eb){env=_0xd426eb;}
1
+ const a31_0x43befb=a31_0x20ae;function a31_0x20ae(_0x272d7a,_0x48f443){const _0x2b29ef=a31_0x2b29();return a31_0x20ae=function(_0x20ae7a,_0x2d348d){_0x20ae7a=_0x20ae7a-0xd3;let _0x40fb1d=_0x2b29ef[_0x20ae7a];return _0x40fb1d;},a31_0x20ae(_0x272d7a,_0x48f443);}function a31_0x2b29(){const _0x4462c1=['LOVRABET_ENV','1535054ylHdsJ','env','9546355FZPQYY','1130610uvoQBn','20SSUifd','1330220VampKL','28926kYWnig','1302dJTklc','4226vnJIXd','320kYSZLa','7277748rlAPSF','154yvknrg'];a31_0x2b29=function(){return _0x4462c1;};return a31_0x2b29();}(function(_0x11da68,_0x10e28d){const _0x36d540=a31_0x20ae,_0x854f6a=_0x11da68();while(!![]){try{const _0x4e0ab9=parseInt(_0x36d540(0xd3))/0x1+-parseInt(_0x36d540(0xdb))/0x2*(parseInt(_0x36d540(0xda))/0x3)+parseInt(_0x36d540(0xd7))/0x4*(-parseInt(_0x36d540(0xd8))/0x5)+-parseInt(_0x36d540(0xdd))/0x6+parseInt(_0x36d540(0xd5))/0x7+parseInt(_0x36d540(0xdc))/0x8*(-parseInt(_0x36d540(0xd9))/0x9)+-parseInt(_0x36d540(0xd6))/0xa*(-parseInt(_0x36d540(0xde))/0xb);if(_0x4e0ab9===_0x10e28d)break;else _0x854f6a['push'](_0x854f6a['shift']());}catch(_0x397aa5){_0x854f6a['push'](_0x854f6a['shift']());}}}(a31_0x2b29,0xd9fdd));let env=process[a31_0x43befb(0xd4)][a31_0x43befb(0xdf)]||'online';export function getEnv(){return env;}export function initEnv(_0x54de7d){env=_0x54de7d;}