@lovrabet/cli 1.2.1-beta.4 → 1.2.3

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 (65) 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/use-get-online-menu-list.js +1 -1
  16. package/lib/app-menu/utils.js +1 -1
  17. package/lib/app-menu/valid-url.js +1 -1
  18. package/lib/app-menu-update-cdn/current-content.js +1 -1
  19. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  20. package/lib/app-menu-update-cdn/main.js +1 -1
  21. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  22. package/lib/auth/auth-server-ui.js +1 -1
  23. package/lib/auth/auth-server.js +1 -1
  24. package/lib/auth/constant.js +1 -1
  25. package/lib/auth/get-cookie.js +1 -1
  26. package/lib/auth/is-session-valid.js +1 -1
  27. package/lib/auth/logout.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start.js +1 -1
  34. package/lib/config/config-help.js +1 -1
  35. package/lib/config/main.js +1 -1
  36. package/lib/constant/domain.js +1 -1
  37. package/lib/constant/env.js +1 -1
  38. package/lib/create-app/enhanced-guided-create.js +1 -1
  39. package/lib/create-app/format-elapsed.js +1 -1
  40. package/lib/create-app/main.js +1 -1
  41. package/lib/create-app/task-finished.js +1 -1
  42. package/lib/create-app/task-loading.js +1 -1
  43. package/lib/create-app/task-running.js +1 -1
  44. package/lib/create-app/task-time.js +1 -1
  45. package/lib/create-app/use-copy-project-template.js +1 -1
  46. package/lib/create-app/use-format-code.js +1 -1
  47. package/lib/create-app/use-install-dependencies.js +1 -1
  48. package/lib/help.js +1 -1
  49. package/lib/init/main.js +1 -1
  50. package/lib/mcp/cursor.js +1 -1
  51. package/lib/mcp/main.js +1 -1
  52. package/lib/utils/check-sdk-version.js +1 -1
  53. package/lib/utils/config.js +1 -1
  54. package/lib/utils/copy-directory.js +1 -1
  55. package/lib/utils/http-client.js +1 -1
  56. package/lib/utils/logger.js +1 -1
  57. package/lib/utils/router-updater.js +1 -1
  58. package/lib/utils/sleep.js +1 -1
  59. package/lib/utils/template-replacer.js +1 -1
  60. package/package.json +3 -3
  61. package/templates/projects/sub-app-react-demo/package.json +2 -2
  62. package/templates/projects/sub-app-react-demo/src/api/api.ts +42 -25
  63. package/templates/projects/sub-app-react-demo/src/api/client.ts +11 -10
  64. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +72 -19
  65. package/templates/projects/sub-app-react-demo/package-lock.json +0 -4062
@@ -1 +1 @@
1
- (function(_0x4fe00a,_0x168336){const _0x771b51=a11_0x24a3,_0xc5b8ca=_0x4fe00a();while(!![]){try{const _0x544593=parseInt(_0x771b51(0x222))/0x1+-parseInt(_0x771b51(0x1f4))/0x2+parseInt(_0x771b51(0x214))/0x3+parseInt(_0x771b51(0x1fb))/0x4*(parseInt(_0x771b51(0x20a))/0x5)+parseInt(_0x771b51(0x20f))/0x6*(-parseInt(_0x771b51(0x201))/0x7)+-parseInt(_0x771b51(0x212))/0x8+parseInt(_0x771b51(0x1fc))/0x9*(parseInt(_0x771b51(0x216))/0xa);if(_0x544593===_0x168336)break;else _0xc5b8ca['push'](_0xc5b8ca['shift']());}catch(_0x2b465c){_0xc5b8ca['push'](_0xc5b8ca['shift']());}}}(a11_0x1f2a,0xbe104));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a11_0x1f2a(){const _0x55a73e=['path','14AGbSkC','length','create-menu','errorMsg','菜单创建成功:\x20','status','stringify','error','create-menus','35vfvslU','info','未知错误','success','data','4163142upKBDQ','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','创建菜单失败:\x20','1170896qbGhPq','开始批量创建菜单,共\x20','590592UbnImp','json','1115260bNjxMo','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','all','appcode','import','label','POST','正在创建菜单:\x20','!\x20请使用以下方式之一:','application/json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','procode','656858XDBERW','includes','1505166agcDZu','0011','创建菜单失败,HTTP状态码:\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','/smartapi/menu/create','批量创建菜单完成,共\x20','errorCode','690116AvxpDl','81TNshIp','log','resources','未提供应用AppCode,且配置中也没有默认值'];a11_0x1f2a=function(){return _0x55a73e;};return a11_0x1f2a();}import{logger}from'../utils/logger.js';function a11_0x24a3(_0xb272a0,_0x4021c9){_0xb272a0=_0xb272a0-0x1f3;const _0x1f2a1f=a11_0x1f2a();let _0x24a337=_0x1f2a1f[_0xb272a0];return _0x24a337;}const config=readConfig();export async function createMenu(_0x3913af){const _0x53f27d=a11_0x24a3,_0x22e8c8=config?.[_0x53f27d(0x219)];if(!_0x22e8c8){const _0x4e479d=_0x53f27d(0x1ff);logger[_0x53f27d(0x208)]('create-menu',_0x4e479d),console[_0x53f27d(0x208)]('×\x20'+_0x4e479d),console['log'](_0x53f27d(0x21e)),console[_0x53f27d(0x1fd)](_0x53f27d(0x210)),console[_0x53f27d(0x1fd)](_0x53f27d(0x1f7));return;}logger[_0x53f27d(0x20b)](_0x53f27d(0x203),_0x53f27d(0x21d)+_0x3913af[_0x53f27d(0x21b)]+'\x20('+_0x3913af[_0x53f27d(0x200)]+')');const _0x27cced={'appCode':_0x22e8c8,'type':_0x53f27d(0x221),'sort':0x0,'extend':{'loadScriptMode':_0x53f27d(0x21a),'resources':_0x3913af[_0x53f27d(0x1fe)]?JSON[_0x53f27d(0x207)](_0x3913af[_0x53f27d(0x1fe)]):undefined},..._0x3913af},_0x5974df=await fetch(getApiDomain()+_0x53f27d(0x1f8),{'method':_0x53f27d(0x21c),'body':JSON['stringify'](_0x27cced),'headers':{'Content-Type':_0x53f27d(0x21f),'Cookie':getCookie()}});if(!_0x5974df['ok']){if(_0x5974df[_0x53f27d(0x206)]===0x191){const _0x31f5eb=_0x53f27d(0x220);logger[_0x53f27d(0x208)]('create-menu',_0x31f5eb,{'status':_0x5974df[_0x53f27d(0x206)],'menu':_0x3913af[_0x53f27d(0x21b)]});throw new Error(_0x31f5eb);}const _0x55ad28=_0x53f27d(0x1f6)+_0x5974df[_0x53f27d(0x206)];logger['error']('create-menu',_0x55ad28,{'menu':_0x3913af[_0x53f27d(0x21b)]});throw new Error(_0x55ad28);}const _0x5dda69=await _0x5974df[_0x53f27d(0x215)]();if(!_0x5dda69[_0x53f27d(0x20d)]){const _0x57adab=_0x53f27d(0x211)+(_0x5dda69['errorMsg']||'未知错误');logger[_0x53f27d(0x208)](_0x53f27d(0x203),_0x57adab,{'errorCode':_0x5dda69[_0x53f27d(0x1fa)],'errorMsg':_0x5dda69[_0x53f27d(0x204)],'menu':_0x3913af['label']});throw new Error(_0x57adab);}logger['info'](_0x53f27d(0x203),_0x53f27d(0x205)+_0x3913af[_0x53f27d(0x21b)],_0x5dda69[_0x53f27d(0x20e)]),console['log']('创建菜单成功:',_0x5dda69[_0x53f27d(0x20e)]);}async function _createMenu(_0x199ccf,_0x29661b){const _0x5e5b19=a11_0x24a3,_0x2f5c85=config?.[_0x5e5b19(0x219)];if(!_0x2f5c85){const _0xe2f9f9=_0x5e5b19(0x1ff);logger[_0x5e5b19(0x208)](_0x5e5b19(0x203),_0xe2f9f9),console[_0x5e5b19(0x208)]('×\x20'+_0xe2f9f9),console['log'](_0x5e5b19(0x21e)),console[_0x5e5b19(0x1fd)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x5e5b19(0x1fd)](_0x5e5b19(0x1f7));return;}const _0x1d3d71={'appCode':_0x2f5c85,'type':_0x5e5b19(0x221),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x29661b?JSON[_0x5e5b19(0x207)](_0x29661b):undefined},'label':_0x199ccf[_0x5e5b19(0x21b)],'path':_0x199ccf['path']},_0x4a05f1=await fetch(getApiDomain()+_0x5e5b19(0x1f8),{'method':_0x5e5b19(0x21c),'body':JSON[_0x5e5b19(0x207)](_0x1d3d71),'headers':{'Content-Type':_0x5e5b19(0x21f),'Cookie':getCookie()}});if(!_0x4a05f1['ok']){if(_0x4a05f1['status']===0x191){const _0x4c4959=_0x5e5b19(0x220);logger[_0x5e5b19(0x208)](_0x5e5b19(0x203),_0x4c4959,{'status':_0x4a05f1[_0x5e5b19(0x206)],'menu':_0x199ccf['label']});throw new Error(_0x4c4959);}const _0x2fd324=_0x5e5b19(0x1f6)+_0x4a05f1[_0x5e5b19(0x206)];logger[_0x5e5b19(0x208)](_0x5e5b19(0x203),_0x2fd324,{'menu':_0x199ccf['label']});throw new Error(_0x2fd324);}const _0x2c0859=await _0x4a05f1[_0x5e5b19(0x215)]();if(!_0x2c0859[_0x5e5b19(0x20d)]){if(_0x2c0859[_0x5e5b19(0x1fa)]===_0x5e5b19(0x1f5)||_0x2c0859[_0x5e5b19(0x204)]?.[_0x5e5b19(0x1f3)]('登录')){const _0x415213=_0x5e5b19(0x217);logger[_0x5e5b19(0x208)](_0x5e5b19(0x203),_0x415213,{'errorCode':_0x2c0859[_0x5e5b19(0x1fa)],'errorMsg':_0x2c0859[_0x5e5b19(0x204)],'menu':_0x199ccf[_0x5e5b19(0x21b)]});throw new Error(_0x415213);}const _0x7a04df=_0x5e5b19(0x211)+(_0x2c0859['errorMsg']||_0x5e5b19(0x20c));logger[_0x5e5b19(0x208)](_0x5e5b19(0x203),_0x7a04df,{'errorCode':_0x2c0859[_0x5e5b19(0x1fa)],'errorMsg':_0x2c0859[_0x5e5b19(0x204)],'menu':_0x199ccf['label']});throw new Error(_0x7a04df);}logger[_0x5e5b19(0x20b)](_0x5e5b19(0x203),_0x5e5b19(0x205)+_0x199ccf[_0x5e5b19(0x21b)]);}export async function createMenus(_0x8be5d3,_0x4c762c){const _0x2f3812=a11_0x24a3;logger[_0x2f3812(0x20b)](_0x2f3812(0x209),_0x2f3812(0x213)+_0x8be5d3[_0x2f3812(0x202)]+'\x20个'),await Promise[_0x2f3812(0x218)](_0x8be5d3['map'](async _0x524871=>{await _createMenu(_0x524871,_0x4c762c);})),logger[_0x2f3812(0x20b)](_0x2f3812(0x209),_0x2f3812(0x1f9)+_0x8be5d3[_0x2f3812(0x202)]+'\x20个');}
1
+ (function(_0x37245d,_0x5923a9){const _0x3d54d3=a11_0x240b,_0x42e9f1=_0x37245d();while(!![]){try{const _0x2453c4=parseInt(_0x3d54d3(0x92))/0x1+-parseInt(_0x3d54d3(0x7c))/0x2*(-parseInt(_0x3d54d3(0x98))/0x3)+-parseInt(_0x3d54d3(0x76))/0x4+-parseInt(_0x3d54d3(0x82))/0x5*(parseInt(_0x3d54d3(0x90))/0x6)+parseInt(_0x3d54d3(0x79))/0x7*(parseInt(_0x3d54d3(0x71))/0x8)+parseInt(_0x3d54d3(0x6e))/0x9+parseInt(_0x3d54d3(0x6f))/0xa;if(_0x2453c4===_0x5923a9)break;else _0x42e9f1['push'](_0x42e9f1['shift']());}catch(_0x564c64){_0x42e9f1['push'](_0x42e9f1['shift']());}}}(a11_0xa00b,0x4cad5));function a11_0xa00b(){const _0x3689ef=['16tpOZSr','import','未提供应用AppCode,且配置中也没有默认值','!\x20请使用以下方式之一:','all','2131108JrViBQ','errorMsg','procode','975506ZmwtCt','path','appcode','38bKPhAy','length','创建菜单失败,HTTP状态码:\x20','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','/smartapi/menu/create','开始批量创建菜单,共\x20','32105bhpCsm','未知错误','errorCode','data','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','json','create-menu','error','label','创建菜单失败:\x20','resources','正在创建菜单:\x20','success','480cCYFrN','application/json','209612oZVahl','create-menus','info','POST','status','map','82443nsUDUD','创建菜单成功:','stringify','1943127ynSQkB','1341560ZFbzMa','log'];a11_0xa00b=function(){return _0x3689ef;};return a11_0xa00b();}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 createMenu(_0x35935e){const _0x5a1c6d=a11_0x240b,_0x50cc28=config?.[_0x5a1c6d(0x7b)];if(!_0x50cc28){const _0x11d736=_0x5a1c6d(0x73);logger[_0x5a1c6d(0x8a)](_0x5a1c6d(0x89),_0x11d736),console[_0x5a1c6d(0x8a)]('×\x20'+_0x11d736),console[_0x5a1c6d(0x70)](_0x5a1c6d(0x74)),console[_0x5a1c6d(0x70)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x5a1c6d(0x70)](_0x5a1c6d(0x87));return;}logger[_0x5a1c6d(0x94)](_0x5a1c6d(0x89),_0x5a1c6d(0x8e)+_0x35935e[_0x5a1c6d(0x8b)]+'\x20('+_0x35935e[_0x5a1c6d(0x7a)]+')');const _0x4092e1={'appCode':_0x50cc28,'type':_0x5a1c6d(0x78),'sort':0x0,'extend':{'loadScriptMode':_0x5a1c6d(0x72),'resources':_0x35935e['resources']?JSON[_0x5a1c6d(0x6d)](_0x35935e[_0x5a1c6d(0x8d)]):undefined},..._0x35935e},_0x4650e1=await fetch(getApiDomain()+_0x5a1c6d(0x80),{'method':_0x5a1c6d(0x95),'body':JSON[_0x5a1c6d(0x6d)](_0x4092e1),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x4650e1['ok']){if(_0x4650e1[_0x5a1c6d(0x96)]===0x191){const _0xacef93=_0x5a1c6d(0x7f);logger[_0x5a1c6d(0x8a)]('create-menu',_0xacef93,{'status':_0x4650e1[_0x5a1c6d(0x96)],'menu':_0x35935e['label']});throw new Error(_0xacef93);}const _0x489a53=_0x5a1c6d(0x7e)+_0x4650e1['status'];logger[_0x5a1c6d(0x8a)](_0x5a1c6d(0x89),_0x489a53,{'menu':_0x35935e[_0x5a1c6d(0x8b)]});throw new Error(_0x489a53);}const _0x13b8c9=await _0x4650e1[_0x5a1c6d(0x88)]();if(!_0x13b8c9[_0x5a1c6d(0x8f)]){const _0x7cb16f=_0x5a1c6d(0x8c)+(_0x13b8c9['errorMsg']||'未知错误');logger[_0x5a1c6d(0x8a)](_0x5a1c6d(0x89),_0x7cb16f,{'errorCode':_0x13b8c9['errorCode'],'errorMsg':_0x13b8c9[_0x5a1c6d(0x77)],'menu':_0x35935e[_0x5a1c6d(0x8b)]});throw new Error(_0x7cb16f);}logger[_0x5a1c6d(0x94)](_0x5a1c6d(0x89),'菜单创建成功:\x20'+_0x35935e['label'],_0x13b8c9[_0x5a1c6d(0x85)]),console['log'](_0x5a1c6d(0x6c),_0x13b8c9[_0x5a1c6d(0x85)]);}async function _createMenu(_0x46fb0b,_0x1733c4){const _0x50f72e=a11_0x240b,_0x57fd9d=config?.[_0x50f72e(0x7b)];if(!_0x57fd9d){const _0x3599a9=_0x50f72e(0x73);logger[_0x50f72e(0x8a)](_0x50f72e(0x89),_0x3599a9),console['error']('×\x20'+_0x3599a9),console[_0x50f72e(0x70)](_0x50f72e(0x74)),console['log'](_0x50f72e(0x86)),console['log'](_0x50f72e(0x87));return;}const _0x271614={'appCode':_0x57fd9d,'type':_0x50f72e(0x78),'sort':0x0,'extend':{'loadScriptMode':_0x50f72e(0x72),'resources':_0x1733c4?JSON[_0x50f72e(0x6d)](_0x1733c4):undefined},'label':_0x46fb0b['label'],'path':_0x46fb0b[_0x50f72e(0x7a)]},_0x46a05c=await fetch(getApiDomain()+_0x50f72e(0x80),{'method':_0x50f72e(0x95),'body':JSON[_0x50f72e(0x6d)](_0x271614),'headers':{'Content-Type':_0x50f72e(0x91),'Cookie':getCookie()}});if(!_0x46a05c['ok']){if(_0x46a05c[_0x50f72e(0x96)]===0x191){const _0x1e241e='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x50f72e(0x8a)](_0x50f72e(0x89),_0x1e241e,{'status':_0x46a05c[_0x50f72e(0x96)],'menu':_0x46fb0b[_0x50f72e(0x8b)]});throw new Error(_0x1e241e);}const _0x3b7f82='创建菜单失败,HTTP状态码:\x20'+_0x46a05c[_0x50f72e(0x96)];logger['error'](_0x50f72e(0x89),_0x3b7f82,{'menu':_0x46fb0b[_0x50f72e(0x8b)]});throw new Error(_0x3b7f82);}const _0x5495a2=await _0x46a05c['json']();if(!_0x5495a2[_0x50f72e(0x8f)]){if(_0x5495a2[_0x50f72e(0x84)]==='0011'||_0x5495a2['errorMsg']?.['includes']('登录')){const _0xc4b714='登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x50f72e(0x8a)](_0x50f72e(0x89),_0xc4b714,{'errorCode':_0x5495a2[_0x50f72e(0x84)],'errorMsg':_0x5495a2['errorMsg'],'menu':_0x46fb0b['label']});throw new Error(_0xc4b714);}const _0x1ef1bd='创建菜单失败:\x20'+(_0x5495a2[_0x50f72e(0x77)]||_0x50f72e(0x83));logger[_0x50f72e(0x8a)](_0x50f72e(0x89),_0x1ef1bd,{'errorCode':_0x5495a2[_0x50f72e(0x84)],'errorMsg':_0x5495a2[_0x50f72e(0x77)],'menu':_0x46fb0b[_0x50f72e(0x8b)]});throw new Error(_0x1ef1bd);}logger[_0x50f72e(0x94)]('create-menu','菜单创建成功:\x20'+_0x46fb0b[_0x50f72e(0x8b)]);}function a11_0x240b(_0x5d879b,_0x15795a){_0x5d879b=_0x5d879b-0x6c;const _0xa00b69=a11_0xa00b();let _0x240b68=_0xa00b69[_0x5d879b];return _0x240b68;}export async function createMenus(_0x285beb,_0x4baddd){const _0x575b94=a11_0x240b;logger['info'](_0x575b94(0x93),_0x575b94(0x81)+_0x285beb['length']+'\x20个'),await Promise[_0x575b94(0x75)](_0x285beb[_0x575b94(0x97)](async _0x5778b0=>{await _createMenu(_0x5778b0,_0x4baddd);})),logger[_0x575b94(0x94)]('create-menus','批量创建菜单完成,共\x20'+_0x285beb[_0x575b94(0x7d)]+'\x20个');}
@@ -1 +1 @@
1
- (function(_0x458d1e,_0x4ad5f2){const _0x253b29=a12_0x9f52,_0x8d7f15=_0x458d1e();while(!![]){try{const _0x425777=-parseInt(_0x253b29(0x1b4))/0x1*(parseInt(_0x253b29(0x1c5))/0x2)+parseInt(_0x253b29(0x1c2))/0x3+parseInt(_0x253b29(0x1b7))/0x4+parseInt(_0x253b29(0x1b8))/0x5+-parseInt(_0x253b29(0x1b6))/0x6*(-parseInt(_0x253b29(0x1bd))/0x7)+parseInt(_0x253b29(0x1bf))/0x8+parseInt(_0x253b29(0x1ba))/0x9*(-parseInt(_0x253b29(0x1b5))/0xa);if(_0x425777===_0x4ad5f2)break;else _0x8d7f15['push'](_0x8d7f15['shift']());}catch(_0x28a6c0){_0x8d7f15['push'](_0x8d7f15['shift']());}}}(a12_0x3b62,0xe791d));function a12_0x3b62(){const _0x22ca92=['1070xKlzkD','7098MjZlMl','7320496RBTrUr','4140885yNypcs','match','373077cEOQQK','filter','forEach','7357AYjqzY','isDirectory','10737808ZaCUkm','path','index.tsx','4116549QfyxVn','endsWith','replace','74CAjIvE','trim','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','utf-8','slice','push','33299fsOspl'];a12_0x3b62=function(){return _0x22ca92;};return a12_0x3b62();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process['cwd'](),'src/pages');function a12_0x9f52(_0x397003,_0x2c89a2){_0x397003=_0x397003-0x1b0;const _0x3b6272=a12_0x3b62();let _0x9f529c=_0x3b6272[_0x397003];return _0x9f529c;}export function extractTitleFromComment(_0x50a6d2){const _0x13d468=a12_0x9f52;try{const _0x40b27d=readFileSync(_0x50a6d2,_0x13d468(0x1b1)),_0xccc19c=_0x40b27d[_0x13d468(0x1b9)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xccc19c&&_0xccc19c[0x1]){const _0x36beec=_0xccc19c[0x1],_0xf9709c=_0x36beec['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0xf9709c&&_0xf9709c[0x1])return _0xf9709c[0x1][_0x13d468(0x1c6)]();}let _0x3f0522=null;const _0x37274d=_0x40b27d['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x37274d&&_0x37274d[0x1]&&(_0x3f0522=_0x37274d[0x1]);if(!_0x3f0522){const _0x12380d=_0x40b27d[_0x13d468(0x1b9)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x12380d&&_0x12380d[0x1]&&(_0x3f0522=_0x12380d[0x1]);}if(_0x3f0522){const _0x119527=new RegExp('\x5cb'+_0x3f0522+_0x13d468(0x1b0)),_0x1c488f=_0x40b27d[_0x13d468(0x1b9)](_0x119527);if(_0x1c488f&&_0x1c488f[0x1])return _0x1c488f[0x1];return _0x3f0522;}return null;}catch(_0x5c8adc){return null;}}export function getLocalPages(_0x1f4230=pagesDir,_0x2e4536=pagesDir){const _0x34c8dd=a12_0x9f52;let _0x13e2ae=[];const _0x32b2c9=readdirSync(_0x1f4230);return _0x32b2c9[_0x34c8dd(0x1bc)](_0x2986b2=>{const _0x38f192=_0x34c8dd,_0x4738ce=join(_0x1f4230,_0x2986b2),_0xa4ff37=statSync(_0x4738ce);if(_0xa4ff37&&_0xa4ff37[_0x38f192(0x1be)]())_0x13e2ae=_0x13e2ae['concat'](getLocalPages(_0x4738ce,_0x2e4536));else{if(_0x2986b2[_0x38f192(0x1c3)]('.tsx')){let _0x3e9613=relative(_0x2e4536,_0x4738ce);_0x3e9613[_0x38f192(0x1c3)](_0x38f192(0x1c1))?_0x3e9613=_0x3e9613['replace'](/index\.tsx$/,''):_0x3e9613=_0x3e9613[_0x38f192(0x1c4)](/\.tsx$/,'');_0x3e9613[_0x38f192(0x1c3)]('/')&&(_0x3e9613=_0x3e9613[_0x38f192(0x1b2)](0x0,-0x1));const _0x4e1381=extractTitleFromComment(_0x4738ce),_0x8c36a6=_0x4e1381||_0x3e9613;_0x13e2ae[_0x38f192(0x1b3)]({'path':_0x3e9613['replaceAll']('$',':'),'label':_0x8c36a6});}}}),_0x13e2ae[_0x34c8dd(0x1bb)](_0x4216e3=>_0x4216e3[_0x34c8dd(0x1c0)]!=='');}
1
+ const a12_0x3cb81c=a12_0x5a13;(function(_0x1108b7,_0x534a26){const _0x403ccc=a12_0x5a13,_0x24be17=_0x1108b7();while(!![]){try{const _0x2973d5=parseInt(_0x403ccc(0x17c))/0x1+parseInt(_0x403ccc(0x178))/0x2+parseInt(_0x403ccc(0x176))/0x3*(-parseInt(_0x403ccc(0x17f))/0x4)+-parseInt(_0x403ccc(0x187))/0x5+-parseInt(_0x403ccc(0x189))/0x6*(parseInt(_0x403ccc(0x183))/0x7)+-parseInt(_0x403ccc(0x179))/0x8+parseInt(_0x403ccc(0x18a))/0x9;if(_0x2973d5===_0x534a26)break;else _0x24be17['push'](_0x24be17['shift']());}catch(_0x1b30ec){_0x24be17['push'](_0x24be17['shift']());}}}(a12_0xf51b,0x30752));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a12_0xf51b(){const _0x4e4f10=['1786075VoJHTK','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','6PvOsYj','5004189YcSBcB','path','match','forEach','3FHSBmo','push','630878VDXlXX','1688104WfEXHj','cwd','isDirectory','228214PLOXdj','src/pages','replaceAll','949508NlRJyX','utf-8','filter','endsWith','669109fqIcrE','.tsx','replace','slice'];a12_0xf51b=function(){return _0x4e4f10;};return a12_0xf51b();}function a12_0x5a13(_0x4db461,_0x4ba7a6){_0x4db461=_0x4db461-0x176;const _0xf51be0=a12_0xf51b();let _0x5a13d6=_0xf51be0[_0x4db461];return _0x5a13d6;}const pagesDir=resolve(process[a12_0x3cb81c(0x17a)](),a12_0x3cb81c(0x17d));export function extractTitleFromComment(_0x412722){const _0x22cf2d=a12_0x3cb81c;try{const _0x16ba90=readFileSync(_0x412722,_0x22cf2d(0x180)),_0x439ee0=_0x16ba90['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x439ee0&&_0x439ee0[0x1]){const _0x59f708=_0x439ee0[0x1],_0x1ad0ce=_0x59f708[_0x22cf2d(0x18c)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1ad0ce&&_0x1ad0ce[0x1])return _0x1ad0ce[0x1]['trim']();}let _0x5ab0e4=null;const _0xae7371=_0x16ba90['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0xae7371&&_0xae7371[0x1]&&(_0x5ab0e4=_0xae7371[0x1]);if(!_0x5ab0e4){const _0x479c79=_0x16ba90[_0x22cf2d(0x18c)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x479c79&&_0x479c79[0x1]&&(_0x5ab0e4=_0x479c79[0x1]);}if(_0x5ab0e4){const _0x43ed19=new RegExp('\x5cb'+_0x5ab0e4+_0x22cf2d(0x188)),_0x4155c1=_0x16ba90[_0x22cf2d(0x18c)](_0x43ed19);if(_0x4155c1&&_0x4155c1[0x1])return _0x4155c1[0x1];return _0x5ab0e4;}return null;}catch(_0x1c464f){return null;}}export function getLocalPages(_0x574501=pagesDir,_0x34a12=pagesDir){const _0x19c1b4=a12_0x3cb81c;let _0x58f275=[];const _0x2584d3=readdirSync(_0x574501);return _0x2584d3[_0x19c1b4(0x18d)](_0x482083=>{const _0x1b30bc=_0x19c1b4,_0x8af6c1=join(_0x574501,_0x482083),_0x18004d=statSync(_0x8af6c1);if(_0x18004d&&_0x18004d[_0x1b30bc(0x17b)]())_0x58f275=_0x58f275['concat'](getLocalPages(_0x8af6c1,_0x34a12));else{if(_0x482083['endsWith'](_0x1b30bc(0x184))){let _0x5d01db=relative(_0x34a12,_0x8af6c1);_0x5d01db[_0x1b30bc(0x182)]('index.tsx')?_0x5d01db=_0x5d01db['replace'](/index\.tsx$/,''):_0x5d01db=_0x5d01db[_0x1b30bc(0x185)](/\.tsx$/,'');_0x5d01db[_0x1b30bc(0x182)]('/')&&(_0x5d01db=_0x5d01db[_0x1b30bc(0x186)](0x0,-0x1));const _0x4dd58b=extractTitleFromComment(_0x8af6c1),_0x5d4884=_0x4dd58b||_0x5d01db;_0x58f275[_0x1b30bc(0x177)]({'path':_0x5d01db[_0x1b30bc(0x17e)]('$',':'),'label':_0x5d4884});}}}),_0x58f275[_0x19c1b4(0x181)](_0x1663d7=>_0x1663d7[_0x19c1b4(0x18b)]!=='');}
@@ -1 +1 @@
1
- (function(_0x4a7462,_0xa43f3a){const _0x237151=a13_0xa332,_0x586f22=_0x4a7462();while(!![]){try{const _0x49fcce=-parseInt(_0x237151(0x180))/0x1*(parseInt(_0x237151(0x1a5))/0x2)+-parseInt(_0x237151(0x187))/0x3*(parseInt(_0x237151(0x198))/0x4)+parseInt(_0x237151(0x19b))/0x5*(parseInt(_0x237151(0x1a1))/0x6)+parseInt(_0x237151(0x1a0))/0x7+parseInt(_0x237151(0x195))/0x8*(-parseInt(_0x237151(0x18d))/0x9)+parseInt(_0x237151(0x19d))/0xa+parseInt(_0x237151(0x1a4))/0xb;if(_0x49fcce===_0xa43f3a)break;else _0x586f22['push'](_0x586f22['shift']());}catch(_0x51b3d0){_0x586f22['push'](_0x586f22['shift']());}}}(a13_0x50cb,0x77fb7));import{getCookie}from'../auth/get-cookie.js';function a13_0x50cb(){const _0x5e8fc0=['status','4769358AIYhrQ','868nfxUnZ','/smartapi/menu/find?appCode=','appcode','\x20个线上菜单','error','1292VzdpAZ','resources','parse','正在获取线上菜单列表...\x20(appCode:\x20','info','!\x20请使用以下方式之一:','extend','2766tesvRW','errorCode','success','log','flat','json','110673QzYQlW','application/json','children','服务端返回空菜单列表','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','get-online-menu-list','path','获取菜单列表失败:\x20','592kwBIJf','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','errorMsg','2396GVeSRm','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','获取菜单列表失败,HTTP状态码:\x20','2227970KvvMyL','GET','4860330jfuvXC','未知错误','成功获取\x20','4925424mvhZgP','12NzEhHR','isArray'];a13_0x50cb=function(){return _0x5e8fc0;};return a13_0x50cb();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();function a13_0xa332(_0x255a7f,_0x152a67){_0x255a7f=_0x255a7f-0x17e;const _0x50cb59=a13_0x50cb();let _0xa3325a=_0x50cb59[_0x255a7f];return _0xa3325a;}export async function getOnlineMenuList(){const _0x5e14f0=a13_0xa332,_0x4b8cc1=config?.[_0x5e14f0(0x1a7)];if(!_0x4b8cc1){const _0x25ae9b='未提供应用AppCode,且配置中也没有默认值';return logger[_0x5e14f0(0x17f)](_0x5e14f0(0x192),_0x25ae9b),console['error']('×\x20'+_0x25ae9b),console[_0x5e14f0(0x18a)](_0x5e14f0(0x185)),console[_0x5e14f0(0x18a)](_0x5e14f0(0x199)),console[_0x5e14f0(0x18a)](_0x5e14f0(0x191)),[];}logger[_0x5e14f0(0x184)](_0x5e14f0(0x192),_0x5e14f0(0x183)+_0x4b8cc1+')');const _0x112035=await fetch(getApiDomain()+_0x5e14f0(0x1a6)+_0x4b8cc1,{'method':_0x5e14f0(0x19c),'headers':{'Content-Type':_0x5e14f0(0x18e),'Cookie':getCookie()}});if(!_0x112035['ok']){if(_0x112035[_0x5e14f0(0x1a3)]===0x191){const _0xc4ee1e=_0x5e14f0(0x196);logger[_0x5e14f0(0x17f)](_0x5e14f0(0x192),_0xc4ee1e,{'status':_0x112035[_0x5e14f0(0x1a3)]});throw new Error(_0xc4ee1e);}const _0x36ca45=_0x5e14f0(0x19a)+_0x112035[_0x5e14f0(0x1a3)];logger['error'](_0x5e14f0(0x192),_0x36ca45);throw new Error(_0x36ca45);}const _0x49e3b7=await _0x112035[_0x5e14f0(0x18c)]();if(!_0x49e3b7[_0x5e14f0(0x189)]){const _0x27a58f=_0x5e14f0(0x194)+(_0x49e3b7['errorMsg']||_0x5e14f0(0x19e));logger[_0x5e14f0(0x17f)](_0x5e14f0(0x192),_0x27a58f,{'errorCode':_0x49e3b7[_0x5e14f0(0x188)],'errorMsg':_0x49e3b7[_0x5e14f0(0x197)]});throw new Error(_0x27a58f);}if(!_0x49e3b7['data'])return logger[_0x5e14f0(0x184)](_0x5e14f0(0x192),_0x5e14f0(0x190)),[];return logger['info']('get-online-menu-list',_0x5e14f0(0x19f)+_0x49e3b7['data']['length']+_0x5e14f0(0x17e)),_0x49e3b7['data']['map'](formatMenuList)[_0x5e14f0(0x18b)]();}function formatMenuList(_0x115c6a){const _0x203fc0=a13_0xa332;let _0x5893d2=[];try{if(_0x115c6a[_0x203fc0(0x186)]?.[_0x203fc0(0x181)]){const _0x250e51=JSON[_0x203fc0(0x182)](_0x115c6a[_0x203fc0(0x186)][_0x203fc0(0x181)]);Array[_0x203fc0(0x1a2)](_0x250e51)&&(_0x5893d2=_0x250e51);}}catch(_0x16ed3e){}const _0x33b3dd=[{'id':_0x115c6a['id'],'path':_0x115c6a[_0x203fc0(0x193)],'label':_0x115c6a['label'],'resources':_0x5893d2}];if(_0x115c6a[_0x203fc0(0x18f)]&&_0x115c6a[_0x203fc0(0x18f)]['length']>0x0)for(const _0x29bfc6 of _0x115c6a[_0x203fc0(0x18f)]){_0x33b3dd['push'](...formatMenuList(_0x29bfc6));}return _0x33b3dd;}
1
+ (function(_0x1bea09,_0x3522a6){const _0x383d78=a13_0x43be,_0x2300df=_0x1bea09();while(!![]){try{const _0x48c408=parseInt(_0x383d78(0x1b8))/0x1*(-parseInt(_0x383d78(0x1a8))/0x2)+parseInt(_0x383d78(0x1b6))/0x3*(parseInt(_0x383d78(0x1b7))/0x4)+parseInt(_0x383d78(0x1b1))/0x5+parseInt(_0x383d78(0x192))/0x6*(-parseInt(_0x383d78(0x197))/0x7)+-parseInt(_0x383d78(0x19f))/0x8*(parseInt(_0x383d78(0x1a0))/0x9)+-parseInt(_0x383d78(0x1a7))/0xa+-parseInt(_0x383d78(0x193))/0xb*(-parseInt(_0x383d78(0x1ba))/0xc);if(_0x48c408===_0x3522a6)break;else _0x2300df['push'](_0x2300df['shift']());}catch(_0x108bf4){_0x2300df['push'](_0x2300df['shift']());}}}(a13_0x20cb,0xda3fe));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a13_0x43be(_0x34a518,_0x327ccf){_0x34a518=_0x34a518-0x190;const _0x20cb92=a13_0x20cb();let _0x43beac=_0x20cb92[_0x34a518];return _0x43beac;}import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x1871ee=a13_0x43be,_0x3cd4b1=config?.[_0x1871ee(0x1a6)];if(!_0x3cd4b1){const _0x792572=_0x1871ee(0x191);return logger[_0x1871ee(0x198)](_0x1871ee(0x1a4),_0x792572),console[_0x1871ee(0x198)]('×\x20'+_0x792572),console[_0x1871ee(0x1a5)]('!\x20请使用以下方式之一:'),console[_0x1871ee(0x1a5)](_0x1871ee(0x1b5)),console[_0x1871ee(0x1a5)](_0x1871ee(0x1bb)),[];}logger[_0x1871ee(0x1aa)](_0x1871ee(0x1a4),_0x1871ee(0x196)+_0x3cd4b1+')');const _0x4fedc6=await fetch(getApiDomain()+_0x1871ee(0x1af)+_0x3cd4b1,{'method':_0x1871ee(0x1a2),'headers':{'Content-Type':_0x1871ee(0x1a9),'Cookie':getCookie()}});if(!_0x4fedc6['ok']){if(_0x4fedc6[_0x1871ee(0x1a3)]===0x191){const _0x366905=_0x1871ee(0x1b9);logger['error'](_0x1871ee(0x1a4),_0x366905,{'status':_0x4fedc6['status']});throw new Error(_0x366905);}const _0x503387=_0x1871ee(0x19b)+_0x4fedc6[_0x1871ee(0x1a3)];logger[_0x1871ee(0x198)]('get-online-menu-list',_0x503387);throw new Error(_0x503387);}const _0x1217e6=await _0x4fedc6['json']();if(!_0x1217e6['success']){const _0x8a0147='获取菜单列表失败:\x20'+(_0x1217e6[_0x1871ee(0x1b2)]||_0x1871ee(0x19e));logger[_0x1871ee(0x198)]('get-online-menu-list',_0x8a0147,{'errorCode':_0x1217e6[_0x1871ee(0x1b0)],'errorMsg':_0x1217e6[_0x1871ee(0x1b2)]});throw new Error(_0x8a0147);}if(!_0x1217e6[_0x1871ee(0x199)])return logger[_0x1871ee(0x1aa)](_0x1871ee(0x1a4),_0x1871ee(0x1ab)),[];return logger['info']('get-online-menu-list',_0x1871ee(0x1ae)+_0x1217e6[_0x1871ee(0x199)][_0x1871ee(0x1a1)]+_0x1871ee(0x1b4)),_0x1217e6['data'][_0x1871ee(0x1ac)](formatMenuList)[_0x1871ee(0x19a)]();}function a13_0x20cb(){const _0x104bd6=['appcode','13427030tSCVKh','2566WCShIw','application/json','info','服务端返回空菜单列表','map','isArray','成功获取\x20','/smartapi/menu/find?appCode=','errorCode','2333395iHzPLG','errorMsg','path','\x20个线上菜单','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','5613MiCgrT','788NOOsgj','997xlCUHV','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','1479396DxboPM','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','resources','未提供应用AppCode,且配置中也没有默认值','63660fkQYmK','374XmePKC','parse','push','正在获取线上菜单列表...\x20(appCode:\x20','245lWMbYt','error','data','flat','获取菜单列表失败,HTTP状态码:\x20','children','extend','未知错误','5392SGhanB','15219VLOqBn','length','GET','status','get-online-menu-list','log'];a13_0x20cb=function(){return _0x104bd6;};return a13_0x20cb();}function formatMenuList(_0x5da8c5){const _0x5e2912=a13_0x43be;let _0x332889=[];try{if(_0x5da8c5[_0x5e2912(0x19d)]?.[_0x5e2912(0x190)]){const _0x2a229c=JSON[_0x5e2912(0x194)](_0x5da8c5[_0x5e2912(0x19d)][_0x5e2912(0x190)]);Array[_0x5e2912(0x1ad)](_0x2a229c)&&(_0x332889=_0x2a229c);}}catch(_0x200733){}const _0x4ef70c=[{'id':_0x5da8c5['id'],'path':_0x5da8c5[_0x5e2912(0x1b3)],'label':_0x5da8c5['label'],'resources':_0x332889}];if(_0x5da8c5['children']&&_0x5da8c5[_0x5e2912(0x19c)][_0x5e2912(0x1a1)]>0x0)for(const _0xf9bf03 of _0x5da8c5[_0x5e2912(0x19c)]){_0x4ef70c[_0x5e2912(0x195)](...formatMenuList(_0xf9bf03));}return _0x4ef70c;}
@@ -1 +1 @@
1
- function a15_0x3663(_0x597e90,_0x177aef){_0x597e90=_0x597e90-0x8a;const _0x5e4cf2=a15_0x5e4c();let _0x366394=_0x5e4cf2[_0x597e90];return _0x366394;}(function(_0x2d53a1,_0x146870){const _0x1be349=a15_0x3663,_0x3a22b5=_0x2d53a1();while(!![]){try{const _0x184fcf=parseInt(_0x1be349(0x95))/0x1*(-parseInt(_0x1be349(0x8f))/0x2)+-parseInt(_0x1be349(0x96))/0x3+parseInt(_0x1be349(0x8b))/0x4+parseInt(_0x1be349(0x94))/0x5+parseInt(_0x1be349(0x8e))/0x6*(parseInt(_0x1be349(0x90))/0x7)+-parseInt(_0x1be349(0x8d))/0x8*(-parseInt(_0x1be349(0x98))/0x9)+parseInt(_0x1be349(0x92))/0xa*(-parseInt(_0x1be349(0x93))/0xb);if(_0x184fcf===_0x146870)break;else _0x3a22b5['push'](_0x3a22b5['shift']());}catch(_0x393c10){_0x3a22b5['push'](_0x3a22b5['shift']());}}}(a15_0x5e4c,0x7b843));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';function a15_0x5e4c(){const _0xd93ccc=['7OXfoxB','finally','5077590dXfsOL','33achvVP','1388965kZYIlL','7MWLfkd','392511SISBmF','catch','8070939FuGWTo','then','3023564FiGLAt','message','8ESkqPb','5566278MnMBHB','199466FXzkmj'];a15_0x5e4c=function(){return _0xd93ccc;};return a15_0x5e4c();}export function useGetOnlineMenuList(){const [_0x23f12c,_0x38dbc0]=useState([]),[_0x1b38d6,_0x4f9b32]=useState(!![]),[_0x28006b,_0x53459d]=useState('');return useEffect(()=>{const _0x51ac5f=a15_0x3663;_0x4f9b32(!![]),_0x53459d(''),getOnlineMenuList()[_0x51ac5f(0x8a)](_0x38dbc0)[_0x51ac5f(0x97)](_0x2e5054=>{const _0x59d95c=_0x51ac5f;_0x53459d(_0x2e5054[_0x59d95c(0x8c)]||'获取菜单列表失败');})[_0x51ac5f(0x91)](()=>_0x4f9b32(![]));},[]),{'menuList':_0x23f12c,'loading':_0x1b38d6,'error':_0x28006b};}
1
+ (function(_0xed3eec,_0x2f63a2){const _0x2f1d82=a15_0x5e2b,_0x118526=_0xed3eec();while(!![]){try{const _0x193687=parseInt(_0x2f1d82(0x144))/0x1+parseInt(_0x2f1d82(0x14a))/0x2*(-parseInt(_0x2f1d82(0x149))/0x3)+parseInt(_0x2f1d82(0x14c))/0x4*(parseInt(_0x2f1d82(0x147))/0x5)+-parseInt(_0x2f1d82(0x145))/0x6+-parseInt(_0x2f1d82(0x14d))/0x7+-parseInt(_0x2f1d82(0x146))/0x8+parseInt(_0x2f1d82(0x14f))/0x9;if(_0x193687===_0x2f63a2)break;else _0x118526['push'](_0x118526['shift']());}catch(_0x437037){_0x118526['push'](_0x118526['shift']());}}}(a15_0xe630,0x1fb3e));function a15_0xe630(){const _0x49bfc1=['816948aqatre','1841848VuJCJA','1585kuvowC','catch','17007nfaJBX','60iDOcgK','获取菜单列表失败','2724itNccx','1473927QKTSBZ','finally','3695724LbDKjk','250361iAKZIs'];a15_0xe630=function(){return _0x49bfc1;};return a15_0xe630();}import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';function a15_0x5e2b(_0x6d62fa,_0x5adef6){_0x6d62fa=_0x6d62fa-0x144;const _0xe630c3=a15_0xe630();let _0x5e2b1d=_0xe630c3[_0x6d62fa];return _0x5e2b1d;}export function useGetOnlineMenuList(){const [_0x3b0502,_0x3be97d]=useState([]),[_0x42eb5a,_0x2fc4ae]=useState(!![]),[_0x57da86,_0x2dcb00]=useState('');return useEffect(()=>{const _0x30bb19=a15_0x5e2b;_0x2fc4ae(!![]),_0x2dcb00(''),getOnlineMenuList()['then'](_0x3be97d)[_0x30bb19(0x148)](_0x11c6a7=>{const _0x3d43dd=_0x30bb19;_0x2dcb00(_0x11c6a7['message']||_0x3d43dd(0x14b));})[_0x30bb19(0x14e)](()=>_0x2fc4ae(![]));},[]),{'menuList':_0x3b0502,'loading':_0x42eb5a,'error':_0x57da86};}
@@ -1 +1 @@
1
- (function(_0x56cc7c,_0x3b6745){const _0x4ed6bd=a16_0xe94b,_0x37e15d=_0x56cc7c();while(!![]){try{const _0x4a8b6c=-parseInt(_0x4ed6bd(0x16a))/0x1+-parseInt(_0x4ed6bd(0x16e))/0x2*(parseInt(_0x4ed6bd(0x168))/0x3)+parseInt(_0x4ed6bd(0x16c))/0x4*(parseInt(_0x4ed6bd(0x167))/0x5)+parseInt(_0x4ed6bd(0x169))/0x6*(-parseInt(_0x4ed6bd(0x16b))/0x7)+-parseInt(_0x4ed6bd(0x165))/0x8*(-parseInt(_0x4ed6bd(0x161))/0x9)+parseInt(_0x4ed6bd(0x16d))/0xa+parseInt(_0x4ed6bd(0x162))/0xb;if(_0x4a8b6c===_0x3b6745)break;else _0x37e15d['push'](_0x37e15d['shift']());}catch(_0x2d6872){_0x37e15d['push'](_0x37e15d['shift']());}}}(a16_0x24ff,0x7b9c1));export function getRemainingSpaces(_0x17049a,_0x3fe73a){const _0x4f251a=a16_0xe94b,_0x2f0b48=getStringWidth(_0x3fe73a);return Array(Math[_0x4f251a(0x170)](0x0,_0x17049a-_0x2f0b48))[_0x4f251a(0x163)]('\x20')[_0x4f251a(0x164)]('');}function a16_0x24ff(){const _0xdf5c6a=['max','4023oxSSAI','11252989XUthZp','fill','join','14296tTLmil','repeat','205BlIHYy','1486371YQSmQt','665052UYGVPQ','694383sqImdN','56PDeMHR','28276pnsvVC','4712640AcYQKH','2nlqfFv','test'];a16_0x24ff=function(){return _0xdf5c6a;};return a16_0x24ff();}export function getMaxWidth(_0x36af4c,_0x4473d5=0x2){const _0xbaa068=a16_0xe94b;let _0x46396e='',_0x3aa12f=0x0;for(const _0x29afcf of _0x36af4c){const _0x504349=getStringWidth(_0x29afcf);_0x504349>_0x3aa12f&&(_0x3aa12f=_0x504349,_0x46396e=_0x29afcf);}return _0x46396e+'\x20'[_0xbaa068(0x166)](_0x4473d5);}function a16_0xe94b(_0xbfcdc2,_0x40c010){_0xbfcdc2=_0xbfcdc2-0x161;const _0x24ffd1=a16_0x24ff();let _0xe94b56=_0x24ffd1[_0xbfcdc2];return _0xe94b56;}export function getStringWidth(_0x90357c){const _0x2595b4=a16_0xe94b;let _0x24bb4a=0x0;for(const _0x4d471a of _0x90357c){/[\u4e00-\u9fa5]/[_0x2595b4(0x16f)](_0x4d471a)?_0x24bb4a+=0x2:_0x24bb4a+=0x1;}return _0x24bb4a;}
1
+ (function(_0x5ed5b0,_0x30d059){const _0x40715f=a16_0x889b,_0x102e5e=_0x5ed5b0();while(!![]){try{const _0x3f3a4f=-parseInt(_0x40715f(0x1ab))/0x1*(parseInt(_0x40715f(0x1a8))/0x2)+parseInt(_0x40715f(0x19e))/0x3*(-parseInt(_0x40715f(0x19c))/0x4)+parseInt(_0x40715f(0x1a4))/0x5+parseInt(_0x40715f(0x1a9))/0x6*(-parseInt(_0x40715f(0x1a1))/0x7)+-parseInt(_0x40715f(0x1aa))/0x8+parseInt(_0x40715f(0x1a7))/0x9*(parseInt(_0x40715f(0x1a0))/0xa)+parseInt(_0x40715f(0x19d))/0xb;if(_0x3f3a4f===_0x30d059)break;else _0x102e5e['push'](_0x102e5e['shift']());}catch(_0xf87c86){_0x102e5e['push'](_0x102e5e['shift']());}}}(a16_0x5b9d,0xa4d5b));export function getRemainingSpaces(_0x558c8f,_0x20121f){const _0x4d534c=a16_0x889b,_0x4d558b=getStringWidth(_0x20121f);return Array(Math[_0x4d534c(0x1a2)](0x0,_0x558c8f-_0x4d558b))[_0x4d534c(0x1a3)]('\x20')[_0x4d534c(0x19f)]('');}function a16_0x889b(_0x3f066b,_0x482386){_0x3f066b=_0x3f066b-0x19c;const _0x5b9d11=a16_0x5b9d();let _0x889b80=_0x5b9d11[_0x3f066b];return _0x889b80;}export function getMaxWidth(_0x21ed83,_0x35ec85=0x2){const _0x4395f5=a16_0x889b;let _0x553dd3='',_0x517b9e=0x0;for(const _0x5d331e of _0x21ed83){const _0xd71428=getStringWidth(_0x5d331e);_0xd71428>_0x517b9e&&(_0x517b9e=_0xd71428,_0x553dd3=_0x5d331e);}return _0x553dd3+'\x20'[_0x4395f5(0x1a6)](_0x35ec85);}function a16_0x5b9d(){const _0x2cbbe7=['test','repeat','18AwiAPD','3614slDuEF','109194WFCzJX','10560976BxTVdD','523JNoWNR','1057352dlVAvD','22822910KKNEQJ','6iTPLRR','join','6138350nnGVpv','133wtoUKQ','max','fill','2561615BiGCbl'];a16_0x5b9d=function(){return _0x2cbbe7;};return a16_0x5b9d();}export function getStringWidth(_0x3dbda1){const _0x974e37=a16_0x889b;let _0xd110b0=0x0;for(const _0x34eb15 of _0x3dbda1){/[\u4e00-\u9fa5]/[_0x974e37(0x1a5)](_0x34eb15)?_0xd110b0+=0x2:_0xd110b0+=0x1;}return _0xd110b0;}
@@ -1 +1 @@
1
- (function(_0x1b4886,_0x15f041){const _0x1dc15c=a17_0xed43,_0x4bc291=_0x1b4886();while(!![]){try{const _0x1cf6e0=parseInt(_0x1dc15c(0xd0))/0x1*(parseInt(_0x1dc15c(0xdd))/0x2)+-parseInt(_0x1dc15c(0xd3))/0x3+-parseInt(_0x1dc15c(0xd4))/0x4+parseInt(_0x1dc15c(0xd6))/0x5*(-parseInt(_0x1dc15c(0xdb))/0x6)+-parseInt(_0x1dc15c(0xd8))/0x7*(-parseInt(_0x1dc15c(0xcf))/0x8)+-parseInt(_0x1dc15c(0xda))/0x9*(-parseInt(_0x1dc15c(0xd9))/0xa)+parseInt(_0x1dc15c(0xd2))/0xb*(parseInt(_0x1dc15c(0xd7))/0xc);if(_0x1cf6e0===_0x15f041)break;else _0x4bc291['push'](_0x4bc291['shift']());}catch(_0x4ad414){_0x4bc291['push'](_0x4bc291['shift']());}}}(a17_0x176b,0xd6eb4));export function isValidJsHttpsUrl(_0x312f9a){const _0x5e84b5=a17_0xed43;return/^https:\/\/.+\.js(\?.*)?$/[_0x5e84b5(0xdc)](_0x312f9a[_0x5e84b5(0xd1)]());}export function isValidCssHttpsUrl(_0x41e3e3){const _0x57ca41=a17_0xed43;return/^https:\/\/.+\.css(\?.*)?$/[_0x57ca41(0xdc)](_0x41e3e3[_0x57ca41(0xd1)]());}export async function isUrlReachable(_0x4e8e79){const _0x16e28f=a17_0xed43;try{const _0x273c4d=await fetch(_0x4e8e79,{'method':_0x16e28f(0xd5)});return _0x273c4d['ok'];}catch{return![];}}function a17_0xed43(_0x3c5c27,_0x94d53){_0x3c5c27=_0x3c5c27-0xcf;const _0x176bd1=a17_0x176b();let _0xed436d=_0x176bd1[_0x3c5c27];return _0xed436d;}function a17_0x176b(){const _0x26778f=['532XqFonO','4390SLZiul','21753vrgFbL','30auQcjd','test','257874knZRQB','62240KFPMHA','12EYqKiE','trim','14894oAAldt','874815IsEIWI','4568352gAAWza','HEAD','934330GpCqXc','432HFaqoC'];a17_0x176b=function(){return _0x26778f;};return a17_0x176b();}
1
+ function a17_0x42bb(_0x4fb9a2,_0x12f86a){_0x4fb9a2=_0x4fb9a2-0xdf;const _0xed4f56=a17_0xed4f();let _0x42bbea=_0xed4f56[_0x4fb9a2];return _0x42bbea;}(function(_0x4b85d8,_0x47e86f){const _0xa07fec=a17_0x42bb,_0x2fa22a=_0x4b85d8();while(!![]){try{const _0x13b11a=parseInt(_0xa07fec(0xe2))/0x1+parseInt(_0xa07fec(0xea))/0x2+parseInt(_0xa07fec(0xe0))/0x3+-parseInt(_0xa07fec(0xe9))/0x4*(-parseInt(_0xa07fec(0xe1))/0x5)+-parseInt(_0xa07fec(0xe7))/0x6*(-parseInt(_0xa07fec(0xe8))/0x7)+-parseInt(_0xa07fec(0xe5))/0x8+-parseInt(_0xa07fec(0xe4))/0x9;if(_0x13b11a===_0x47e86f)break;else _0x2fa22a['push'](_0x2fa22a['shift']());}catch(_0x3f57c7){_0x2fa22a['push'](_0x2fa22a['shift']());}}}(a17_0xed4f,0xdccd5));function a17_0xed4f(){const _0x8ecc03=['516cPfYep','134295fuqFGp','4hCeIWh','220218ItCQCw','trim','3161238BMoVYv','8430770iPefSB','1199267gPyIkP','HEAD','31009365YtdRZM','10794368pKDaoh','test'];a17_0xed4f=function(){return _0x8ecc03;};return a17_0xed4f();}export function isValidJsHttpsUrl(_0x292810){const _0x3af13b=a17_0x42bb;return/^https:\/\/.+\.js(\?.*)?$/[_0x3af13b(0xe6)](_0x292810[_0x3af13b(0xdf)]());}export function isValidCssHttpsUrl(_0x59204a){const _0x564472=a17_0x42bb;return/^https:\/\/.+\.css(\?.*)?$/[_0x564472(0xe6)](_0x59204a[_0x564472(0xdf)]());}export async function isUrlReachable(_0x5cf7f0){const _0x498af5=a17_0x42bb;try{const _0x3c8984=await fetch(_0x5cf7f0,{'method':_0x498af5(0xe3)});return _0x3c8984['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a18_0x10a0(_0x40a8d7,_0x1185a6){_0x40a8d7=_0x40a8d7-0x155;const _0x491f99=a18_0x491f();let _0x10a0e3=_0x491f99[_0x40a8d7];return _0x10a0e3;}(function(_0x43319a,_0x537488){const _0x3d8f5c=a18_0x10a0,_0x346ad9=_0x43319a();while(!![]){try{const _0x313372=-parseInt(_0x3d8f5c(0x15d))/0x1*(-parseInt(_0x3d8f5c(0x160))/0x2)+-parseInt(_0x3d8f5c(0x162))/0x3+parseInt(_0x3d8f5c(0x15a))/0x4+-parseInt(_0x3d8f5c(0x163))/0x5*(parseInt(_0x3d8f5c(0x161))/0x6)+parseInt(_0x3d8f5c(0x15e))/0x7+parseInt(_0x3d8f5c(0x15c))/0x8*(-parseInt(_0x3d8f5c(0x158))/0x9)+parseInt(_0x3d8f5c(0x159))/0xa;if(_0x313372===_0x537488)break;else _0x346ad9['push'](_0x346ad9['shift']());}catch(_0x454a81){_0x346ad9['push'](_0x346ad9['shift']());}}}(a18_0x491f,0x8b10a));function a18_0x491f(){const _0x1d24c4=['filter','待更新的资源链接:','length','map','from','195417JCRUmC','5454350HRUryj','1994388tzQtkI','column','232OLKbwz','1014CComRG','1586151kxFmcX','cyan','1446LmkINR','234JpVilE','791877LZPLIJ','69295DnZXNp'];a18_0x491f=function(){return _0x1d24c4;};return a18_0x491f();}import{jsx as a18_0x550396,jsxs as a18_0x252bb5}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x493595){const _0x500dd4=a18_0x10a0,{menuList:_0x1d9203}=_0x493595,_0x33be16=_0x1d9203[_0x500dd4(0x164)](_0x1ed69b=>_0x1ed69b['resources'][_0x500dd4(0x155)]),_0x4f4760=Array[_0x500dd4(0x157)](new Set(_0x1d9203[_0x500dd4(0x156)](_0x2b90c0=>_0x2b90c0['resources'])['flat']()));return a18_0x252bb5(Box,{'flexDirection':_0x500dd4(0x15b),'children':[a18_0x550396(Text,{'color':_0x500dd4(0x15f),'children':'*\x20待更新的菜单&资源链接'}),a18_0x252bb5(Box,{'marginTop':0x1,'flexDirection':'column','children':[a18_0x252bb5(Text,{'bold':!![],'children':['\x20\x20','待更新的菜单列表:']}),a18_0x252bb5(Text,{'children':['\x20\x20',_0x33be16[_0x500dd4(0x156)](_0x3b0f16=>_0x3b0f16['label'])['join'](',\x20')]})]}),a18_0x550396(Box,{'marginTop':0x1,'children':a18_0x252bb5(Text,{'bold':!![],'children':['\x20\x20',_0x500dd4(0x165)]})}),_0x4f4760[_0x500dd4(0x156)](_0x2c4672=>a18_0x550396(Box,{'children':a18_0x252bb5(Text,{'children':['\x20\x20',_0x2c4672]})},_0x2c4672))]});}
1
+ (function(_0x33b70d,_0x19bfc4){const _0x50754a=a18_0x3bdb,_0x1bc696=_0x33b70d();while(!![]){try{const _0x5de4d3=-parseInt(_0x50754a(0x95))/0x1+-parseInt(_0x50754a(0x8e))/0x2+parseInt(_0x50754a(0x8d))/0x3+-parseInt(_0x50754a(0x8f))/0x4+-parseInt(_0x50754a(0x9b))/0x5+parseInt(_0x50754a(0x9c))/0x6+parseInt(_0x50754a(0x96))/0x7*(parseInt(_0x50754a(0x98))/0x8);if(_0x5de4d3===_0x19bfc4)break;else _0x1bc696['push'](_0x1bc696['shift']());}catch(_0x410f44){_0x1bc696['push'](_0x1bc696['shift']());}}}(a18_0x1ea3,0xbdd9a));function a18_0x3bdb(_0x5d6512,_0x392729){_0x5d6512=_0x5d6512-0x8c;const _0x1ea3e8=a18_0x1ea3();let _0x3bdbee=_0x1ea3e8[_0x5d6512];return _0x3bdbee;}function a18_0x1ea3(){const _0x4fa48d=['flat','length','2868528XynqpK','1750132FsPvCO','1308276fivbMc','join','待更新的资源链接:','map','待更新的菜单列表:','resources','1475206PaZyXz','5304565WwdgQE','*\x20待更新的菜单&资源链接','24ORGTyr','from','column','3600250BqeOuD','5672736VjHMEq','filter','cyan'];a18_0x1ea3=function(){return _0x4fa48d;};return a18_0x1ea3();}import{jsx as a18_0x3f02bc,jsxs as a18_0x421998}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x2e467a){const _0x50ecb8=a18_0x3bdb,{menuList:_0x100f49}=_0x2e467a,_0x2f549c=_0x100f49[_0x50ecb8(0x9d)](_0x42c15c=>_0x42c15c[_0x50ecb8(0x94)][_0x50ecb8(0x8c)]),_0x136903=Array[_0x50ecb8(0x99)](new Set(_0x100f49[_0x50ecb8(0x92)](_0x2bf7a0=>_0x2bf7a0[_0x50ecb8(0x94)])[_0x50ecb8(0x9f)]()));return a18_0x421998(Box,{'flexDirection':'column','children':[a18_0x3f02bc(Text,{'color':_0x50ecb8(0x9e),'children':_0x50ecb8(0x97)}),a18_0x421998(Box,{'marginTop':0x1,'flexDirection':_0x50ecb8(0x9a),'children':[a18_0x421998(Text,{'bold':!![],'children':['\x20\x20',_0x50ecb8(0x93)]}),a18_0x421998(Text,{'children':['\x20\x20',_0x2f549c[_0x50ecb8(0x92)](_0x2c617e=>_0x2c617e['label'])[_0x50ecb8(0x90)](',\x20')]})]}),a18_0x3f02bc(Box,{'marginTop':0x1,'children':a18_0x421998(Text,{'bold':!![],'children':['\x20\x20',_0x50ecb8(0x91)]})}),_0x136903[_0x50ecb8(0x92)](_0x406307=>a18_0x3f02bc(Box,{'children':a18_0x421998(Text,{'children':['\x20\x20',_0x406307]})},_0x406307))]});}
@@ -1 +1 @@
1
- (function(_0x3b01ee,_0x5a50d5){const _0x40785f=a19_0x21ae,_0x1da1f4=_0x3b01ee();while(!![]){try{const _0x306cbd=-parseInt(_0x40785f(0x9e))/0x1+parseInt(_0x40785f(0x9b))/0x2+-parseInt(_0x40785f(0xa0))/0x3+parseInt(_0x40785f(0xa3))/0x4+parseInt(_0x40785f(0xa4))/0x5+parseInt(_0x40785f(0xa2))/0x6*(-parseInt(_0x40785f(0xa5))/0x7)+parseInt(_0x40785f(0x9c))/0x8;if(_0x306cbd===_0x5a50d5)break;else _0x1da1f4['push'](_0x1da1f4['shift']());}catch(_0x336c20){_0x1da1f4['push'](_0x1da1f4['shift']());}}}(a19_0x14e2,0x80ff0));import{jsx as a19_0x19ce01,jsxs as a19_0x505524}from'react/jsx-runtime';function a19_0x21ae(_0x15ad3d,_0x1e2e76){_0x15ad3d=_0x15ad3d-0x9b;const _0x14e244=a19_0x14e2();let _0x21ae94=_0x14e244[_0x15ad3d];return _0x21ae94;}import{Text,Box}from'ink';function a19_0x14e2(){const _0xed93d5=['green','498790bpyzsA','cyan','1655298IIiRJB','*\x20已输入的资源资源','1577448bkrlYq','1202308HZzViN','1813490ITAPJy','7aRxlTK','column','1186678hczoWm','4681744hDwfVr'];a19_0x14e2=function(){return _0xed93d5;};return a19_0x14e2();}export function InputCdnAsset(_0x387654){const _0x3b73e9=a19_0x21ae,{jsCdnUrl:_0x59ef0f,cssCdnUrl:_0x11f664}=_0x387654;return a19_0x505524(Box,{'flexDirection':_0x3b73e9(0xa6),'marginTop':0x1,'children':[a19_0x19ce01(Text,{'color':_0x3b73e9(0x9f),'children':_0x3b73e9(0xa1)}),a19_0x505524(Box,{'children':[a19_0x505524(Text,{'children':['\x20\x20','JS\x20链接:\x20']}),a19_0x19ce01(Text,{'color':'green','children':_0x59ef0f})]}),a19_0x505524(Box,{'children':[a19_0x505524(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a19_0x19ce01(Text,{'color':_0x3b73e9(0x9d),'children':_0x11f664})]})]});}
1
+ function a19_0x46bd(_0x1227f8,_0x4f2c9d){_0x1227f8=_0x1227f8-0x18b;const _0x3822e5=a19_0x3822();let _0x46bd8a=_0x3822e5[_0x1227f8];return _0x46bd8a;}function a19_0x3822(){const _0x5cb130=['171UPIQVr','CSS\x20链接:\x20','24944YGmOkN','2JDlLQJ','3930168QNYzeZ','1219317mAukZO','cyan','231610iPNzGD','1420615LoWxeY','455859vLYGOD','JS\x20链接:\x20','1204HVpljw','340320BcqHVv'];a19_0x3822=function(){return _0x5cb130;};return a19_0x3822();}(function(_0x4bab81,_0x1da8ba){const _0x39abd8=a19_0x46bd,_0x589c84=_0x4bab81();while(!![]){try{const _0x11774f=-parseInt(_0x39abd8(0x197))/0x1*(parseInt(_0x39abd8(0x191))/0x2)+parseInt(_0x39abd8(0x193))/0x3+-parseInt(_0x39abd8(0x18d))/0x4+parseInt(_0x39abd8(0x196))/0x5+-parseInt(_0x39abd8(0x192))/0x6+parseInt(_0x39abd8(0x18c))/0x7*(parseInt(_0x39abd8(0x190))/0x8)+-parseInt(_0x39abd8(0x18e))/0x9*(-parseInt(_0x39abd8(0x195))/0xa);if(_0x11774f===_0x1da8ba)break;else _0x589c84['push'](_0x589c84['shift']());}catch(_0x646702){_0x589c84['push'](_0x589c84['shift']());}}}(a19_0x3822,0x72fa6));import{jsx as a19_0x3838e7,jsxs as a19_0x482024}from'react/jsx-runtime';import{Text,Box}from'ink';export function InputCdnAsset(_0x212e59){const _0x1c38b0=a19_0x46bd,{jsCdnUrl:_0x3caeda,cssCdnUrl:_0xaa2f3b}=_0x212e59;return a19_0x482024(Box,{'flexDirection':'column','marginTop':0x1,'children':[a19_0x3838e7(Text,{'color':_0x1c38b0(0x194),'children':'*\x20已输入的资源资源'}),a19_0x482024(Box,{'children':[a19_0x482024(Text,{'children':['\x20\x20',_0x1c38b0(0x18b)]}),a19_0x3838e7(Text,{'color':'green','children':_0x3caeda})]}),a19_0x482024(Box,{'children':[a19_0x482024(Text,{'children':['\x20\x20',_0x1c38b0(0x18f)]}),a19_0x3838e7(Text,{'color':'green','children':_0xaa2f3b})]})]});}
@@ -1 +1 @@
1
- (function(_0x564812,_0x1b3489){const _0x4d74fe=a20_0x1aa3,_0x47d434=_0x564812();while(!![]){try{const _0x475f39=parseInt(_0x4d74fe(0xe6))/0x1+parseInt(_0x4d74fe(0xdf))/0x2+-parseInt(_0x4d74fe(0xde))/0x3+parseInt(_0x4d74fe(0xce))/0x4*(-parseInt(_0x4d74fe(0xbb))/0x5)+parseInt(_0x4d74fe(0xcf))/0x6+-parseInt(_0x4d74fe(0xc6))/0x7*(-parseInt(_0x4d74fe(0xbe))/0x8)+parseInt(_0x4d74fe(0xcc))/0x9;if(_0x475f39===_0x1b3489)break;else _0x47d434['push'](_0x47d434['shift']());}catch(_0x30d814){_0x47d434['push'](_0x47d434['shift']());}}}(a20_0x8f17,0x61128));import{jsx as a20_0x23c910,jsxs as a20_0x1e3dc7,Fragment as a20_0x16f527}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a20_0x46144b from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';function a20_0x8f17(){const _0x4c0d0b=['JS\x20链接:\x20','green','\x20正在获取线上菜单资源链接...','CSS\x20链接无法访问','\x20←\x20','\x20命令重新登录','need-confirm','676389pDMcMq','column','map','\x20资源正在同步中...','rightArrow','dots','6066036VqfvdT','backspace','3316wbDuIw','1013466BJkvTy','*\x20请输入新的资源链接','red','gray','请输入有效的\x20JS\x20https\x20链接','√\x20更新成功','yellow','input-js','return','creating','请输入有效的\x20CSS\x20https\x20链接','resolve','CSS\x20链接:\x20','input-css','提示:使用\x20','2238255IDuTeD','998448VMqZDy','!\x20未找到菜单资源链接','输入项目的\x20CSS\x20资源链接(https://...)','length','delete','label','trim','461804hsNWxU','继续更新','cancel','updated','all','downArrow','cyan','输入项目的\x20JS\x20资源链接(https://...)','leftArrow','resources','slice','4565EKwNQF','value','flat','8PdrhqB'];a20_0x8f17=function(){return _0x4c0d0b;};return a20_0x8f17();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';function a20_0x1aa3(_0x1679f5,_0x28448d){_0x1679f5=_0x1679f5-0xb5;const _0x8f17e3=a20_0x8f17();let _0x1aa3d7=_0x8f17e3[_0x1679f5];return _0x1aa3d7;}import.meta.main&&render(a20_0x23c910(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x49208e=a20_0x1aa3,{exit:_0x353397}=useApp(),{loading:_0x5f456b,menuList:_0x4901b5,error:_0x411b7d}=useGetOnlineMenuList(),[_0x3e0fbe,_0x8d63a]=useState('ok'),[_0x1b2fd8,_0x34849b]=useState(_0x49208e(0xd6)),[_0x23b0ef,_0x18a040]=useState(''),[_0x13cd80,_0x5ba7cc]=useState(''),[_0x2b857a,_0x1a2f84]=useState(''),[_0x401e4a,_0x199c83]=useState(''),_0x5800da=Array['from'](new Set(_0x4901b5[_0x49208e(0xc8)](_0x321455=>_0x321455['resources'])[_0x49208e(0xbd)]()));useEffect(()=>{const _0x3efcc6=_0x49208e;_0x1b2fd8===_0x3efcc6(0xe9)&&setTimeout(_0x353397,0x32);},[_0x1b2fd8]),useInput(async(_0x4ebc83,_0x54e488)=>{const _0x134670=_0x49208e;if(_0x1b2fd8==='input-js'){if(_0x54e488[_0x134670(0xd7)]){const _0x3f14b8=_0x2b857a[_0x134670(0xe5)]();if(_0x3f14b8==='')return;if(!isValidJsHttpsUrl(_0x3f14b8)){_0x199c83(_0x134670(0xd3));return;}if(!await isUrlReachable(_0x3f14b8)){_0x199c83('JS\x20链接无法访问');return;}_0x18a040(_0x3f14b8),_0x1a2f84(''),_0x199c83(''),_0x34849b(_0x134670(0xdc));return;}if(_0x54e488['backspace']||_0x54e488[_0x134670(0xe3)]){_0x1a2f84(_0x46360d=>_0x46360d[_0x134670(0xba)](0x0,-0x1)),_0x199c83('');return;}_0x1a2f84(_0x184006=>_0x184006+_0x4ebc83);return;}if(_0x1b2fd8===_0x134670(0xdc)){if(_0x54e488[_0x134670(0xd7)]){const _0x44e5ca=_0x2b857a[_0x134670(0xe5)]();if(_0x44e5ca==='')return;if(!isValidCssHttpsUrl(_0x44e5ca)){_0x199c83(_0x134670(0xd9));return;}if(!await isUrlReachable(_0x44e5ca)){_0x199c83(_0x134670(0xc2));return;}_0x5ba7cc(_0x44e5ca),_0x1a2f84(''),_0x199c83(''),_0x34849b(_0x134670(0xc5));return;}if(_0x54e488[_0x134670(0xcd)]||_0x54e488[_0x134670(0xe3)]){_0x1a2f84(_0x2134ef=>_0x2134ef[_0x134670(0xba)](0x0,-0x1)),_0x199c83('');return;}_0x1a2f84(_0xd9b026=>_0xd9b026+_0x4ebc83);return;}if(_0x1b2fd8===_0x134670(0xc5)){(_0x54e488['upArrow']||_0x54e488[_0x134670(0xb5)]||_0x54e488[_0x134670(0xb8)]||_0x54e488[_0x134670(0xca)])&&_0x8d63a(_0x4788a0=>_0x4788a0==='ok'?_0x134670(0xe8):'ok');if(_0x54e488[_0x134670(0xd7)]){_0x34849b(_0x134670(0xd8));if(_0x3e0fbe==='ok')await Promise[_0x134670(0xea)](_0x4901b5[_0x134670(0xc8)](_0x20d7ba=>{const _0x5cb984=_0x134670,_0xb793b={'id':_0x20d7ba['id'],'label':_0x20d7ba['label'],'path':_0x20d7ba['path'],'resources':[_0x23b0ef,_0x13cd80]};if(_0x20d7ba[_0x5cb984(0xb9)][_0x5cb984(0xe2)]===0x0)return Promise[_0x5cb984(0xda)]();return updateMenuCdnUrl(_0xb793b);})),await new Promise(_0x153b08=>setTimeout(_0x153b08,0x3e8)),_0x34849b(_0x134670(0xe9));else _0x3e0fbe==='cancel'&&_0x353397();}}});if(_0x5f456b)return a20_0x1e3dc7(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x23c910(Text,{}),a20_0x23c910(a20_0x46144b,{'type':'dots'}),a20_0x23c910(Text,{'children':_0x49208e(0xc1)})]});if(_0x411b7d)return a20_0x1e3dc7(Box,{'flexDirection':_0x49208e(0xc7),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x1e3dc7(Text,{'color':_0x49208e(0xd1),'children':['✗\x20',_0x411b7d]}),a20_0x1e3dc7(Box,{'marginTop':0x1,'children':[a20_0x23c910(Text,{'color':'gray','children':_0x49208e(0xdd)}),a20_0x23c910(Text,{'color':_0x49208e(0xb6),'children':'lovrabet\x20auth'}),a20_0x23c910(Text,{'color':_0x49208e(0xd2),'children':_0x49208e(0xc4)})]})]});if(_0x5800da[_0x49208e(0xe2)]===0x0)return a20_0x23c910(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a20_0x23c910(Text,{'color':_0x49208e(0xd5),'children':_0x49208e(0xe0)})});if(_0x1b2fd8===_0x49208e(0xc5))return a20_0x1e3dc7(Box,{'flexDirection':_0x49208e(0xc7),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x23c910(CurrentMenuCdnContent,{'menuList':_0x4901b5}),a20_0x23c910(InputCdnAsset,{'jsCdnUrl':_0x23b0ef,'cssCdnUrl':_0x13cd80}),a20_0x23c910(Box,{'marginTop':0x1,'flexDirection':_0x49208e(0xc7),'children':[{'label':_0x49208e(0xe7),'value':'ok'},{'label':'取消更新','value':_0x49208e(0xe8)}]['map'](_0x42abc4=>a20_0x1e3dc7(Text,{'color':_0x3e0fbe===_0x42abc4['value']?_0x49208e(0xd5):undefined,'children':[_0x3e0fbe===_0x42abc4[_0x49208e(0xbc)]?'>\x20':'\x20\x20',_0x42abc4[_0x49208e(0xe4)]]},_0x42abc4[_0x49208e(0xbc)]))})]});if(_0x1b2fd8===_0x49208e(0xd8))return a20_0x1e3dc7(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x23c910(CurrentMenuCdnContent,{'menuList':_0x4901b5}),a20_0x23c910(InputCdnAsset,{'jsCdnUrl':_0x23b0ef,'cssCdnUrl':_0x13cd80}),a20_0x1e3dc7(Box,{'marginTop':0x1,'children':[a20_0x23c910(a20_0x46144b,{'type':_0x49208e(0xcb)}),a20_0x23c910(Text,{'children':_0x49208e(0xc9)})]})]});if(_0x1b2fd8===_0x49208e(0xe9))return a20_0x1e3dc7(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x23c910(CurrentMenuCdnContent,{'menuList':_0x4901b5}),a20_0x23c910(InputCdnAsset,{'jsCdnUrl':_0x23b0ef,'cssCdnUrl':_0x13cd80}),a20_0x23c910(Box,{'marginTop':0x1,'children':a20_0x23c910(Text,{'color':_0x49208e(0xc0),'children':_0x49208e(0xd4)})})]});return a20_0x1e3dc7(Box,{'flexDirection':_0x49208e(0xc7),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x23c910(CurrentMenuCdnContent,{'menuList':_0x4901b5}),a20_0x1e3dc7(Box,{'marginTop':0x1,'flexDirection':_0x49208e(0xc7),'children':[a20_0x23c910(Text,{'color':_0x49208e(0xb6),'children':_0x49208e(0xd0)}),_0x23b0ef?a20_0x1e3dc7(Box,{'children':[a20_0x1e3dc7(Text,{'color':_0x49208e(0xd2),'children':['\x20\x20','JS\x20链接:\x20']}),a20_0x23c910(Text,{'color':_0x49208e(0xc0),'children':_0x23b0ef})]}):_0x1b2fd8===_0x49208e(0xd6)&&a20_0x1e3dc7(a20_0x16f527,{'children':[a20_0x1e3dc7(Box,{'children':[a20_0x1e3dc7(Text,{'children':['\x20\x20',_0x49208e(0xbf)]}),a20_0x23c910(Text,{'color':'green','children':_0x2b857a}),_0x401e4a&&a20_0x1e3dc7(Text,{'color':_0x49208e(0xd1),'children':[_0x49208e(0xc3),_0x401e4a]})]}),!_0x401e4a&&a20_0x23c910(Box,{'children':a20_0x1e3dc7(Text,{'color':_0x49208e(0xd2),'children':['\x20\x20',_0x49208e(0xb7)]})})]}),_0x13cd80?a20_0x1e3dc7(Box,{'children':[a20_0x1e3dc7(Text,{'children':['\x20\x20',_0x49208e(0xdb)]}),a20_0x23c910(Text,{'color':'green','children':_0x13cd80})]}):_0x1b2fd8==='input-css'&&a20_0x1e3dc7(a20_0x16f527,{'children':[a20_0x1e3dc7(Box,{'children':[a20_0x1e3dc7(Text,{'children':['\x20\x20',_0x49208e(0xdb)]}),a20_0x23c910(Text,{'color':_0x49208e(0xc0),'children':_0x2b857a}),_0x401e4a&&a20_0x1e3dc7(Text,{'color':'red','children':[_0x49208e(0xc3),_0x401e4a]})]}),!_0x401e4a&&a20_0x23c910(Box,{'children':a20_0x1e3dc7(Text,{'color':_0x49208e(0xd2),'children':['\x20\x20',_0x49208e(0xe1)]})})]})]})]});}
1
+ (function(_0x45f0dc,_0x293cd4){const _0x22f841=a20_0xf9b4,_0x541cbc=_0x45f0dc();while(!![]){try{const _0x6d31ff=parseInt(_0x22f841(0xcd))/0x1*(parseInt(_0x22f841(0xce))/0x2)+-parseInt(_0x22f841(0xf0))/0x3*(-parseInt(_0x22f841(0xdb))/0x4)+-parseInt(_0x22f841(0xed))/0x5*(parseInt(_0x22f841(0xd7))/0x6)+parseInt(_0x22f841(0xd2))/0x7+-parseInt(_0x22f841(0xf5))/0x8+parseInt(_0x22f841(0xd5))/0x9+-parseInt(_0x22f841(0xf1))/0xa;if(_0x6d31ff===_0x293cd4)break;else _0x541cbc['push'](_0x541cbc['shift']());}catch(_0x4bc11c){_0x541cbc['push'](_0x541cbc['shift']());}}}(a20_0x87c6,0xa3239));import{jsx as a20_0x3408fa,jsxs as a20_0x421f87,Fragment as a20_0x2eb21b}from'react/jsx-runtime';function a20_0xf9b4(_0x3d2dcf,_0x50811d){_0x3d2dcf=_0x3d2dcf-0xc9;const _0x87c627=a20_0x87c6();let _0xf9b42e=_0x87c627[_0x3d2dcf];return _0xf9b42e;}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a20_0x87c6(){const _0x14845c=['CSS\x20链接无法访问','\x20资源正在同步中...','downArrow','green','red','leftArrow','请输入有效的\x20CSS\x20https\x20链接','JS\x20链接无法访问','*\x20请输入新的资源链接','slice','map','input-css','1628175GqyrfR','√\x20更新成功','cancel','128862ytdFkB','3094310lHtIDi','cyan','resolve','column','2036416NPHwrH','输入项目的\x20JS\x20资源链接(https://...)','取消更新','label','upArrow','flat','creating','trim','value','yellow','2qcyZid','126044vHSEUd','delete','提示:使用\x20','need-confirm','2939279QxStTj','dots','gray','9007713qMYlLH','input-js','24uBhoXc','输入项目的\x20CSS\x20资源链接(https://...)','lovrabet\x20auth','CSS\x20链接:\x20','92JXrYlP','JS\x20链接:\x20','return','from','!\x20未找到菜单资源链接','updated'];a20_0x87c6=function(){return _0x14845c;};return a20_0x87c6();}import a20_0x3e2dbf from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a20_0x3408fa(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x53fb27=a20_0xf9b4,{exit:_0x4f80d7}=useApp(),{loading:_0x1a915e,menuList:_0xbb47f2,error:_0x58f30c}=useGetOnlineMenuList(),[_0xe54b3e,_0x3d72d9]=useState('ok'),[_0x51d969,_0x468867]=useState('input-js'),[_0x5400d9,_0x2005bc]=useState(''),[_0x528f89,_0x588389]=useState(''),[_0x172d68,_0x2cc7d0]=useState(''),[_0xeb262c,_0x515cb8]=useState(''),_0x51ce8e=Array[_0x53fb27(0xde)](new Set(_0xbb47f2[_0x53fb27(0xeb)](_0x5cb7b2=>_0x5cb7b2['resources'])[_0x53fb27(0xfa)]()));useEffect(()=>{const _0x1ac744=_0x53fb27;_0x51d969===_0x1ac744(0xe0)&&setTimeout(_0x4f80d7,0x32);},[_0x51d969]),useInput(async(_0xa80094,_0x18477f)=>{const _0x90c902=_0x53fb27;if(_0x51d969==='input-js'){if(_0x18477f[_0x90c902(0xdd)]){const _0x14c14a=_0x172d68['trim']();if(_0x14c14a==='')return;if(!isValidJsHttpsUrl(_0x14c14a)){_0x515cb8('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x14c14a)){_0x515cb8(_0x90c902(0xe8));return;}_0x2005bc(_0x14c14a),_0x2cc7d0(''),_0x515cb8(''),_0x468867(_0x90c902(0xec));return;}if(_0x18477f['backspace']||_0x18477f[_0x90c902(0xcf)]){_0x2cc7d0(_0x1ed1a6=>_0x1ed1a6[_0x90c902(0xea)](0x0,-0x1)),_0x515cb8('');return;}_0x2cc7d0(_0x593332=>_0x593332+_0xa80094);return;}if(_0x51d969===_0x90c902(0xec)){if(_0x18477f['return']){const _0x3783d7=_0x172d68[_0x90c902(0xca)]();if(_0x3783d7==='')return;if(!isValidCssHttpsUrl(_0x3783d7)){_0x515cb8(_0x90c902(0xe7));return;}if(!await isUrlReachable(_0x3783d7)){_0x515cb8(_0x90c902(0xe1));return;}_0x588389(_0x3783d7),_0x2cc7d0(''),_0x515cb8(''),_0x468867(_0x90c902(0xd1));return;}if(_0x18477f['backspace']||_0x18477f[_0x90c902(0xcf)]){_0x2cc7d0(_0x2b0aba=>_0x2b0aba[_0x90c902(0xea)](0x0,-0x1)),_0x515cb8('');return;}_0x2cc7d0(_0x4efa6f=>_0x4efa6f+_0xa80094);return;}if(_0x51d969==='need-confirm'){(_0x18477f[_0x90c902(0xf9)]||_0x18477f[_0x90c902(0xe3)]||_0x18477f[_0x90c902(0xe6)]||_0x18477f['rightArrow'])&&_0x3d72d9(_0x5882cc=>_0x5882cc==='ok'?_0x90c902(0xef):'ok');if(_0x18477f['return']){_0x468867(_0x90c902(0xc9));if(_0xe54b3e==='ok')await Promise['all'](_0xbb47f2['map'](_0x18ee88=>{const _0x1c26bd=_0x90c902,_0x5b976e={'id':_0x18ee88['id'],'label':_0x18ee88[_0x1c26bd(0xf8)],'path':_0x18ee88['path'],'resources':[_0x5400d9,_0x528f89]};if(_0x18ee88['resources']['length']===0x0)return Promise[_0x1c26bd(0xf3)]();return updateMenuCdnUrl(_0x5b976e);})),await new Promise(_0x2aa7b9=>setTimeout(_0x2aa7b9,0x3e8)),_0x468867(_0x90c902(0xe0));else _0xe54b3e==='cancel'&&_0x4f80d7();}}});if(_0x1a915e)return a20_0x421f87(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x3408fa(Text,{}),a20_0x3408fa(a20_0x3e2dbf,{'type':'dots'}),a20_0x3408fa(Text,{'children':'\x20正在获取线上菜单资源链接...'})]});if(_0x58f30c)return a20_0x421f87(Box,{'flexDirection':_0x53fb27(0xf4),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x421f87(Text,{'color':_0x53fb27(0xe5),'children':['✗\x20',_0x58f30c]}),a20_0x421f87(Box,{'marginTop':0x1,'children':[a20_0x3408fa(Text,{'color':_0x53fb27(0xd4),'children':_0x53fb27(0xd0)}),a20_0x3408fa(Text,{'color':_0x53fb27(0xf2),'children':_0x53fb27(0xd9)}),a20_0x3408fa(Text,{'color':_0x53fb27(0xd4),'children':'\x20命令重新登录'})]})]});if(_0x51ce8e['length']===0x0)return a20_0x3408fa(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a20_0x3408fa(Text,{'color':_0x53fb27(0xcc),'children':_0x53fb27(0xdf)})});if(_0x51d969==='need-confirm')return a20_0x421f87(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x3408fa(CurrentMenuCdnContent,{'menuList':_0xbb47f2}),a20_0x3408fa(InputCdnAsset,{'jsCdnUrl':_0x5400d9,'cssCdnUrl':_0x528f89}),a20_0x3408fa(Box,{'marginTop':0x1,'flexDirection':'column','children':[{'label':'继续更新','value':'ok'},{'label':_0x53fb27(0xf7),'value':_0x53fb27(0xef)}]['map'](_0x1449e0=>a20_0x421f87(Text,{'color':_0xe54b3e===_0x1449e0[_0x53fb27(0xcb)]?_0x53fb27(0xcc):undefined,'children':[_0xe54b3e===_0x1449e0[_0x53fb27(0xcb)]?'>\x20':'\x20\x20',_0x1449e0['label']]},_0x1449e0[_0x53fb27(0xcb)]))})]});if(_0x51d969==='creating')return a20_0x421f87(Box,{'flexDirection':_0x53fb27(0xf4),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x3408fa(CurrentMenuCdnContent,{'menuList':_0xbb47f2}),a20_0x3408fa(InputCdnAsset,{'jsCdnUrl':_0x5400d9,'cssCdnUrl':_0x528f89}),a20_0x421f87(Box,{'marginTop':0x1,'children':[a20_0x3408fa(a20_0x3e2dbf,{'type':_0x53fb27(0xd3)}),a20_0x3408fa(Text,{'children':_0x53fb27(0xe2)})]})]});if(_0x51d969===_0x53fb27(0xe0))return a20_0x421f87(Box,{'flexDirection':_0x53fb27(0xf4),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x3408fa(CurrentMenuCdnContent,{'menuList':_0xbb47f2}),a20_0x3408fa(InputCdnAsset,{'jsCdnUrl':_0x5400d9,'cssCdnUrl':_0x528f89}),a20_0x3408fa(Box,{'marginTop':0x1,'children':a20_0x3408fa(Text,{'color':_0x53fb27(0xe4),'children':_0x53fb27(0xee)})})]});return a20_0x421f87(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x3408fa(CurrentMenuCdnContent,{'menuList':_0xbb47f2}),a20_0x421f87(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x3408fa(Text,{'color':_0x53fb27(0xf2),'children':_0x53fb27(0xe9)}),_0x5400d9?a20_0x421f87(Box,{'children':[a20_0x421f87(Text,{'color':_0x53fb27(0xd4),'children':['\x20\x20',_0x53fb27(0xdc)]}),a20_0x3408fa(Text,{'color':_0x53fb27(0xe4),'children':_0x5400d9})]}):_0x51d969===_0x53fb27(0xd6)&&a20_0x421f87(a20_0x2eb21b,{'children':[a20_0x421f87(Box,{'children':[a20_0x421f87(Text,{'children':['\x20\x20',_0x53fb27(0xdc)]}),a20_0x3408fa(Text,{'color':_0x53fb27(0xe4),'children':_0x172d68}),_0xeb262c&&a20_0x421f87(Text,{'color':_0x53fb27(0xe5),'children':['\x20←\x20',_0xeb262c]})]}),!_0xeb262c&&a20_0x3408fa(Box,{'children':a20_0x421f87(Text,{'color':_0x53fb27(0xd4),'children':['\x20\x20',_0x53fb27(0xf6)]})})]}),_0x528f89?a20_0x421f87(Box,{'children':[a20_0x421f87(Text,{'children':['\x20\x20',_0x53fb27(0xda)]}),a20_0x3408fa(Text,{'color':_0x53fb27(0xe4),'children':_0x528f89})]}):_0x51d969===_0x53fb27(0xec)&&a20_0x421f87(a20_0x2eb21b,{'children':[a20_0x421f87(Box,{'children':[a20_0x421f87(Text,{'children':['\x20\x20',_0x53fb27(0xda)]}),a20_0x3408fa(Text,{'color':_0x53fb27(0xe4),'children':_0x172d68}),_0xeb262c&&a20_0x421f87(Text,{'color':'red','children':['\x20←\x20',_0xeb262c]})]}),!_0xeb262c&&a20_0x3408fa(Box,{'children':a20_0x421f87(Text,{'color':_0x53fb27(0xd4),'children':['\x20\x20',_0x53fb27(0xd8)]})})]})]})]});}
@@ -1 +1 @@
1
- const a22_0x2f79ef=a22_0x1440;(function(_0x81abee,_0x341a8b){const _0x15c37a=a22_0x1440,_0x104b73=_0x81abee();while(!![]){try{const _0x35339e=-parseInt(_0x15c37a(0x161))/0x1+-parseInt(_0x15c37a(0x16e))/0x2*(parseInt(_0x15c37a(0x170))/0x3)+parseInt(_0x15c37a(0x178))/0x4*(parseInt(_0x15c37a(0x163))/0x5)+-parseInt(_0x15c37a(0x167))/0x6+-parseInt(_0x15c37a(0x162))/0x7*(parseInt(_0x15c37a(0x17f))/0x8)+-parseInt(_0x15c37a(0x16b))/0x9+-parseInt(_0x15c37a(0x16c))/0xa*(-parseInt(_0x15c37a(0x177))/0xb);if(_0x35339e===_0x341a8b)break;else _0x104b73['push'](_0x104b73['shift']());}catch(_0xfce9d0){_0x104b73['push'](_0x104b73['shift']());}}}(a22_0x2a21,0xe0c3e));import{getCookie}from'../auth/get-cookie.js';function a22_0x2a21(){const _0x57f0e1=['45484692KcxHnb','8YfVfnO','error','菜单资源同步成功:\x20','label','stringify','SdkDemo1','application/json','3778176yXxoCY','未知错误','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','更新菜单资源失败:\x20','POST','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','未提供应用AppCode,且配置中也没有默认值','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','errorCode','532760uMXPzi','14PBWqNB','3087705EyIhJg','status','json','resources','797934OsNayr','data','import','正在更新菜单资源链接:\x20','13601241DfFWpl','10fSAhEx','update-menu-cdn-url','1327874CIljnU','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','6clwvOi','sdk-demo','/smartapi/menu/update','success','log','!\x20请使用以下方式之一:','info'];a22_0x2a21=function(){return _0x57f0e1;};return a22_0x2a21();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a22_0x1440(_0x25b561,_0x4c8d34){_0x25b561=_0x25b561-0x160;const _0x2a2167=a22_0x2a21();let _0x1440c3=_0x2a2167[_0x25b561];return _0x1440c3;}const config=readConfig(),logLabel=a22_0x2f79ef(0x16d);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a22_0x2f79ef(0x17d),'path':a22_0x2f79ef(0x171),'resources':[a22_0x2f79ef(0x185),a22_0x2f79ef(0x187)]});export async function updateMenuCdnUrl(_0x36f74f){const _0x1d552b=a22_0x2f79ef,_0x2aa41a=config?.['appcode'];if(!_0x2aa41a){const _0x1bb9ac=_0x1d552b(0x186);logger[_0x1d552b(0x179)](logLabel,_0x1bb9ac),console[_0x1d552b(0x179)]('×\x20'+_0x1bb9ac),console[_0x1d552b(0x174)](_0x1d552b(0x175)),console[_0x1d552b(0x174)](_0x1d552b(0x181)),console[_0x1d552b(0x174)](_0x1d552b(0x182));return;}logger['info'](logLabel,_0x1d552b(0x16a)+_0x36f74f[_0x1d552b(0x17b)]+'\x20('+_0x36f74f['path']+')');const _0x1d19b3={'id':_0x36f74f['id'],'appCode':_0x2aa41a,'extend':{'loadScriptMode':_0x1d552b(0x169),'resources':_0x36f74f['resources']?JSON[_0x1d552b(0x17c)](_0x36f74f[_0x1d552b(0x166)]):undefined}},_0x6fc0b3=await fetch(getApiDomain()+_0x1d552b(0x172),{'method':_0x1d552b(0x184),'body':JSON['stringify'](_0x1d19b3),'headers':{'Content-Type':_0x1d552b(0x17e),'Cookie':getCookie()}});if(!_0x6fc0b3['ok']){if(_0x6fc0b3[_0x1d552b(0x164)]===0x191){const _0x37f932=_0x1d552b(0x16f);logger[_0x1d552b(0x179)](logLabel,_0x37f932,{'status':_0x6fc0b3[_0x1d552b(0x164)],'menu':_0x36f74f[_0x1d552b(0x17b)]});throw new Error(_0x37f932);}const _0x590b54='创建菜单失败,HTTP状态码:\x20'+_0x6fc0b3[_0x1d552b(0x164)];logger[_0x1d552b(0x179)](logLabel,_0x590b54,{'menu':_0x36f74f['label']});throw new Error(_0x590b54);}const _0x314933=await _0x6fc0b3[_0x1d552b(0x165)]();if(!_0x314933[_0x1d552b(0x173)]){const _0x36e8ab=_0x1d552b(0x183)+(_0x314933['errorMsg']||_0x1d552b(0x180));logger[_0x1d552b(0x179)](logLabel,_0x36e8ab,{'errorCode':_0x314933[_0x1d552b(0x160)],'errorMsg':_0x314933['errorMsg'],'menu':_0x36f74f['label']});throw new Error(_0x36e8ab);}logger[_0x1d552b(0x176)](logLabel,_0x1d552b(0x17a)+_0x36f74f['label'],_0x314933[_0x1d552b(0x168)]);}
1
+ const a22_0x46e6c3=a22_0x7679;(function(_0x4a9bf3,_0x98c26f){const _0x1ef63c=a22_0x7679,_0x5a5b43=_0x4a9bf3();while(!![]){try{const _0x18019b=parseInt(_0x1ef63c(0x101))/0x1*(-parseInt(_0x1ef63c(0x11e))/0x2)+-parseInt(_0x1ef63c(0x104))/0x3+parseInt(_0x1ef63c(0x115))/0x4+parseInt(_0x1ef63c(0x10e))/0x5+-parseInt(_0x1ef63c(0x117))/0x6+parseInt(_0x1ef63c(0x111))/0x7*(-parseInt(_0x1ef63c(0x119))/0x8)+-parseInt(_0x1ef63c(0x10a))/0x9*(-parseInt(_0x1ef63c(0x108))/0xa);if(_0x18019b===_0x98c26f)break;else _0x5a5b43['push'](_0x5a5b43['shift']());}catch(_0x790348){_0x5a5b43['push'](_0x5a5b43['shift']());}}}(a22_0x239f,0xd8aaa));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a22_0x7679(_0x4845df,_0x24c4b2){_0x4845df=_0x4845df-0xfc;const _0x239f27=a22_0x239f();let _0x76799=_0x239f27[_0x4845df];return _0x76799;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a22_0x239f(){const _0x434487=['SdkDemo1','9LvooYQ','application/json','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','update-menu-cdn-url','2354090VGxHUx','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','info','1281aFzNBt','error','!\x20请使用以下方式之一:','菜单资源同步成功:\x20','2700152fBpBCS','stringify','7804596fhpaxU','未提供应用AppCode,且配置中也没有默认值','47448ScVqUJ','appcode','status','resources','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','1653118YYNYXG','data','POST','label','log','未知错误','json','创建菜单失败,HTTP状态码:\x20','2NRLOSG','errorMsg','正在更新菜单资源链接:\x20','1701843ifEwyv','path','sdk-demo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','43481480DpWeef'];a22_0x239f=function(){return _0x434487;};return a22_0x239f();}const config=readConfig(),logLabel=a22_0x46e6c3(0x10d);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a22_0x46e6c3(0x109),'path':a22_0x46e6c3(0x106),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a22_0x46e6c3(0x107)]});export async function updateMenuCdnUrl(_0x215408){const _0x2535a0=a22_0x46e6c3,_0x59d827=config?.[_0x2535a0(0x11a)];if(!_0x59d827){const _0x4f55a9=_0x2535a0(0x118);logger[_0x2535a0(0x112)](logLabel,_0x4f55a9),console['error']('×\x20'+_0x4f55a9),console['log'](_0x2535a0(0x113)),console['log'](_0x2535a0(0x10f)),console[_0x2535a0(0xfd)](_0x2535a0(0x10c));return;}logger[_0x2535a0(0x110)](logLabel,_0x2535a0(0x103)+_0x215408[_0x2535a0(0xfc)]+'\x20('+_0x215408[_0x2535a0(0x105)]+')');const _0x16b9b5={'id':_0x215408['id'],'appCode':_0x59d827,'extend':{'loadScriptMode':'import','resources':_0x215408[_0x2535a0(0x11c)]?JSON[_0x2535a0(0x116)](_0x215408[_0x2535a0(0x11c)]):undefined}},_0x1d2e44=await fetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x2535a0(0x120),'body':JSON[_0x2535a0(0x116)](_0x16b9b5),'headers':{'Content-Type':_0x2535a0(0x10b),'Cookie':getCookie()}});if(!_0x1d2e44['ok']){if(_0x1d2e44['status']===0x191){const _0x160c75=_0x2535a0(0x11d);logger[_0x2535a0(0x112)](logLabel,_0x160c75,{'status':_0x1d2e44[_0x2535a0(0x11b)],'menu':_0x215408[_0x2535a0(0xfc)]});throw new Error(_0x160c75);}const _0x17d109=_0x2535a0(0x100)+_0x1d2e44[_0x2535a0(0x11b)];logger[_0x2535a0(0x112)](logLabel,_0x17d109,{'menu':_0x215408[_0x2535a0(0xfc)]});throw new Error(_0x17d109);}const _0x39df79=await _0x1d2e44[_0x2535a0(0xff)]();if(!_0x39df79['success']){const _0x48c44a='更新菜单资源失败:\x20'+(_0x39df79[_0x2535a0(0x102)]||_0x2535a0(0xfe));logger[_0x2535a0(0x112)](logLabel,_0x48c44a,{'errorCode':_0x39df79['errorCode'],'errorMsg':_0x39df79[_0x2535a0(0x102)],'menu':_0x215408[_0x2535a0(0xfc)]});throw new Error(_0x48c44a);}logger['info'](logLabel,_0x2535a0(0x114)+_0x215408['label'],_0x39df79[_0x2535a0(0x11f)]);}
@@ -1 +1 @@
1
- (function(_0x5e3d69,_0x45c9b3){const _0x48761e=a23_0x44ad,_0x352ac9=_0x5e3d69();while(!![]){try{const _0x469bf5=parseInt(_0x48761e(0x176))/0x1+-parseInt(_0x48761e(0x168))/0x2+-parseInt(_0x48761e(0x169))/0x3+parseInt(_0x48761e(0x16f))/0x4+-parseInt(_0x48761e(0x167))/0x5+-parseInt(_0x48761e(0x172))/0x6+-parseInt(_0x48761e(0x16a))/0x7*(-parseInt(_0x48761e(0x175))/0x8);if(_0x469bf5===_0x45c9b3)break;else _0x352ac9['push'](_0x352ac9['shift']());}catch(_0x590fe0){_0x352ac9['push'](_0x352ac9['shift']());}}}(a23_0x4358,0x74a4f));function a23_0x44ad(_0x71d1b1,_0x146f37){_0x71d1b1=_0x71d1b1-0x163;const _0x4358f0=a23_0x4358();let _0x44ad99=_0x4358f0[_0x71d1b1];return _0x44ad99;}import{jsx as a23_0x156884,jsxs as a23_0x401365}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 a23_0x5a6d37 from'ink-spinner';export function AuthServer(){const _0x3c4949=a23_0x44ad,{exit:_0x87d32e}=useApp(),[_0x56bb61,_0x3b3e92]=useState(![]),[_0x1813ed,_0x28d85f]=useState(!![]),[_0x3cb6df,_0x395309]=useState(![]),[_0x1636d9,_0x209520]=useState(![]);useEffect(()=>{const _0x35d4aa=a23_0x44ad;getIsSessionValid()[_0x35d4aa(0x16e)](_0x3b3e92)[_0x35d4aa(0x170)](()=>_0x28d85f(![]));},[]),useEffect(()=>{!_0x1813ed&&_0x56bb61&&(console['log']('√\x20当前为有效会话,无需重新登录。'),_0x87d32e());},[_0x1813ed,_0x56bb61,_0x87d32e]),useEffect(()=>{const _0x3fcb8a=a23_0x44ad;_0x1636d9&&(console[_0x3fcb8a(0x173)](_0x3fcb8a(0x166)),_0x87d32e());},[_0x1636d9,_0x87d32e]),useInput((_0x354a25,_0x3e4716)=>{const _0x15d7b1=a23_0x44ad;_0x3e4716[_0x15d7b1(0x163)]&&(_0x395309(!![]),authServer({'silent':!![]})[_0x15d7b1(0x16e)](_0x5f0b6a=>{_0x209520(_0x5f0b6a);})),_0x354a25==='q'&&_0x87d32e();});if(_0x1813ed)return null;if(_0x56bb61||_0x1636d9)return null;return a23_0x156884(Box,{'flexDirection':_0x3c4949(0x171),'marginTop':0x1,'marginBottom':0x1,'children':_0x3cb6df?a23_0x401365(Box,{'children':[a23_0x156884(Box,{'width':'1'}),a23_0x401365(Text,{'color':_0x3c4949(0x174),'children':[a23_0x156884(a23_0x5a6d37,{'type':_0x3c4949(0x16c)}),'\x20\x20']}),a23_0x156884(Text,{'children':_0x3c4949(0x165)}),a23_0x156884(Text,{'color':'gray','children':_0x3c4949(0x164)})]}):a23_0x401365(Box,{'children':[a23_0x156884(Box,{'width':'1'}),a23_0x156884(Text,{'children':_0x3c4949(0x16b)}),a23_0x156884(Text,{'color':_0x3c4949(0x16d),'children':'按\x20“q”\x20退出。'})]})});}function a23_0x4358(){const _0x111676=['9289uyAcVG','*\x20按回车开始登录。','dots','gray','then','2833280iDUOIJ','finally','column','4270524tcBkZW','log','green','7960EWJNCa','744401jNWmvY','return','请前往浏览器完成登录。','正在登录...\x20','*\x20登录成功!','4661440URPgHI','80088TNcCii','1833675xYJuZa'];a23_0x4358=function(){return _0x111676;};return a23_0x4358();}
1
+ (function(_0x318e50,_0x5c4845){const _0x5b622c=a23_0x47fb,_0x2f6035=_0x318e50();while(!![]){try{const _0x323513=parseInt(_0x5b622c(0xf6))/0x1+parseInt(_0x5b622c(0xfc))/0x2+parseInt(_0x5b622c(0xf1))/0x3+parseInt(_0x5b622c(0xfa))/0x4+-parseInt(_0x5b622c(0xf7))/0x5*(-parseInt(_0x5b622c(0xfd))/0x6)+-parseInt(_0x5b622c(0xed))/0x7+-parseInt(_0x5b622c(0xf8))/0x8;if(_0x323513===_0x5c4845)break;else _0x2f6035['push'](_0x2f6035['shift']());}catch(_0x35c436){_0x2f6035['push'](_0x2f6035['shift']());}}}(a23_0x1385,0xa76e0));import{jsx as a23_0x583b76,jsxs as a23_0x1d1151}from'react/jsx-runtime';function a23_0x47fb(_0x31ddb9,_0x22b613){_0x31ddb9=_0x31ddb9-0xeb;const _0x1385e9=a23_0x1385();let _0x47fb6d=_0x1385e9[_0x31ddb9];return _0x47fb6d;}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 a23_0x59f9ba from'ink-spinner';function a23_0x1385(){const _0x4bdcac=['column','√\x20当前为有效会话,无需重新登录。','green','920691ReTsBi','gray','正在登录...\x20','log','then','1098288elynuI','623145zheLiB','24452376NIfMgO','*\x20按回车开始登录。','3074792CdQzyH','finally','1628232oDBeKy','42WkwHjv','请前往浏览器完成登录。','return','826441jkEydL'];a23_0x1385=function(){return _0x4bdcac;};return a23_0x1385();}export function AuthServer(){const _0x3fdc28=a23_0x47fb,{exit:_0x2bb24f}=useApp(),[_0x1f6f9b,_0x1bb06f]=useState(![]),[_0x4d2719,_0x1e694c]=useState(!![]),[_0x3bd6c2,_0xb92f1]=useState(![]),[_0x4210b5,_0x2d49bc]=useState(![]);useEffect(()=>{const _0x331d35=a23_0x47fb;getIsSessionValid()['then'](_0x1bb06f)[_0x331d35(0xfb)](()=>_0x1e694c(![]));},[]),useEffect(()=>{const _0x50522e=a23_0x47fb;!_0x4d2719&&_0x1f6f9b&&(console[_0x50522e(0xf4)](_0x50522e(0xef)),_0x2bb24f());},[_0x4d2719,_0x1f6f9b,_0x2bb24f]),useEffect(()=>{const _0x37897e=a23_0x47fb;_0x4210b5&&(console[_0x37897e(0xf4)]('*\x20登录成功!'),_0x2bb24f());},[_0x4210b5,_0x2bb24f]),useInput((_0x594757,_0x25085e)=>{const _0x3284c1=a23_0x47fb;_0x25085e[_0x3284c1(0xec)]&&(_0xb92f1(!![]),authServer({'silent':!![]})[_0x3284c1(0xf5)](_0x1e9733=>{_0x2d49bc(_0x1e9733);})),_0x594757==='q'&&_0x2bb24f();});if(_0x4d2719)return null;if(_0x1f6f9b||_0x4210b5)return null;return a23_0x583b76(Box,{'flexDirection':_0x3fdc28(0xee),'marginTop':0x1,'marginBottom':0x1,'children':_0x3bd6c2?a23_0x1d1151(Box,{'children':[a23_0x583b76(Box,{'width':'1'}),a23_0x1d1151(Text,{'color':_0x3fdc28(0xf0),'children':[a23_0x583b76(a23_0x59f9ba,{'type':'dots'}),'\x20\x20']}),a23_0x583b76(Text,{'children':_0x3fdc28(0xf3)}),a23_0x583b76(Text,{'color':_0x3fdc28(0xf2),'children':_0x3fdc28(0xeb)})]}):a23_0x1d1151(Box,{'children':[a23_0x583b76(Box,{'width':'1'}),a23_0x583b76(Text,{'children':_0x3fdc28(0xf9)}),a23_0x583b76(Text,{'color':'gray','children':'按\x20“q”\x20退出。'})]})});}
@@ -1 +1 @@
1
- const a24_0x552666=a24_0x5c21;(function(_0x58d7,_0x14842e){const _0x523536=a24_0x5c21,_0x4788ab=_0x58d7();while(!![]){try{const _0x31655b=-parseInt(_0x523536(0x1b0))/0x1*(-parseInt(_0x523536(0x1c3))/0x2)+parseInt(_0x523536(0x1b7))/0x3*(-parseInt(_0x523536(0x1a0))/0x4)+-parseInt(_0x523536(0x19b))/0x5+-parseInt(_0x523536(0x1a5))/0x6*(parseInt(_0x523536(0x1a9))/0x7)+-parseInt(_0x523536(0x19f))/0x8*(parseInt(_0x523536(0x1ac))/0x9)+parseInt(_0x523536(0x1a4))/0xa*(-parseInt(_0x523536(0x1a7))/0xb)+-parseInt(_0x523536(0x1c1))/0xc*(-parseInt(_0x523536(0x1be))/0xd);if(_0x31655b===_0x14842e)break;else _0x4788ab['push'](_0x4788ab['shift']());}catch(_0x4f39e6){_0x4788ab['push'](_0x4788ab['shift']());}}}(a24_0x3d9a,0x69f7b));import{writeFileSync}from'node:fs';import a24_0x1172cf from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a24_0x5c21(_0x41e63b,_0x550471){_0x41e63b=_0x41e63b-0x197;const _0x3d9a00=a24_0x3d9a();let _0x5c21cd=_0x3d9a00[_0x41e63b];return _0x5c21cd;}function a24_0x3d9a(){const _0x3be272=['close','120jPFAvB','✅\x20浏览器已自动打开,请在浏览器中完成登录','error','isAuth','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>','Auth\x20server\x20error:','27755bzEiRq','⚠️\x20\x20无法自动打开浏览器','json','5436UJhkfR','writeHead','1209722ilhPQw','🌐\x20正在尝试自动打开浏览器...','then','address','127.0.0.1','cookie','450850ZpDObO','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','xdg-open\x20\x22','open\x20\x22','27512sNlIOE','50472eYBcEo','session','https://dev.lovrabet.com:','text/html;\x20charset=utf-8','827710KbudwE','60mnEyrY','object','33DoJcWe','🔐\x20正在启动登录服务...','13755guDbmD','📍\x20登录地址:','🔗\x20请手动复制登录地址到浏览器:','720zYSZYw','end','log','/api/auth/get-session','1yodwUM','utf-8','win32','darwin','start\x20\x22\x22\x20\x22','https://g.yuntooai.com/cert/lovrabet-dev.json'];a24_0x3d9a=function(){return _0x3be272;};return a24_0x3d9a();}export async function authServer(_0x370db6){const _0x1d017c=a24_0x5c21,_0x4c67d7=_0x370db6?.[_0x1d017c(0x1bb)]||![];if(await getIsSessionValid())return!![];const _0x17c883=await(await fetch(_0x1d017c(0x1b5)))[_0x1d017c(0x1c0)]();return new Promise(async(_0x4275b6,_0x4d98a6)=>{const _0x3592be=_0x1d017c;let _0x55cf7c=0x0;const _0x5b75ad=a24_0x1172cf['createServer'](_0x17c883,async(_0x566592,_0x1706ae)=>{const _0x12177a=a24_0x5c21,_0x7dc3b5=getUserDomain(),_0x1d0598=_0x566592['headers'][_0x12177a(0x19a)]||'',_0xe804f7=await fetch(_0x7dc3b5+_0x12177a(0x1af),{'headers':{'cookie':_0x1d0598}})['then'](_0x3129dd=>_0x3129dd[_0x12177a(0x1c0)]()),_0x103d4c=_0xe804f7&&_0xe804f7[_0x12177a(0x1a1)]&&_0xe804f7['user'];if(_0x103d4c){writeFileSync(cookieFile,_0x1d0598,_0x12177a(0x1b1)),_0x4275b6(!![]);const _0x3604b3=_0x12177a(0x1bc);_0x1706ae[_0x12177a(0x1c2)](0xc8,{'Content-Type':_0x12177a(0x1a3)}),_0x1706ae[_0x12177a(0x1ad)](_0x3604b3),_0x5b75ad[_0x12177a(0x1b6)]();}else{const _0x5a4763=''+encodeURIComponent(_0x12177a(0x1a2)+_0x55cf7c);_0x1706ae[_0x12177a(0x1c2)](0x12e,{'location':_0x7dc3b5+'/sign-in?redirect='+_0x5a4763}),_0x1706ae[_0x12177a(0x1ad)]();return;}});_0x5b75ad['listen'](0x0,_0x3592be(0x199),()=>{const _0x4b60c6=_0x3592be,_0x44db82=_0x5b75ad[_0x4b60c6(0x198)]();_0x55cf7c=typeof _0x44db82===_0x4b60c6(0x1a6)&&_0x44db82?_0x44db82['port']:Number(_0x44db82);const _0x208de9='https://dev.lovrabet.com:'+_0x55cf7c;!_0x4c67d7&&(console[_0x4b60c6(0x1ae)](_0x4b60c6(0x1a8)),console[_0x4b60c6(0x1ae)](_0x4b60c6(0x1aa),_0x208de9),console[_0x4b60c6(0x1ae)](_0x4b60c6(0x1c4)),console[_0x4b60c6(0x1ae)](''),console['log'](_0x4b60c6(0x19c)),console['log']('')),openInBrowser(_0x208de9)[_0x4b60c6(0x197)](_0x49fadc=>{const _0x24507f=_0x4b60c6;!_0x4c67d7&&(_0x49fadc?console[_0x24507f(0x1ae)](_0x24507f(0x1b8)):(console[_0x24507f(0x1ae)](_0x24507f(0x1bf)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0x208de9)),console['log'](''));})['catch'](()=>{const _0x24df1c=_0x4b60c6;!_0x4c67d7&&(console[_0x24df1c(0x1ae)](_0x24df1c(0x1bf)),console[_0x24df1c(0x1ae)](_0x24df1c(0x1ab),_0x208de9),console[_0x24df1c(0x1ae)](''));});}),_0x5b75ad['on'](_0x3592be(0x1b9),_0x1c2511=>{const _0xff65f=_0x3592be;!_0x4c67d7&&console[_0xff65f(0x1b9)](_0xff65f(0x1bd),_0x1c2511),_0x4d98a6(_0x1c2511);});});}function openInBrowser(_0x40b442){return new Promise(_0x54f1db=>{const _0x157608=a24_0x5c21,_0x4f0e8f=process['platform'];let _0x1ce5f5;if(_0x4f0e8f===_0x157608(0x1b2))_0x1ce5f5=_0x157608(0x1b4)+_0x40b442+'\x22';else _0x4f0e8f===_0x157608(0x1b3)?_0x1ce5f5=_0x157608(0x19e)+_0x40b442+'\x22':_0x1ce5f5=_0x157608(0x19d)+_0x40b442+'\x22';exec(_0x1ce5f5,_0x191db7=>{_0x191db7?_0x54f1db(![]):_0x54f1db(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a24_0x552666(0x1ba),isAuth);}
1
+ function a24_0x5711(){const _0xf1e5f6=['error','session','21943212Nheifo','isAuth','32ZlOkBv','🔐\x20正在启动登录服务...','darwin','win32','11SrYzyP','writeHead','https://g.yuntooai.com/cert/lovrabet-dev.json','address','headers','start\x20\x22\x22\x20\x22','🔗\x20请手动复制登录地址到浏览器:','1290798ciUAon','port','createServer','close','5FbzgkW','user','662156uIGWML','open\x20\x22','170VrLupQ','cookie','end','https://dev.lovrabet.com:','catch','xdg-open\x20\x22','68gswnfn','⚠️\x20\x20无法自动打开浏览器','176193wPXZcj','Auth\x20server\x20error:','listen','144193nTUhXt','log','<!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>','116079JSuBEc','then','1861684fCnmor','/api/auth/get-session','/sign-in?redirect=','text/html;\x20charset=utf-8','🌐\x20正在尝试自动打开浏览器...'];a24_0x5711=function(){return _0xf1e5f6;};return a24_0x5711();}const a24_0xbf6ea4=a24_0x4ced;(function(_0x237c77,_0x144e4f){const _0x2171ee=a24_0x4ced,_0x50d73c=_0x237c77();while(!![]){try{const _0x23501f=parseInt(_0x2171ee(0x1cf))/0x1+parseInt(_0x2171ee(0x1e1))/0x2+parseInt(_0x2171ee(0x1df))/0x3*(parseInt(_0x2171ee(0x1d7))/0x4)+-parseInt(_0x2171ee(0x1cd))/0x5*(parseInt(_0x2171ee(0x1c9))/0x6)+-parseInt(_0x2171ee(0x1dc))/0x7*(-parseInt(_0x2171ee(0x1be))/0x8)+parseInt(_0x2171ee(0x1d9))/0x9*(parseInt(_0x2171ee(0x1d1))/0xa)+parseInt(_0x2171ee(0x1c2))/0xb*(-parseInt(_0x2171ee(0x1bc))/0xc);if(_0x23501f===_0x144e4f)break;else _0x50d73c['push'](_0x50d73c['shift']());}catch(_0x313e01){_0x50d73c['push'](_0x50d73c['shift']());}}}(a24_0x5711,0x97eaa));import{writeFileSync}from'node:fs';import a24_0x29f074 from'node:https';function a24_0x4ced(_0x26535c,_0x58fa8e){_0x26535c=_0x26535c-0x1b8;const _0x5711cb=a24_0x5711();let _0x4cedc3=_0x5711cb[_0x26535c];return _0x4cedc3;}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(_0x39b140){const _0x548175=a24_0x4ced,_0x25989d=_0x39b140?.['silent']||![];if(await getIsSessionValid())return!![];const _0x2a0f4c=await(await fetch(_0x548175(0x1c4)))['json']();return new Promise(async(_0xa2e776,_0x200a56)=>{const _0x4cfb7f=_0x548175;let _0x30dee7=0x0;const _0x5913e8=a24_0x29f074[_0x4cfb7f(0x1cb)](_0x2a0f4c,async(_0x414a90,_0x37e054)=>{const _0x47ec80=_0x4cfb7f,_0x19d36e=getUserDomain(),_0x3aeb79=_0x414a90[_0x47ec80(0x1c6)][_0x47ec80(0x1d2)]||'',_0x1ecadb=await fetch(_0x19d36e+_0x47ec80(0x1e2),{'headers':{'cookie':_0x3aeb79}})[_0x47ec80(0x1e0)](_0xf0fe52=>_0xf0fe52['json']()),_0x179355=_0x1ecadb&&_0x1ecadb[_0x47ec80(0x1bb)]&&_0x1ecadb[_0x47ec80(0x1ce)];if(_0x179355){writeFileSync(cookieFile,_0x3aeb79,'utf-8'),_0xa2e776(!![]);const _0x203df6=_0x47ec80(0x1de);_0x37e054[_0x47ec80(0x1c3)](0xc8,{'Content-Type':_0x47ec80(0x1b8)}),_0x37e054[_0x47ec80(0x1d3)](_0x203df6),_0x5913e8[_0x47ec80(0x1cc)]();}else{const _0x1cc943=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x30dee7);_0x37e054[_0x47ec80(0x1c3)](0x12e,{'location':_0x19d36e+_0x47ec80(0x1e3)+_0x1cc943}),_0x37e054['end']();return;}});_0x5913e8[_0x4cfb7f(0x1db)](0x0,'127.0.0.1',()=>{const _0xe4201d=_0x4cfb7f,_0xea21a1=_0x5913e8[_0xe4201d(0x1c5)]();_0x30dee7=typeof _0xea21a1==='object'&&_0xea21a1?_0xea21a1[_0xe4201d(0x1ca)]:Number(_0xea21a1);const _0x1586f1=_0xe4201d(0x1d4)+_0x30dee7;!_0x25989d&&(console[_0xe4201d(0x1dd)](_0xe4201d(0x1bf)),console[_0xe4201d(0x1dd)]('📍\x20登录地址:',_0x1586f1),console[_0xe4201d(0x1dd)](_0xe4201d(0x1b9)),console[_0xe4201d(0x1dd)](''),console[_0xe4201d(0x1dd)]('💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'),console['log']('')),openInBrowser(_0x1586f1)['then'](_0x1f3f6a=>{const _0x1fa4e2=_0xe4201d;!_0x25989d&&(_0x1f3f6a?console[_0x1fa4e2(0x1dd)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x1fa4e2(0x1dd)](_0x1fa4e2(0x1d8)),console['log'](_0x1fa4e2(0x1c8),_0x1586f1)),console[_0x1fa4e2(0x1dd)](''));})[_0xe4201d(0x1d5)](()=>{const _0x388a3=_0xe4201d;!_0x25989d&&(console['log'](_0x388a3(0x1d8)),console[_0x388a3(0x1dd)](_0x388a3(0x1c8),_0x1586f1),console[_0x388a3(0x1dd)](''));});}),_0x5913e8['on'](_0x4cfb7f(0x1ba),_0x240ceb=>{const _0x4b6497=_0x4cfb7f;!_0x25989d&&console[_0x4b6497(0x1ba)](_0x4b6497(0x1da),_0x240ceb),_0x200a56(_0x240ceb);});});}function openInBrowser(_0x2a2b6a){return new Promise(_0x48689d=>{const _0x35e9c9=a24_0x4ced,_0x90ab9a=process['platform'];let _0x4a3e43;if(_0x90ab9a===_0x35e9c9(0x1c1))_0x4a3e43=_0x35e9c9(0x1c7)+_0x2a2b6a+'\x22';else _0x90ab9a===_0x35e9c9(0x1c0)?_0x4a3e43=_0x35e9c9(0x1d0)+_0x2a2b6a+'\x22':_0x4a3e43=_0x35e9c9(0x1d6)+_0x2a2b6a+'\x22';exec(_0x4a3e43,_0x5159b1=>{_0x5159b1?_0x48689d(![]):_0x48689d(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a24_0xbf6ea4(0x1dd)](a24_0xbf6ea4(0x1bd),isAuth);}
@@ -1 +1 @@
1
- (function(_0x458612,_0xc5948a){const _0x3ef9ee=a25_0x11ce,_0x258ab6=_0x458612();while(!![]){try{const _0x1aa3b3=-parseInt(_0x3ef9ee(0x7a))/0x1+parseInt(_0x3ef9ee(0x72))/0x2*(parseInt(_0x3ef9ee(0x77))/0x3)+parseInt(_0x3ef9ee(0x7c))/0x4*(-parseInt(_0x3ef9ee(0x7b))/0x5)+parseInt(_0x3ef9ee(0x70))/0x6*(-parseInt(_0x3ef9ee(0x75))/0x7)+-parseInt(_0x3ef9ee(0x73))/0x8*(-parseInt(_0x3ef9ee(0x79))/0x9)+parseInt(_0x3ef9ee(0x71))/0xa*(-parseInt(_0x3ef9ee(0x74))/0xb)+parseInt(_0x3ef9ee(0x78))/0xc*(parseInt(_0x3ef9ee(0x76))/0xd);if(_0x1aa3b3===_0xc5948a)break;else _0x258ab6['push'](_0x258ab6['shift']());}catch(_0x17b2c5){_0x258ab6['push'](_0x258ab6['shift']());}}}(a25_0x5e55,0xf254e));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';function a25_0x5e55(){const _0x48ea57=['7960neJGrk','4025022wkfhxV','19461580NikLDK','288RwJimy','872VqbLbP','11kRMWXE','7iCbAVO','91oUUocA','5124YHJXRD','10341132tAuEkn','26649YTndcg','1208403GEbhYh','4480oiwiGV'];a25_0x5e55=function(){return _0x48ea57;};return a25_0x5e55();}function a25_0x11ce(_0x1b24e6,_0x3f0a97){_0x1b24e6=_0x1b24e6-0x70;const _0x5e55d2=a25_0x5e55();let _0x11cef2=_0x5e55d2[_0x1b24e6];return _0x11cef2;}export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
1
+ const a25_0x58771a=a25_0x54ef;(function(_0x3ea93e,_0x4662af){const _0xc47a35=a25_0x54ef,_0x5cca5a=_0x3ea93e();while(!![]){try{const _0x4de3d9=-parseInt(_0xc47a35(0x119))/0x1*(parseInt(_0xc47a35(0x11b))/0x2)+parseInt(_0xc47a35(0x110))/0x3+-parseInt(_0xc47a35(0x114))/0x4*(-parseInt(_0xc47a35(0x10f))/0x5)+-parseInt(_0xc47a35(0x118))/0x6*(parseInt(_0xc47a35(0x111))/0x7)+-parseInt(_0xc47a35(0x112))/0x8*(parseInt(_0xc47a35(0x116))/0x9)+parseInt(_0xc47a35(0x113))/0xa*(-parseInt(_0xc47a35(0x11a))/0xb)+parseInt(_0xc47a35(0x115))/0xc;if(_0x4de3d9===_0x4662af)break;else _0x5cca5a['push'](_0x5cca5a['shift']());}catch(_0x2a43fe){_0x5cca5a['push'](_0x5cca5a['shift']());}}}(a25_0x5a01,0x8b9fd));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a25_0x5a01(){const _0x3b7cf0=['858ACtBTK','16PZleDQ','22BvGWwp','44276MkIMgp','5Amlcsh','37074esWykI','44338kTAvWL','15072boSRqN','202180RkLOyk','607580yLiPYY','24859992bNudOb','1737BMQgHN','/cookie'];a25_0x5a01=function(){return _0x3b7cf0;};return a25_0x5a01();}export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a25_0x58771a(0x117);function a25_0x54ef(_0x3721a7,_0x1bee76){_0x3721a7=_0x3721a7-0x10f;const _0x5a01cb=a25_0x5a01();let _0x54efde=_0x5a01cb[_0x3721a7];return _0x54efde;}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a26_0x1c3c(_0x2f8008,_0xb1c440){_0x2f8008=_0x2f8008-0x1cf;var _0x3c5d41=a26_0x3c5d();var _0x1c3ca9=_0x3c5d41[_0x2f8008];return _0x1c3ca9;}function a26_0x3c5d(){var _0x572d4f=['utf-8','17379432ccTmnL','4872553ssJPgQ','5uMbNXj','496380ogKBxF','808744IIoJFs','2140eFmOSF','4968846NvnZeI','1LmHUEw','233697ZmDzmH','18238trJMBZ','8DYcaTD','6qPLDHX'];a26_0x3c5d=function(){return _0x572d4f;};return a26_0x3c5d();}(function(_0x20a681,_0x932b76){var _0x49fbf8=a26_0x1c3c,_0x4c396a=_0x20a681();while(!![]){try{var _0x174d15=-parseInt(_0x49fbf8(0x1d8))/0x1*(parseInt(_0x49fbf8(0x1d4))/0x2)+-parseInt(_0x49fbf8(0x1d9))/0x3+-parseInt(_0x49fbf8(0x1d5))/0x4*(parseInt(_0x49fbf8(0x1d3))/0x5)+parseInt(_0x49fbf8(0x1cf))/0x6*(-parseInt(_0x49fbf8(0x1d2))/0x7)+-parseInt(_0x49fbf8(0x1db))/0x8*(-parseInt(_0x49fbf8(0x1d7))/0x9)+parseInt(_0x49fbf8(0x1d6))/0xa*(-parseInt(_0x49fbf8(0x1da))/0xb)+parseInt(_0x49fbf8(0x1d1))/0xc;if(_0x174d15===_0x932b76)break;else _0x4c396a['push'](_0x4c396a['shift']());}catch(_0x2096df){_0x4c396a['push'](_0x4c396a['shift']());}}}(a26_0x3c5d,0x66d5e));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x4ed411=a26_0x1c3c;try{return readFileSync(cookieFile,_0x4ed411(0x1d0));}catch{}return'';}
1
+ (function(_0x3f5013,_0x35df4d){var _0x58b490=a26_0x3e1b,_0x5792be=_0x3f5013();while(!![]){try{var _0x193012=-parseInt(_0x58b490(0x7e))/0x1*(-parseInt(_0x58b490(0x84))/0x2)+parseInt(_0x58b490(0x7f))/0x3+parseInt(_0x58b490(0x7d))/0x4+-parseInt(_0x58b490(0x81))/0x5+parseInt(_0x58b490(0x82))/0x6+parseInt(_0x58b490(0x80))/0x7*(parseInt(_0x58b490(0x83))/0x8)+-parseInt(_0x58b490(0x85))/0x9;if(_0x193012===_0x35df4d)break;else _0x5792be['push'](_0x5792be['shift']());}catch(_0x281d57){_0x5792be['push'](_0x5792be['shift']());}}}(a26_0x4b23,0xb3c9e));import{readFileSync}from'node:fs';function a26_0x3e1b(_0x43ed7d,_0x58799d){_0x43ed7d=_0x43ed7d-0x7d;var _0x4b2381=a26_0x4b23();var _0x3e1beb=_0x4b2381[_0x43ed7d];return _0x3e1beb;}import{cookieFile}from'./constant.js';function a26_0x4b23(){var _0x3c9cdc=['3392984qrJpvW','647BMaKXx','2135694CkOOJM','553nfTvDD','3678345EcdeRg','5205828ERhfPC','48736aiQDzf','1566NIJLNI','17492112FmvOso','utf-8'];a26_0x4b23=function(){return _0x3c9cdc;};return a26_0x4b23();}export function getCookie(){var _0x54e00a=a26_0x3e1b;try{return readFileSync(cookieFile,_0x54e00a(0x86));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x216939,_0xbe9ed5){const _0x49a4ea=a27_0x3e11,_0x336e8a=_0x216939();while(!![]){try{const _0xec320c=parseInt(_0x49a4ea(0x13c))/0x1*(-parseInt(_0x49a4ea(0x145))/0x2)+parseInt(_0x49a4ea(0x142))/0x3*(parseInt(_0x49a4ea(0x13e))/0x4)+-parseInt(_0x49a4ea(0x13f))/0x5*(parseInt(_0x49a4ea(0x13b))/0x6)+-parseInt(_0x49a4ea(0x143))/0x7+parseInt(_0x49a4ea(0x141))/0x8*(parseInt(_0x49a4ea(0x140))/0x9)+parseInt(_0x49a4ea(0x138))/0xa+parseInt(_0x49a4ea(0x144))/0xb*(parseInt(_0x49a4ea(0x13d))/0xc);if(_0xec320c===_0xbe9ed5)break;else _0x336e8a['push'](_0x336e8a['shift']());}catch(_0x320297){_0x336e8a['push'](_0x336e8a['shift']());}}}(a27_0x3f89,0x527b6));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a27_0x3f89(){const _0x49b309=['802688MfUxOw','20778AHZsBp','3392032hfbFka','46717GSdTqG','14JNSgfM','2522040rLyROb','utf-8','user','24betVqo','92738pNYBOe','4344WRovkR','148FMBgsA','843285mgdrZL','9meFAWS'];a27_0x3f89=function(){return _0x49b309;};return a27_0x3f89();}import{cookieFile}from'./constant.js';function a27_0x3e11(_0x3bc24c,_0x1ec1ef){_0x3bc24c=_0x3bc24c-0x138;const _0x3f8986=a27_0x3f89();let _0x3e1156=_0x3f8986[_0x3bc24c];return _0x3e1156;}export async function getIsSessionValid(){const _0x298286=a27_0x3e11;try{if(!existsSync(cookieFile))return![];const _0xe60291=readFileSync(cookieFile,_0x298286(0x139)),_0x49a787=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0xe60291}})['then'](_0x21f00b=>_0x21f00b['json']());return _0x49a787&&_0x49a787['session']&&_0x49a787[_0x298286(0x13a)];}catch{}return![];}
1
+ (function(_0x389957,_0x40b52f){const _0x2d56bc=a27_0x10d2,_0x2910a3=_0x389957();while(!![]){try{const _0x504821=-parseInt(_0x2d56bc(0x8d))/0x1+parseInt(_0x2d56bc(0x8a))/0x2*(parseInt(_0x2d56bc(0x85))/0x3)+-parseInt(_0x2d56bc(0x86))/0x4*(-parseInt(_0x2d56bc(0x8b))/0x5)+-parseInt(_0x2d56bc(0x87))/0x6*(-parseInt(_0x2d56bc(0x88))/0x7)+parseInt(_0x2d56bc(0x8f))/0x8+parseInt(_0x2d56bc(0x93))/0x9+-parseInt(_0x2d56bc(0x91))/0xa;if(_0x504821===_0x40b52f)break;else _0x2910a3['push'](_0x2910a3['shift']());}catch(_0x2a6f26){_0x2910a3['push'](_0x2910a3['shift']());}}}(a27_0x143e,0x2a3a1));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x19304b=a27_0x10d2;try{if(!existsSync(cookieFile))return![];const _0x3649fe=readFileSync(cookieFile,_0x19304b(0x8c)),_0x43d004=await fetch(getUserDomain()+_0x19304b(0x90),{'headers':{'cookie':_0x3649fe}})['then'](_0x1a4f17=>_0x1a4f17[_0x19304b(0x8e)]());return _0x43d004&&_0x43d004[_0x19304b(0x92)]&&_0x43d004[_0x19304b(0x89)];}catch{}return![];}function a27_0x10d2(_0x4847b0,_0x40a8e6){_0x4847b0=_0x4847b0-0x85;const _0x143e2b=a27_0x143e();let _0x10d215=_0x143e2b[_0x4847b0];return _0x10d215;}function a27_0x143e(){const _0x15179b=['474PZgoRV','24031JhUiqO','user','2vkNbso','132385AAuYTG','utf-8','190069OyCuRj','json','787000OCfVfJ','/api/auth/get-session','4545230InHTZr','session','2019627erVkBX','591273ATcJcr','4ozhrKV'];a27_0x143e=function(){return _0x15179b;};return a27_0x143e();}
@@ -1 +1 @@
1
- (function(_0x1a9b95,_0x11edce){var _0x449b0=a28_0x17d3,_0x5cac76=_0x1a9b95();while(!![]){try{var _0x2d048e=-parseInt(_0x449b0(0x159))/0x1+parseInt(_0x449b0(0x155))/0x2*(-parseInt(_0x449b0(0x151))/0x3)+parseInt(_0x449b0(0x152))/0x4+parseInt(_0x449b0(0x150))/0x5+-parseInt(_0x449b0(0x157))/0x6*(-parseInt(_0x449b0(0x14f))/0x7)+parseInt(_0x449b0(0x154))/0x8+-parseInt(_0x449b0(0x156))/0x9;if(_0x2d048e===_0x11edce)break;else _0x5cac76['push'](_0x5cac76['shift']());}catch(_0x32ac92){_0x5cac76['push'](_0x5cac76['shift']());}}}(a28_0x45e6,0x73cd3));function a28_0x17d3(_0x9736a9,_0x2b9c8f){_0x9736a9=_0x9736a9-0x14e;var _0x45e6f3=a28_0x45e6();var _0x17d322=_0x45e6f3[_0x9736a9];return _0x17d322;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x8e6a20=a28_0x17d3;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x8e6a20(0x153)](_0x8e6a20(0x14e))):console[_0x8e6a20(0x153)](_0x8e6a20(0x158));}function a28_0x45e6(){var _0x1ad745=['2JkMYnK','7917768RuKZLY','1068312BBaoll','!\x20当前未登录','593123xUBzar','✓\x20已退出登录','28zfOUxE','2357985Xtlfle','334452zeTeCs','2933036lvJrFU','log','1132944xrvVKu'];a28_0x45e6=function(){return _0x1ad745;};return a28_0x45e6();}
1
+ (function(_0x4728ea,_0x306a57){var _0x1f2ac4=a28_0x2b3c,_0x213ff0=_0x4728ea();while(!![]){try{var _0x184c82=parseInt(_0x1f2ac4(0x122))/0x1+parseInt(_0x1f2ac4(0x125))/0x2*(parseInt(_0x1f2ac4(0x11b))/0x3)+parseInt(_0x1f2ac4(0x11d))/0x4+parseInt(_0x1f2ac4(0x11e))/0x5*(parseInt(_0x1f2ac4(0x121))/0x6)+parseInt(_0x1f2ac4(0x124))/0x7+parseInt(_0x1f2ac4(0x126))/0x8+-parseInt(_0x1f2ac4(0x11f))/0x9*(parseInt(_0x1f2ac4(0x11c))/0xa);if(_0x184c82===_0x306a57)break;else _0x213ff0['push'](_0x213ff0['shift']());}catch(_0x28b9ae){_0x213ff0['push'](_0x213ff0['shift']());}}}(a28_0x1e2c,0xe1baf));function a28_0x1e2c(){var _0x2666c7=['602142pvmGuc','515087zmORSu','log','9121553DgSyvi','324256lfnwGL','1727040cHFEbe','15jUrxyj','11750PRkgJb','5303792eSwqDB','5SKmOAQ','25632ZacLwT','✓\x20已退出登录'];a28_0x1e2c=function(){return _0x2666c7;};return a28_0x1e2c();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a28_0x2b3c(_0xa9c93d,_0x4c3c3b){_0xa9c93d=_0xa9c93d-0x11b;var _0x1e2c0f=a28_0x1e2c();var _0x2b3ced=_0x1e2c0f[_0xa9c93d];return _0x2b3ced;}export function logout(){var _0x2c0729=a28_0x2b3c;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2c0729(0x123)](_0x2c0729(0x120))):console[_0x2c0729(0x123)]('!\x20当前未登录');}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a29_0x43fa19=a29_0x51e0;(function(_0xf0ac1c,_0x1bd6cc){const _0x310528=a29_0x51e0,_0x472542=_0xf0ac1c();while(!![]){try{const _0x7cbe8e=parseInt(_0x310528(0x1de))/0x1+-parseInt(_0x310528(0x207))/0x2+-parseInt(_0x310528(0x1f0))/0x3*(parseInt(_0x310528(0x1dc))/0x4)+parseInt(_0x310528(0x201))/0x5*(-parseInt(_0x310528(0x1f7))/0x6)+-parseInt(_0x310528(0x205))/0x7*(-parseInt(_0x310528(0x1ff))/0x8)+-parseInt(_0x310528(0x1db))/0x9+parseInt(_0x310528(0x1f1))/0xa;if(_0x7cbe8e===_0x1bd6cc)break;else _0x472542['push'](_0x472542['shift']());}catch(_0x4f47df){_0x472542['push'](_0x472542['shift']());}}}(a29_0x4e8f,0x8aa73));function a29_0x51e0(_0x353bfd,_0x1cf8f0){_0x353bfd=_0x353bfd-0x1da;const _0x4e8f40=a29_0x4e8f();let _0x51e0a5=_0x4e8f40[_0x353bfd];return _0x51e0a5;}import{jsx as a29_0x562442}from'react/jsx-runtime';function a29_0x4e8f(){const _0x48e890=['trim','start','page','preview','appcode','boolean','config','slice','all','setLogPath','flags','auth','add-page','cwd','add','string','执行更新菜单\x20CDN\x20资源命令','534QasfCr','20450710pQSnZP','info','\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\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\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\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\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\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\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\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\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\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\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\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\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\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\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\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\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\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\x20\x20\x20\x20//\x20清空日志\x0a','menu','\x20(监听模式)','执行启动命令','14118FvPNBH','执行预览命令','menu-update-cdn','logout','build','init','exit','input','1072LEmUxX','argv','1460WEDgEF','join','env','watch','2583amcIlF','执行添加页面命令','355968lHFcoh','api','7840449uAaYPx','380tWMeJp','error','226537rGpJhi'];a29_0x4e8f=function(){return _0x48e890;};return a29_0x4e8f();}import a29_0x2d7af7 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';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x2d7af7(a29_0x43fa19(0x1f3),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x43fa19(0x1ee)},'clear':{'type':a29_0x43fa19(0x1e4)},'env':{'type':a29_0x43fa19(0x1ee)},'watch':{'type':'boolean'},'help':{'type':a29_0x43fa19(0x1e4)},'appcode':{'type':a29_0x43fa19(0x1ee)},'output':{'type':a29_0x43fa19(0x1ee)},'params':{'type':a29_0x43fa19(0x1ee)},'datasetcode':{'type':a29_0x43fa19(0x1ee)}},'autoVersion':!![]});await run();async function run(){const _0x54a977=a29_0x43fa19,_0x2b24b1=cli[_0x54a977(0x1fe)][0x0],_0x400fef=cli[_0x54a977(0x1fe)][0x1],_0x369688=cli[_0x54a977(0x1fe)][0x2],_0x491fd8=('lovrabet\x20'+process[_0x54a977(0x200)][_0x54a977(0x1e6)](0x2)[_0x54a977(0x202)]('\x20'))['trim']();logger['setRawCommand'](_0x491fd8);switch(_0x2b24b1){case _0x54a977(0x1fc):{const _0x2a345b=cli['flags'][_0x54a977(0x1e3)],_0x272f42=cli[_0x54a977(0x1e9)]['env'];logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1fc),'执行初始化配置命令'),render(a29_0x562442(Init,{'appcode':_0x2a345b,'env':_0x272f42}));break;}case'create':{const _0x4292a9=cli['input'][0x1]?.[_0x54a977(0x1df)](),_0x39b5cb=cli[_0x54a977(0x1e9)][_0x54a977(0x203)];render(a29_0x562442(CreateApp,{'projectCode':_0x4292a9,'env':_0x39b5cb}));break;}case _0x54a977(0x1ed):{cli['input'][0x1]===_0x54a977(0x1e1)&&(logger['setLogPath'](process['cwd']()),logger[_0x54a977(0x1f2)](_0x54a977(0x1eb),_0x54a977(0x206)),render(a29_0x562442(AddPage,{})));break;}case'start':{try{logger[_0x54a977(0x1e8)](process['cwd']()),logger[_0x54a977(0x1f2)](_0x54a977(0x1e0),_0x54a977(0x1f6)),await runStart();}catch(_0x107158){console[_0x54a977(0x1dd)](_0x107158),process[_0x54a977(0x1fd)](0x1);}break;}case'build':{try{logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1fb),'执行构建命令'),await runBuild();}catch(_0x18cec6){console['error'](_0x18cec6),process[_0x54a977(0x1fd)](0x1);}break;}case _0x54a977(0x1e2):{const _0x378714=cli[_0x54a977(0x1e9)][_0x54a977(0x204)];logger['setLogPath'](process[_0x54a977(0x1ec)]()),logger['info'](_0x54a977(0x1e2),_0x54a977(0x1f8)+(_0x378714?_0x54a977(0x1f5):''));if(_0x378714)try{await Promise[_0x54a977(0x1e7)]([runBuildWatch(),runPreview()]);}catch(_0x38ceac){console['error'](_0x38ceac),process[_0x54a977(0x1fd)](0x1);}else try{await runPreview();}catch(_0x2a120b){console[_0x54a977(0x1dd)](_0x2a120b),process[_0x54a977(0x1fd)](0x1);}break;}case _0x54a977(0x1e5):{render(a29_0x562442(Config,{'cli':cli}));break;}case _0x54a977(0x1da):{await apiCli(cli);break;}case _0x54a977(0x1ea):{render(a29_0x562442(AuthServer,{}));break;}case _0x54a977(0x1f4):{if(_0x400fef==='update'){logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1f9),_0x54a977(0x1ef)),render(a29_0x562442(AppMenuUpdateCdn,{}));break;}else render(a29_0x562442(AppMenuSyncUI,{}));break;}case _0x54a977(0x1fa):{logout();break;}case'mcp':{const _0x19698f=cli['input'][0x1];await mcpCommand(_0x19698f);break;}case'logs':{cli['flags']['clear']?clearLogs():showLogs();break;}default:render(a29_0x562442(Help,{}));break;}}
2
+ const a29_0x343d9b=a29_0x1fce;(function(_0xf1f47c,_0x1864d3){const _0x331ad2=a29_0x1fce,_0x102273=_0xf1f47c();while(!![]){try{const _0x2bea46=parseInt(_0x331ad2(0x13c))/0x1*(parseInt(_0x331ad2(0x142))/0x2)+parseInt(_0x331ad2(0x153))/0x3*(parseInt(_0x331ad2(0x145))/0x4)+parseInt(_0x331ad2(0x140))/0x5+parseInt(_0x331ad2(0x148))/0x6*(-parseInt(_0x331ad2(0x13f))/0x7)+-parseInt(_0x331ad2(0x15c))/0x8*(parseInt(_0x331ad2(0x133))/0x9)+-parseInt(_0x331ad2(0x14a))/0xa+parseInt(_0x331ad2(0x136))/0xb;if(_0x2bea46===_0x1864d3)break;else _0x102273['push'](_0x102273['shift']());}catch(_0x5237d1){_0x102273['push'](_0x102273['shift']());}}}(a29_0x4087,0x37f59));import{jsx as a29_0x27fb63}from'react/jsx-runtime';import a29_0x2798fb 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';function a29_0x4087(){const _0x306f26=['36zBWekH','preview','config','build','add-page','input','执行预览命令','create','mcp','8EWcCkR','setLogPath','slice','boolean','setRawCommand','执行初始化配置命令','logout','update','3326877RluBVm','start','add','9695598RynLml','error','auth','flags','lovrabet\x20','env','3891gUmpCX','\x20(监听模式)','info','1986649RIHNyP','7525gBCTkR','\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\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\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\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\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\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\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\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\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\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\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\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\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\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\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\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\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\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\x20\x20\x20\x20//\x20清空日志\x0a','4zYfEWB','exit','string','50800cCUdub','logs','执行添加页面命令','6TYJwTD','trim','1604360PgSdgK','cwd','执行启动命令','menu-update-cdn','argv','init','join','appcode','page'];a29_0x4087=function(){return _0x306f26;};return a29_0x4087();}import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x2798fb(a29_0x343d9b(0x141),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x343d9b(0x144)},'clear':{'type':a29_0x343d9b(0x12e)},'env':{'type':'string'},'watch':{'type':a29_0x343d9b(0x12e)},'help':{'type':a29_0x343d9b(0x12e)},'appcode':{'type':'string'},'output':{'type':a29_0x343d9b(0x144)},'params':{'type':a29_0x343d9b(0x144)},'datasetcode':{'type':'string'}},'autoVersion':!![]});function a29_0x1fce(_0x59569f,_0xa4146){_0x59569f=_0x59569f-0x12c;const _0x4087f8=a29_0x4087();let _0x1fceaf=_0x4087f8[_0x59569f];return _0x1fceaf;}await run();async function run(){const _0x4ec0ad=a29_0x343d9b,_0x57eb45=cli[_0x4ec0ad(0x158)][0x0],_0x40b77d=cli[_0x4ec0ad(0x158)][0x1],_0x5edf81=cli[_0x4ec0ad(0x158)][0x2],_0x4dea11=(_0x4ec0ad(0x13a)+process[_0x4ec0ad(0x14e)][_0x4ec0ad(0x12d)](0x2)[_0x4ec0ad(0x150)]('\x20'))[_0x4ec0ad(0x149)]();logger[_0x4ec0ad(0x12f)](_0x4dea11);switch(_0x57eb45){case _0x4ec0ad(0x14f):{const _0x3ecfe8=cli[_0x4ec0ad(0x139)][_0x4ec0ad(0x151)],_0x5d5f45=cli['flags'][_0x4ec0ad(0x13b)];logger[_0x4ec0ad(0x12c)](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x14f),_0x4ec0ad(0x130)),render(a29_0x27fb63(Init,{'appcode':_0x3ecfe8,'env':_0x5d5f45}));break;}case _0x4ec0ad(0x15a):{const _0x3f29d2=cli[_0x4ec0ad(0x158)][0x1]?.[_0x4ec0ad(0x149)](),_0x8ddea0=cli[_0x4ec0ad(0x139)]['env'];render(a29_0x27fb63(CreateApp,{'projectCode':_0x3f29d2,'env':_0x8ddea0}));break;}case _0x4ec0ad(0x135):{cli[_0x4ec0ad(0x158)][0x1]===_0x4ec0ad(0x152)&&(logger['setLogPath'](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x157),_0x4ec0ad(0x147)),render(a29_0x27fb63(AddPage,{})));break;}case _0x4ec0ad(0x134):{try{logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x134),_0x4ec0ad(0x14c)),await runStart();}catch(_0x4a43c9){console[_0x4ec0ad(0x137)](_0x4a43c9),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x156):{try{logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x156),'执行构建命令'),await runBuild();}catch(_0x19f05a){console[_0x4ec0ad(0x137)](_0x19f05a),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x154):{const _0x41d759=cli['flags']['watch'];logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x154),_0x4ec0ad(0x159)+(_0x41d759?_0x4ec0ad(0x13d):''));if(_0x41d759)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x57bd8d){console[_0x4ec0ad(0x137)](_0x57bd8d),process[_0x4ec0ad(0x143)](0x1);}else try{await runPreview();}catch(_0x58bbba){console[_0x4ec0ad(0x137)](_0x58bbba),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x155):{render(a29_0x27fb63(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x4ec0ad(0x138):{render(a29_0x27fb63(AuthServer,{}));break;}case'menu':{if(_0x40b77d===_0x4ec0ad(0x132)){logger[_0x4ec0ad(0x12c)](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x14d),'执行更新菜单\x20CDN\x20资源命令'),render(a29_0x27fb63(AppMenuUpdateCdn,{}));break;}else render(a29_0x27fb63(AppMenuSyncUI,{}));break;}case _0x4ec0ad(0x131):{logout();break;}case _0x4ec0ad(0x15b):{const _0x512260=cli[_0x4ec0ad(0x158)][0x1];await mcpCommand(_0x512260);break;}case _0x4ec0ad(0x146):{cli[_0x4ec0ad(0x139)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x27fb63(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x35d32b,_0x9e9a3a){const _0x47da36=a30_0x5241,_0x3292fe=_0x35d32b();while(!![]){try{const _0x424bf7=parseInt(_0x47da36(0x1e3))/0x1+parseInt(_0x47da36(0x1e2))/0x2*(parseInt(_0x47da36(0x1e1))/0x3)+-parseInt(_0x47da36(0x1dd))/0x4+-parseInt(_0x47da36(0x1ec))/0x5+-parseInt(_0x47da36(0x1ed))/0x6*(-parseInt(_0x47da36(0x1df))/0x7)+parseInt(_0x47da36(0x1e8))/0x8+-parseInt(_0x47da36(0x1eb))/0x9;if(_0x424bf7===_0x9e9a3a)break;else _0x3292fe['push'](_0x3292fe['shift']());}catch(_0x3b34f0){_0x3292fe['push'](_0x3292fe['shift']());}}}(a30_0x859b,0xc82f0));function a30_0x5241(_0x3890b3,_0x30fb47){_0x3890b3=_0x3890b3-0x1dc;const _0x859b7d=a30_0x859b();let _0x524114=_0x859b7d[_0x3890b3];return _0x524114;}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x1b1b7b,_0x2bafc1)=>{const _0x11091d=a30_0x5241,_0x2c9c11=spawn('vite',[_0x11091d(0x1e4),_0x11091d(0x1e5)],{'stdio':_0x11091d(0x1de),'shell':!![],'env':{...process[_0x11091d(0x1ea)],'PATH':''+join(process['cwd'](),_0x11091d(0x1e7),_0x11091d(0x1e0))+delimiter+process[_0x11091d(0x1ea)][_0x11091d(0x1e9)]}});_0x2c9c11['on'](_0x11091d(0x1e6),_0x7b42c7=>{if(_0x7b42c7===0x0||_0x7b42c7===null)_0x1b1b7b();else _0x2bafc1(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x7b42c7));}),_0x2c9c11['on'](_0x11091d(0x1dc),_0x2bafc1);});}function a30_0x859b(){const _0x3769b3=['17874CttXOB','error','6483684doDWMb','inherit','2121pNtGtT','.bin','19536OBCeYt','16XonQBJ','1261728BqEsTl','build','--watch','close','node_modules','4070784QnWVSv','PATH','env','1435356oWqGnK','624760alQdAw'];a30_0x859b=function(){return _0x3769b3;};return a30_0x859b();}
1
+ (function(_0x35bae6,_0x8bdf75){const _0x2ff2b6=a30_0x1b7b,_0x2f795d=_0x35bae6();while(!![]){try{const _0x16451a=parseInt(_0x2ff2b6(0x157))/0x1*(-parseInt(_0x2ff2b6(0x153))/0x2)+parseInt(_0x2ff2b6(0x151))/0x3*(-parseInt(_0x2ff2b6(0x159))/0x4)+-parseInt(_0x2ff2b6(0x152))/0x5+-parseInt(_0x2ff2b6(0x160))/0x6*(parseInt(_0x2ff2b6(0x150))/0x7)+-parseInt(_0x2ff2b6(0x154))/0x8+parseInt(_0x2ff2b6(0x15b))/0x9*(-parseInt(_0x2ff2b6(0x15f))/0xa)+parseInt(_0x2ff2b6(0x15e))/0xb;if(_0x16451a===_0x8bdf75)break;else _0x2f795d['push'](_0x2f795d['shift']());}catch(_0x32d0a0){_0x2f795d['push'](_0x2f795d['shift']());}}}(a30_0xcb0b,0xf1d0c));function a30_0xcb0b(){const _0x22db44=['vite','PATH','95350926sWSYOE','250EqbyVj','654gVrVZu','--watch','107499OSbqaF','105qZaelS','7599410kWlWsJ','229762gZkwDI','14616760EMlgDG','env','close','15YMBYpq','build','3144AzEIEd','node_modules','326223RBqksb'];a30_0xcb0b=function(){return _0x22db44;};return a30_0xcb0b();}import{spawn}from'node:child_process';function a30_0x1b7b(_0x501fa2,_0x21bb7e){_0x501fa2=_0x501fa2-0x14f;const _0xcb0b14=a30_0xcb0b();let _0x1b7b99=_0xcb0b14[_0x501fa2];return _0x1b7b99;}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x185a17,_0x5aed0d)=>{const _0x51f1a9=a30_0x1b7b,_0x3c8939=spawn(_0x51f1a9(0x15c),[_0x51f1a9(0x158),_0x51f1a9(0x14f)],{'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x51f1a9(0x15a),'.bin')+delimiter+process[_0x51f1a9(0x155)][_0x51f1a9(0x15d)]}});_0x3c8939['on'](_0x51f1a9(0x156),_0x43f651=>{if(_0x43f651===0x0||_0x43f651===null)_0x185a17();else _0x5aed0d(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x43f651));}),_0x3c8939['on']('error',_0x5aed0d);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x28f7ad,_0x1e37af){const _0x2798ce=a31_0x4636,_0x4d3b4e=_0x28f7ad();while(!![]){try{const _0x3b4be8=parseInt(_0x2798ce(0xcf))/0x1+-parseInt(_0x2798ce(0xcc))/0x2+-parseInt(_0x2798ce(0xdd))/0x3+-parseInt(_0x2798ce(0xd7))/0x4+parseInt(_0x2798ce(0xcb))/0x5*(parseInt(_0x2798ce(0xe1))/0x6)+parseInt(_0x2798ce(0xcd))/0x7+parseInt(_0x2798ce(0xd1))/0x8;if(_0x3b4be8===_0x1e37af)break;else _0x4d3b4e['push'](_0x4d3b4e['shift']());}catch(_0x5c27de){_0x4d3b4e['push'](_0x4d3b4e['shift']());}}}(a31_0x3490,0xcee11));function a31_0x3490(){const _0x32258e=['1279721RylNVk','trim','7311152QIrqWj','node_modules','项目构建出错','run','inherit','cwd','970908WTrkCR','close','info','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','build','4341087csDYSy','now','env','开始构建项目','36jlhEpj','项目构建成功','message','.bin','error','npm','toString','91810IvRbVl','2416542TkQMfV','10091319AmArMa','PATH'];a31_0x3490=function(){return _0x32258e;};return a31_0x3490();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x4636(_0x2d02ce,_0x384851){_0x2d02ce=_0x2d02ce-0xc5;const _0x349050=a31_0x3490();let _0x463659=_0x349050[_0x2d02ce];return _0x463659;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0xa2fc23,_0x3cd3d8)=>{const _0x17bcc7=a31_0x4636,_0xb7df2e=Date[_0x17bcc7(0xde)]();logger[_0x17bcc7(0xd9)](_0x17bcc7(0xdc),_0x17bcc7(0xe0),{'command':'npm\x20run\x20build'});let _0x543a99='';const _0x319ccc=spawn(_0x17bcc7(0xc9),[_0x17bcc7(0xd4),'build'],{'stdio':[_0x17bcc7(0xd5),_0x17bcc7(0xd5),'pipe'],'shell':!![],'env':{...process[_0x17bcc7(0xdf)],'PATH':''+join(process[_0x17bcc7(0xd6)](),_0x17bcc7(0xd2),_0x17bcc7(0xc7))+delimiter+process[_0x17bcc7(0xdf)][_0x17bcc7(0xce)]}});_0x319ccc[_0x17bcc7(0xdb)]?.['on']('data',_0x4dd467=>{const _0xe7bcc9=_0x17bcc7;_0x543a99+=_0x4dd467[_0xe7bcc9(0xca)]();}),_0x319ccc['on'](_0x17bcc7(0xd8),_0x57d333=>{const _0x265c8c=_0x17bcc7,_0x2995ea=Date[_0x265c8c(0xde)]()-_0xb7df2e;if(_0x57d333===0x0||_0x57d333===null)logger['success']('build',_0x265c8c(0xc5),_0x2995ea),_0xa2fc23();else{const _0x25f2a7={'exitCode':_0x57d333,'duration':_0x2995ea,'command':'npm\x20run\x20build','cwd':process[_0x265c8c(0xd6)]()};_0x543a99['trim']()&&(_0x25f2a7[_0x265c8c(0xdb)]=_0x543a99['trim']()),logger['error'](_0x265c8c(0xdc),'项目构建失败',_0x25f2a7),_0x3cd3d8(new Error(_0x265c8c(0xda)+_0x57d333));}}),_0x319ccc['on'](_0x17bcc7(0xc8),_0x46dc30=>{const _0x1019f2=_0x17bcc7,_0x439e0b=Date[_0x1019f2(0xde)]()-_0xb7df2e;logger['error'](_0x1019f2(0xdc),_0x1019f2(0xd3),{'error':_0x46dc30[_0x1019f2(0xc6)],'duration':_0x439e0b,'stderr':_0x543a99[_0x1019f2(0xd0)]()||undefined}),_0x3cd3d8(_0x46dc30);});});}
1
+ function a31_0x25f2(_0x4db91d,_0x3dd8c4){_0x4db91d=_0x4db91d-0x87;const _0x521cbb=a31_0x521c();let _0x25f287=_0x521cbb[_0x4db91d];return _0x25f287;}(function(_0xd84bfc,_0x3c5b78){const _0x569df2=a31_0x25f2,_0x554054=_0xd84bfc();while(!![]){try{const _0x14996a=parseInt(_0x569df2(0x9e))/0x1+-parseInt(_0x569df2(0x87))/0x2*(parseInt(_0x569df2(0x91))/0x3)+-parseInt(_0x569df2(0x9f))/0x4*(parseInt(_0x569df2(0x9d))/0x5)+parseInt(_0x569df2(0xa1))/0x6+-parseInt(_0x569df2(0xa6))/0x7*(-parseInt(_0x569df2(0x88))/0x8)+parseInt(_0x569df2(0x93))/0x9*(parseInt(_0x569df2(0xa9))/0xa)+-parseInt(_0x569df2(0x94))/0xb*(parseInt(_0x569df2(0x95))/0xc);if(_0x14996a===_0x3c5b78)break;else _0x554054['push'](_0x554054['shift']());}catch(_0x4297fc){_0x554054['push'](_0x554054['shift']());}}}(a31_0x521c,0xb8727));import{delimiter,join}from'node:path';function a31_0x521c(){const _0x44ff6b=['开始构建项目','.bin','项目构建成功','npm','stderr','项目构建失败','635193cKxbOJ','cwd','7857CimsNU','17677sFCbyU','9684QcjXLu','toString','build','env','data','pipe','info','node_modules','644825tGxkuR','1389743ZBHKtg','28oNLsuS','项目构建出错','312552HrWJDI','error','npm\x20run\x20build\x20exited\x20with\x20code\x20','trim','message','7osqEui','npm\x20run\x20build','now','4180UVeJDF','2wsFfPw','10880648fjYvoo','inherit','close'];a31_0x521c=function(){return _0x44ff6b;};return a31_0x521c();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x144d34,_0x50f68e)=>{const _0xb60ff9=a31_0x25f2,_0x2b4198=Date[_0xb60ff9(0xa8)]();logger[_0xb60ff9(0x9b)](_0xb60ff9(0x97),_0xb60ff9(0x8b),{'command':_0xb60ff9(0xa7)});let _0x333dc6='';const _0x2b8376=spawn(_0xb60ff9(0x8e),['run',_0xb60ff9(0x97)],{'stdio':[_0xb60ff9(0x89),_0xb60ff9(0x89),_0xb60ff9(0x9a)],'shell':!![],'env':{...process[_0xb60ff9(0x98)],'PATH':''+join(process['cwd'](),_0xb60ff9(0x9c),_0xb60ff9(0x8c))+delimiter+process['env']['PATH']}});_0x2b8376['stderr']?.['on'](_0xb60ff9(0x99),_0x480c1a=>{const _0x299970=_0xb60ff9;_0x333dc6+=_0x480c1a[_0x299970(0x96)]();}),_0x2b8376['on'](_0xb60ff9(0x8a),_0x4b5923=>{const _0x2c9b10=_0xb60ff9,_0x471d68=Date['now']()-_0x2b4198;if(_0x4b5923===0x0||_0x4b5923===null)logger['success'](_0x2c9b10(0x97),_0x2c9b10(0x8d),_0x471d68),_0x144d34();else{const _0x5236a9={'exitCode':_0x4b5923,'duration':_0x471d68,'command':'npm\x20run\x20build','cwd':process[_0x2c9b10(0x92)]()};_0x333dc6[_0x2c9b10(0xa4)]()&&(_0x5236a9[_0x2c9b10(0x8f)]=_0x333dc6[_0x2c9b10(0xa4)]()),logger[_0x2c9b10(0xa2)]('build',_0x2c9b10(0x90),_0x5236a9),_0x50f68e(new Error(_0x2c9b10(0xa3)+_0x4b5923));}}),_0x2b8376['on'](_0xb60ff9(0xa2),_0x478a4b=>{const _0x5145f3=_0xb60ff9,_0x5abea4=Date[_0x5145f3(0xa8)]()-_0x2b4198;logger[_0x5145f3(0xa2)](_0x5145f3(0x97),_0x5145f3(0xa0),{'error':_0x478a4b[_0x5145f3(0xa5)],'duration':_0x5abea4,'stderr':_0x333dc6[_0x5145f3(0xa4)]()||undefined}),_0x50f68e(_0x478a4b);});});}