@lovrabet/cli 1.1.26-beta.9 → 1.2.1-beta.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 (67) 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 -0
  19. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -0
  20. package/lib/app-menu-update-cdn/main.js +1 -0
  21. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -0
  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/types/index.js +1 -0
  53. package/lib/utils/check-sdk-version.js +1 -0
  54. package/lib/utils/config.js +1 -1
  55. package/lib/utils/copy-directory.js +1 -1
  56. package/lib/utils/http-client.js +1 -1
  57. package/lib/utils/logger.js +1 -1
  58. package/lib/utils/router-updater.js +1 -1
  59. package/lib/utils/sleep.js +1 -1
  60. package/lib/utils/template-replacer.js +1 -1
  61. package/package.json +3 -1
  62. package/templates/generate-api/api.ts.tpl +9 -4
  63. package/templates/rules/lovrabet_rules.mdc.tpl +90 -34
  64. package/lib/app-menu-cdn-version/app-menu-sync-cdn-version-ui.js +0 -1
  65. package/lib/app-menu-cdn-version/cdn-url-compare-table.js +0 -1
  66. package/lib/app-menu-cdn-version/update-menu-cdn-url.js +0 -1
  67. /package/lib/{app-menu-cdn-version → app-menu-update-cdn}/types.js +0 -0
@@ -1 +1 @@
1
- (function(_0x9cfeee,_0xb5050d){const _0x235c6b=a11_0x3c7a,_0x4c68cd=_0x9cfeee();while(!![]){try{const _0x454749=-parseInt(_0x235c6b(0x21b))/0x1*(-parseInt(_0x235c6b(0x214))/0x2)+parseInt(_0x235c6b(0x1f8))/0x3+-parseInt(_0x235c6b(0x21c))/0x4*(parseInt(_0x235c6b(0x21d))/0x5)+-parseInt(_0x235c6b(0x1f9))/0x6*(-parseInt(_0x235c6b(0x1f5))/0x7)+parseInt(_0x235c6b(0x215))/0x8+parseInt(_0x235c6b(0x1f3))/0x9*(parseInt(_0x235c6b(0x201))/0xa)+-parseInt(_0x235c6b(0x204))/0xb*(parseInt(_0x235c6b(0x211))/0xc);if(_0x454749===_0xb5050d)break;else _0x4c68cd['push'](_0x4c68cd['shift']());}catch(_0x38ff84){_0x4c68cd['push'](_0x4c68cd['shift']());}}}(a11_0x5652,0x724a5));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a11_0x3c7a(_0x3db0fe,_0x291adf){const _0x565296=a11_0x5652();return a11_0x3c7a=function(_0x3c7a36,_0xfd162b){_0x3c7a36=_0x3c7a36-0x1f3;let _0x310105=_0x565296[_0x3c7a36];return _0x310105;},a11_0x3c7a(_0x3db0fe,_0x291adf);}function a11_0x5652(){const _0x5759d5=['/smartapi/menu/create','data','4mEnvsa','28QGDDlc','638315ZkSFwv','创建菜单成功:','import','info','批量创建菜单完成,共\x20','24309sfzwtf','create-menu','273014edLLOR','log','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','42642GBjbAg','18vyicYN','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','length','0011','创建菜单失败,HTTP状态码:\x20','path','create-menus','stringify','2220ErbRGM','菜单创建成功:\x20','errorCode','5055457WRqtnk','procode','appcode','includes','json','label','status','success','!\x20请使用以下方式之一:','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','errorMsg','application/json','创建菜单失败:\x20','12druRJW','error','未知错误','375754GDVsWi','2712088lCPTUt','POST','resources','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'];a11_0x5652=function(){return _0x5759d5;};return a11_0x5652();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x3b8f92){const _0x621238=a11_0x3c7a,_0x2309ae=config?.[_0x621238(0x206)];if(!_0x2309ae){const _0x3c19e0='未提供应用AppCode,且配置中也没有默认值';logger[_0x621238(0x212)](_0x621238(0x1f4),_0x3c19e0),console['error']('×\x20'+_0x3c19e0),console[_0x621238(0x1f6)]('!\x20请使用以下方式之一:'),console[_0x621238(0x1f6)](_0x621238(0x20d)),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x621238(0x220)](_0x621238(0x1f4),'正在创建菜单:\x20'+_0x3b8f92[_0x621238(0x209)]+'\x20('+_0x3b8f92[_0x621238(0x1fe)]+')');const _0x3ffe9b={'appCode':_0x2309ae,'type':_0x621238(0x205),'sort':0x0,'extend':{'loadScriptMode':_0x621238(0x21f),'resources':_0x3b8f92[_0x621238(0x217)]?JSON[_0x621238(0x200)](_0x3b8f92[_0x621238(0x217)]):undefined},..._0x3b8f92},_0x36899e=await fetch(getApiDomain()+_0x621238(0x219),{'method':'POST','body':JSON[_0x621238(0x200)](_0x3ffe9b),'headers':{'Content-Type':_0x621238(0x20f),'Cookie':getCookie()}});if(!_0x36899e['ok']){if(_0x36899e[_0x621238(0x20a)]===0x191){const _0x238f50=_0x621238(0x1fa);logger[_0x621238(0x212)](_0x621238(0x1f4),_0x238f50,{'status':_0x36899e[_0x621238(0x20a)],'menu':_0x3b8f92['label']});throw new Error(_0x238f50);}const _0x3efe40=_0x621238(0x1fd)+_0x36899e['status'];logger[_0x621238(0x212)]('create-menu',_0x3efe40,{'menu':_0x3b8f92['label']});throw new Error(_0x3efe40);}const _0x4967fa=await _0x36899e[_0x621238(0x208)]();if(!_0x4967fa['success']){const _0x458307=_0x621238(0x210)+(_0x4967fa[_0x621238(0x20e)]||'未知错误');logger[_0x621238(0x212)](_0x621238(0x1f4),_0x458307,{'errorCode':_0x4967fa[_0x621238(0x203)],'errorMsg':_0x4967fa[_0x621238(0x20e)],'menu':_0x3b8f92[_0x621238(0x209)]});throw new Error(_0x458307);}logger[_0x621238(0x220)](_0x621238(0x1f4),_0x621238(0x202)+_0x3b8f92[_0x621238(0x209)],_0x4967fa['data']),console['log'](_0x621238(0x21e),_0x4967fa[_0x621238(0x21a)]);}async function _createMenu(_0x1354f6,_0x30b9ce){const _0x16b429=a11_0x3c7a,_0x3c3ebf=config?.[_0x16b429(0x206)];if(!_0x3c3ebf){const _0x14c168='未提供应用AppCode,且配置中也没有默认值';logger['error'](_0x16b429(0x1f4),_0x14c168),console[_0x16b429(0x212)]('×\x20'+_0x14c168),console[_0x16b429(0x1f6)](_0x16b429(0x20c)),console[_0x16b429(0x1f6)](_0x16b429(0x20d)),console[_0x16b429(0x1f6)](_0x16b429(0x218));return;}const _0x25555d={'appCode':_0x3c3ebf,'type':_0x16b429(0x205),'sort':0x0,'extend':{'loadScriptMode':_0x16b429(0x21f),'resources':_0x30b9ce?JSON['stringify'](_0x30b9ce):undefined},'label':_0x1354f6['label'],'path':_0x1354f6[_0x16b429(0x1fe)]},_0x59670d=await fetch(getApiDomain()+_0x16b429(0x219),{'method':_0x16b429(0x216),'body':JSON[_0x16b429(0x200)](_0x25555d),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x59670d['ok']){if(_0x59670d[_0x16b429(0x20a)]===0x191){const _0x3272c5=_0x16b429(0x1fa);logger[_0x16b429(0x212)](_0x16b429(0x1f4),_0x3272c5,{'status':_0x59670d[_0x16b429(0x20a)],'menu':_0x1354f6['label']});throw new Error(_0x3272c5);}const _0x12624c=_0x16b429(0x1fd)+_0x59670d['status'];logger[_0x16b429(0x212)]('create-menu',_0x12624c,{'menu':_0x1354f6[_0x16b429(0x209)]});throw new Error(_0x12624c);}const _0x2a361b=await _0x59670d[_0x16b429(0x208)]();if(!_0x2a361b[_0x16b429(0x20b)]){if(_0x2a361b['errorCode']===_0x16b429(0x1fc)||_0x2a361b[_0x16b429(0x20e)]?.[_0x16b429(0x207)]('登录')){const _0x5a591c=_0x16b429(0x1f7);logger['error']('create-menu',_0x5a591c,{'errorCode':_0x2a361b[_0x16b429(0x203)],'errorMsg':_0x2a361b['errorMsg'],'menu':_0x1354f6['label']});throw new Error(_0x5a591c);}const _0x30141e='创建菜单失败:\x20'+(_0x2a361b[_0x16b429(0x20e)]||_0x16b429(0x213));logger['error'](_0x16b429(0x1f4),_0x30141e,{'errorCode':_0x2a361b[_0x16b429(0x203)],'errorMsg':_0x2a361b[_0x16b429(0x20e)],'menu':_0x1354f6[_0x16b429(0x209)]});throw new Error(_0x30141e);}logger[_0x16b429(0x220)](_0x16b429(0x1f4),'菜单创建成功:\x20'+_0x1354f6[_0x16b429(0x209)]);}export async function createMenus(_0x5befcd,_0x4e12cc){const _0x12bdf1=a11_0x3c7a;logger[_0x12bdf1(0x220)](_0x12bdf1(0x1ff),'开始批量创建菜单,共\x20'+_0x5befcd[_0x12bdf1(0x1fb)]+'\x20个'),await Promise['all'](_0x5befcd['map'](async _0x3c2b33=>{await _createMenu(_0x3c2b33,_0x4e12cc);})),logger['info'](_0x12bdf1(0x1ff),_0x12bdf1(0x221)+_0x5befcd[_0x12bdf1(0x1fb)]+'\x20个');}
1
+ (function(_0x25b263,_0x3e46af){const _0x1abc3f=a11_0x36b8,_0x35acbd=_0x25b263();while(!![]){try{const _0x16a595=parseInt(_0x1abc3f(0x1e1))/0x1*(parseInt(_0x1abc3f(0x1e2))/0x2)+-parseInt(_0x1abc3f(0x1c3))/0x3*(-parseInt(_0x1abc3f(0x1ca))/0x4)+parseInt(_0x1abc3f(0x1ec))/0x5*(parseInt(_0x1abc3f(0x1c4))/0x6)+parseInt(_0x1abc3f(0x1dd))/0x7+-parseInt(_0x1abc3f(0x1bb))/0x8*(parseInt(_0x1abc3f(0x1bc))/0x9)+-parseInt(_0x1abc3f(0x1d0))/0xa*(parseInt(_0x1abc3f(0x1e9))/0xb)+-parseInt(_0x1abc3f(0x1e8))/0xc*(parseInt(_0x1abc3f(0x1d8))/0xd);if(_0x16a595===_0x3e46af)break;else _0x35acbd['push'](_0x35acbd['shift']());}catch(_0x4e3356){_0x35acbd['push'](_0x35acbd['shift']());}}}(a11_0x5c4e,0x53029));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(_0x2a7cf8){const _0x67305c=a11_0x36b8,_0x5e7eb5=config?.[_0x67305c(0x1e4)];if(!_0x5e7eb5){const _0x58efa9=_0x67305c(0x1d1);logger['error'](_0x67305c(0x1cc),_0x58efa9),console['error']('×\x20'+_0x58efa9),console['log'](_0x67305c(0x1c6)),console[_0x67305c(0x1c0)](_0x67305c(0x1d2)),console['log'](_0x67305c(0x1c2));return;}logger[_0x67305c(0x1e3)](_0x67305c(0x1cc),_0x67305c(0x1be)+_0x2a7cf8[_0x67305c(0x1db)]+'\x20('+_0x2a7cf8[_0x67305c(0x1de)]+')');const _0x394709={'appCode':_0x5e7eb5,'type':_0x67305c(0x1ea),'sort':0x0,'extend':{'loadScriptMode':_0x67305c(0x1cf),'resources':_0x2a7cf8[_0x67305c(0x1d4)]?JSON[_0x67305c(0x1d5)](_0x2a7cf8[_0x67305c(0x1d4)]):undefined},..._0x2a7cf8},_0x7d0c90=await fetch(getApiDomain()+_0x67305c(0x1eb),{'method':_0x67305c(0x1e7),'body':JSON[_0x67305c(0x1d5)](_0x394709),'headers':{'Content-Type':_0x67305c(0x1e0),'Cookie':getCookie()}});if(!_0x7d0c90['ok']){if(_0x7d0c90['status']===0x191){const _0x36cc95=_0x67305c(0x1bd);logger['error'](_0x67305c(0x1cc),_0x36cc95,{'status':_0x7d0c90[_0x67305c(0x1d7)],'menu':_0x2a7cf8[_0x67305c(0x1db)]});throw new Error(_0x36cc95);}const _0x54c8f5=_0x67305c(0x1c9)+_0x7d0c90['status'];logger['error'](_0x67305c(0x1cc),_0x54c8f5,{'menu':_0x2a7cf8[_0x67305c(0x1db)]});throw new Error(_0x54c8f5);}const _0x4195df=await _0x7d0c90[_0x67305c(0x1cd)]();if(!_0x4195df['success']){const _0x34592d=_0x67305c(0x1b9)+(_0x4195df['errorMsg']||_0x67305c(0x1d9));logger[_0x67305c(0x1ce)](_0x67305c(0x1cc),_0x34592d,{'errorCode':_0x4195df[_0x67305c(0x1bf)],'errorMsg':_0x4195df[_0x67305c(0x1c7)],'menu':_0x2a7cf8['label']});throw new Error(_0x34592d);}logger['info'](_0x67305c(0x1cc),_0x67305c(0x1dc)+_0x2a7cf8[_0x67305c(0x1db)],_0x4195df['data']),console[_0x67305c(0x1c0)](_0x67305c(0x1d6),_0x4195df[_0x67305c(0x1cb)]);}async function _createMenu(_0x59d840,_0x25fa75){const _0x3602bb=a11_0x36b8,_0x16581d=config?.[_0x3602bb(0x1e4)];if(!_0x16581d){const _0x59709d=_0x3602bb(0x1d1);logger[_0x3602bb(0x1ce)](_0x3602bb(0x1cc),_0x59709d),console[_0x3602bb(0x1ce)]('×\x20'+_0x59709d),console[_0x3602bb(0x1c0)](_0x3602bb(0x1c6)),console[_0x3602bb(0x1c0)](_0x3602bb(0x1d2)),console[_0x3602bb(0x1c0)](_0x3602bb(0x1c2));return;}const _0x30238c={'appCode':_0x16581d,'type':_0x3602bb(0x1ea),'sort':0x0,'extend':{'loadScriptMode':_0x3602bb(0x1cf),'resources':_0x25fa75?JSON[_0x3602bb(0x1d5)](_0x25fa75):undefined},'label':_0x59d840['label'],'path':_0x59d840['path']},_0x3300f7=await fetch(getApiDomain()+_0x3602bb(0x1eb),{'method':'POST','body':JSON[_0x3602bb(0x1d5)](_0x30238c),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x3300f7['ok']){if(_0x3300f7['status']===0x191){const _0xa58968=_0x3602bb(0x1bd);logger[_0x3602bb(0x1ce)]('create-menu',_0xa58968,{'status':_0x3300f7[_0x3602bb(0x1d7)],'menu':_0x59d840[_0x3602bb(0x1db)]});throw new Error(_0xa58968);}const _0x496273=_0x3602bb(0x1c9)+_0x3300f7[_0x3602bb(0x1d7)];logger[_0x3602bb(0x1ce)](_0x3602bb(0x1cc),_0x496273,{'menu':_0x59d840[_0x3602bb(0x1db)]});throw new Error(_0x496273);}const _0x71143a=await _0x3300f7[_0x3602bb(0x1cd)]();if(!_0x71143a[_0x3602bb(0x1c5)]){if(_0x71143a[_0x3602bb(0x1bf)]==='0011'||_0x71143a[_0x3602bb(0x1c7)]?.[_0x3602bb(0x1c1)]('登录')){const _0x1940e9=_0x3602bb(0x1df);logger[_0x3602bb(0x1ce)]('create-menu',_0x1940e9,{'errorCode':_0x71143a['errorCode'],'errorMsg':_0x71143a[_0x3602bb(0x1c7)],'menu':_0x59d840[_0x3602bb(0x1db)]});throw new Error(_0x1940e9);}const _0x364317=_0x3602bb(0x1b9)+(_0x71143a[_0x3602bb(0x1c7)]||_0x3602bb(0x1d9));logger[_0x3602bb(0x1ce)](_0x3602bb(0x1cc),_0x364317,{'errorCode':_0x71143a[_0x3602bb(0x1bf)],'errorMsg':_0x71143a[_0x3602bb(0x1c7)],'menu':_0x59d840[_0x3602bb(0x1db)]});throw new Error(_0x364317);}logger['info'](_0x3602bb(0x1cc),_0x3602bb(0x1dc)+_0x59d840['label']);}function a11_0x36b8(_0x890fe4,_0x1cd47c){_0x890fe4=_0x890fe4-0x1b9;const _0x5c4eb4=a11_0x5c4e();let _0x36b859=_0x5c4eb4[_0x890fe4];return _0x36b859;}function a11_0x5c4e(){const _0x355b2b=['\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','9003ieVGbB','986826IkNEeB','success','!\x20请使用以下方式之一:','errorMsg','开始批量创建菜单,共\x20','创建菜单失败,HTTP状态码:\x20','740HMxwze','data','create-menu','json','error','import','10RrDkOq','未提供应用AppCode,且配置中也没有默认值','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','all','resources','stringify','创建菜单成功:','status','13aoFsZV','未知错误','create-menus','label','菜单创建成功:\x20','1622054XQhTiB','path','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','application/json','95EayhRh','2406WtRouo','info','appcode','length','map','POST','2636580uqbeOL','2941279agzjex','procode','/smartapi/menu/create','5oiJhsh','创建菜单失败:\x20','批量创建菜单完成,共\x20','38168xtohvQ','450ZmFplV','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','正在创建菜单:\x20','errorCode','log','includes'];a11_0x5c4e=function(){return _0x355b2b;};return a11_0x5c4e();}export async function createMenus(_0x19d3b7,_0x58ae6d){const _0x2adc62=a11_0x36b8;logger['info'](_0x2adc62(0x1da),_0x2adc62(0x1c8)+_0x19d3b7[_0x2adc62(0x1e5)]+'\x20个'),await Promise[_0x2adc62(0x1d3)](_0x19d3b7[_0x2adc62(0x1e6)](async _0x400257=>{await _createMenu(_0x400257,_0x58ae6d);})),logger[_0x2adc62(0x1e3)](_0x2adc62(0x1da),_0x2adc62(0x1ba)+_0x19d3b7[_0x2adc62(0x1e5)]+'\x20个');}
@@ -1 +1 @@
1
- const a12_0x2769f0=a12_0x4415;(function(_0x3d7077,_0x1323b1){const _0x105c17=a12_0x4415,_0x47f1bc=_0x3d7077();while(!![]){try{const _0x4e8576=-parseInt(_0x105c17(0xc9))/0x1+parseInt(_0x105c17(0xd8))/0x2+-parseInt(_0x105c17(0xd9))/0x3*(parseInt(_0x105c17(0xcc))/0x4)+-parseInt(_0x105c17(0xd2))/0x5+parseInt(_0x105c17(0xdd))/0x6*(parseInt(_0x105c17(0xda))/0x7)+-parseInt(_0x105c17(0xc8))/0x8*(-parseInt(_0x105c17(0xca))/0x9)+-parseInt(_0x105c17(0xd1))/0xa;if(_0x4e8576===_0x1323b1)break;else _0x47f1bc['push'](_0x47f1bc['shift']());}catch(_0x32484e){_0x47f1bc['push'](_0x47f1bc['shift']());}}}(a12_0x4324,0xe7a06));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x2769f0(0xde)](),a12_0x2769f0(0xcd));export function extractTitleFromComment(_0x490543){const _0x12d72b=a12_0x2769f0;try{const _0x2349f2=readFileSync(_0x490543,_0x12d72b(0xc7)),_0x4a4230=_0x2349f2[_0x12d72b(0xd3)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4a4230&&_0x4a4230[0x1]){const _0x296514=_0x4a4230[0x1],_0x5de8d1=_0x296514['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5de8d1&&_0x5de8d1[0x1])return _0x5de8d1[0x1][_0x12d72b(0xd6)]();}let _0x5d4638=null;const _0x1f458f=_0x2349f2[_0x12d72b(0xd3)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1f458f&&_0x1f458f[0x1]&&(_0x5d4638=_0x1f458f[0x1]);if(!_0x5d4638){const _0x1d89ba=_0x2349f2[_0x12d72b(0xd3)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x1d89ba&&_0x1d89ba[0x1]&&(_0x5d4638=_0x1d89ba[0x1]);}if(_0x5d4638){const _0x3cface=new RegExp('\x5cb'+_0x5d4638+_0x12d72b(0xcb)),_0xbccad7=_0x2349f2['match'](_0x3cface);if(_0xbccad7&&_0xbccad7[0x1])return _0xbccad7[0x1];return _0x5d4638;}return null;}catch(_0x480b22){return null;}}function a12_0x4415(_0x261bbd,_0x32d324){const _0x43249f=a12_0x4324();return a12_0x4415=function(_0x441511,_0x231fe1){_0x441511=_0x441511-0xc7;let _0x39ee73=_0x43249f[_0x441511];return _0x39ee73;},a12_0x4415(_0x261bbd,_0x32d324);}function a12_0x4324(){const _0x22e1b8=['112XjUwWd','slice','path','523818cRABNA','cwd','endsWith','filter','utf-8','7168quuepH','719100aTRBuH','15759VfHYUl','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','60KYgARu','src/pages','index.tsx','replaceAll','replace','13256010yyPskR','291490urKwPI','match','.tsx','push','trim','isDirectory','2653384RzOttg','248139rqfgqT'];a12_0x4324=function(){return _0x22e1b8;};return a12_0x4324();}export function getLocalPages(_0x5c78d5=pagesDir,_0x55d635=pagesDir){const _0x536b13=a12_0x2769f0;let _0x183d25=[];const _0x5f0c3a=readdirSync(_0x5c78d5);return _0x5f0c3a['forEach'](_0x3a6747=>{const _0x3d420f=a12_0x4415,_0x4ba5ad=join(_0x5c78d5,_0x3a6747),_0x198f04=statSync(_0x4ba5ad);if(_0x198f04&&_0x198f04[_0x3d420f(0xd7)]())_0x183d25=_0x183d25['concat'](getLocalPages(_0x4ba5ad,_0x55d635));else{if(_0x3a6747[_0x3d420f(0xdf)](_0x3d420f(0xd4))){let _0x3e10b5=relative(_0x55d635,_0x4ba5ad);_0x3e10b5[_0x3d420f(0xdf)](_0x3d420f(0xce))?_0x3e10b5=_0x3e10b5[_0x3d420f(0xd0)](/index\.tsx$/,''):_0x3e10b5=_0x3e10b5[_0x3d420f(0xd0)](/\.tsx$/,'');_0x3e10b5[_0x3d420f(0xdf)]('/')&&(_0x3e10b5=_0x3e10b5[_0x3d420f(0xdb)](0x0,-0x1));const _0x25abfe=extractTitleFromComment(_0x4ba5ad),_0x33db14=_0x25abfe||_0x3e10b5;_0x183d25[_0x3d420f(0xd5)]({'path':_0x3e10b5[_0x3d420f(0xcf)]('$',':'),'label':_0x33db14});}}}),_0x183d25[_0x536b13(0xe0)](_0x303090=>_0x303090[_0x536b13(0xdc)]!=='');}
1
+ function a12_0x40fb(){const _0x185ac6=['1716OwxKIz','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','filter','121542syZAVj','16PoGNjC','match','forEach','356313XNmLkF','push','isDirectory','35bkErjt','index.tsx','1050080NIHXAS','9PwkHuV','647224LAMfEW','trim','replaceAll','980248XelQHh','cwd','265CHYgKx','105NWHyGa','utf-8','slice','replace','endsWith','44374BGvmEj','src/pages'];a12_0x40fb=function(){return _0x185ac6;};return a12_0x40fb();}const a12_0x478cb8=a12_0x3cf8;function a12_0x3cf8(_0x50641f,_0xff4177){_0x50641f=_0x50641f-0xc9;const _0x40fb7b=a12_0x40fb();let _0x3cf81f=_0x40fb7b[_0x50641f];return _0x3cf81f;}(function(_0x8c00ac,_0x122bab){const _0x20a0b9=a12_0x3cf8,_0x196439=_0x8c00ac();while(!![]){try{const _0x2ac358=parseInt(_0x20a0b9(0xd8))/0x1*(parseInt(_0x20a0b9(0xc9))/0x2)+-parseInt(_0x20a0b9(0xcc))/0x3+-parseInt(_0x20a0b9(0xd6))/0x4+parseInt(_0x20a0b9(0xd9))/0x5*(-parseInt(_0x20a0b9(0xe3))/0x6)+parseInt(_0x20a0b9(0xcf))/0x7*(parseInt(_0x20a0b9(0xd3))/0x8)+-parseInt(_0x20a0b9(0xd2))/0x9*(-parseInt(_0x20a0b9(0xd1))/0xa)+parseInt(_0x20a0b9(0xde))/0xb*(parseInt(_0x20a0b9(0xe0))/0xc);if(_0x2ac358===_0x122bab)break;else _0x196439['push'](_0x196439['shift']());}catch(_0xc5ce09){_0x196439['push'](_0x196439['shift']());}}}(a12_0x40fb,0x4910b));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x478cb8(0xd7)](),a12_0x478cb8(0xdf));export function extractTitleFromComment(_0x239ed0){const _0x519e3b=a12_0x478cb8;try{const _0xae761e=readFileSync(_0x239ed0,_0x519e3b(0xda)),_0x381f9b=_0xae761e[_0x519e3b(0xca)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x381f9b&&_0x381f9b[0x1]){const _0x4cda3b=_0x381f9b[0x1],_0x59feb5=_0x4cda3b[_0x519e3b(0xca)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x59feb5&&_0x59feb5[0x1])return _0x59feb5[0x1][_0x519e3b(0xd4)]();}let _0x32fcec=null;const _0x42f124=_0xae761e[_0x519e3b(0xca)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x42f124&&_0x42f124[0x1]&&(_0x32fcec=_0x42f124[0x1]);if(!_0x32fcec){const _0x458135=_0xae761e[_0x519e3b(0xca)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x458135&&_0x458135[0x1]&&(_0x32fcec=_0x458135[0x1]);}if(_0x32fcec){const _0xe4249e=new RegExp('\x5cb'+_0x32fcec+_0x519e3b(0xe1)),_0x65cb1b=_0xae761e[_0x519e3b(0xca)](_0xe4249e);if(_0x65cb1b&&_0x65cb1b[0x1])return _0x65cb1b[0x1];return _0x32fcec;}return null;}catch(_0x2b3e62){return null;}}export function getLocalPages(_0x581cbc=pagesDir,_0x3c3c48=pagesDir){const _0x3654e6=a12_0x478cb8;let _0x5d05bf=[];const _0x1adebf=readdirSync(_0x581cbc);return _0x1adebf[_0x3654e6(0xcb)](_0x3468df=>{const _0x2dd17d=_0x3654e6,_0x4bb120=join(_0x581cbc,_0x3468df),_0x2e678a=statSync(_0x4bb120);if(_0x2e678a&&_0x2e678a[_0x2dd17d(0xce)]())_0x5d05bf=_0x5d05bf['concat'](getLocalPages(_0x4bb120,_0x3c3c48));else{if(_0x3468df[_0x2dd17d(0xdd)]('.tsx')){let _0x97a15c=relative(_0x3c3c48,_0x4bb120);_0x97a15c[_0x2dd17d(0xdd)](_0x2dd17d(0xd0))?_0x97a15c=_0x97a15c[_0x2dd17d(0xdc)](/index\.tsx$/,''):_0x97a15c=_0x97a15c[_0x2dd17d(0xdc)](/\.tsx$/,'');_0x97a15c[_0x2dd17d(0xdd)]('/')&&(_0x97a15c=_0x97a15c[_0x2dd17d(0xdb)](0x0,-0x1));const _0x199f32=extractTitleFromComment(_0x4bb120),_0xc8e977=_0x199f32||_0x97a15c;_0x5d05bf[_0x2dd17d(0xcd)]({'path':_0x97a15c[_0x2dd17d(0xd5)]('$',':'),'label':_0xc8e977});}}}),_0x5d05bf[_0x3654e6(0xe2)](_0x54e3be=>_0x54e3be['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x3900d2,_0x14320c){const _0x579b2d=a13_0x1062,_0x59d7bb=_0x3900d2();while(!![]){try{const _0x984158=parseInt(_0x579b2d(0x186))/0x1*(-parseInt(_0x579b2d(0x18f))/0x2)+-parseInt(_0x579b2d(0x188))/0x3+-parseInt(_0x579b2d(0x17d))/0x4*(-parseInt(_0x579b2d(0x198))/0x5)+-parseInt(_0x579b2d(0x17a))/0x6+-parseInt(_0x579b2d(0x17c))/0x7*(-parseInt(_0x579b2d(0x173))/0x8)+-parseInt(_0x579b2d(0x197))/0x9+parseInt(_0x579b2d(0x180))/0xa;if(_0x984158===_0x14320c)break;else _0x59d7bb['push'](_0x59d7bb['shift']());}catch(_0x292892){_0x59d7bb['push'](_0x59d7bb['shift']());}}}(a13_0x2230,0x9a03c));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x2230(){const _0x423f57=['获取菜单列表失败:\x20','7666967MtaXeC','1073640YiFIOI','info','获取菜单列表失败,HTTP状态码:\x20','12624840cVuSYO','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','errorCode','log','path','json','119159kVHsEp','errorMsg','2041758XELBqQ','/smartapi/menu/find?appCode=','extend','success','data','GET','status','12mewwxh','parse','正在获取线上菜单列表...\x20(appCode:\x20','resources','isArray','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20个线上菜单','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','2565936FZZIgF','15SZBCxs','未知错误','服务端返回空菜单列表','8xVjldm','length','error','label','!\x20请使用以下方式之一:','application/json','get-online-menu-list','5109042OpsOqG'];a13_0x2230=function(){return _0x423f57;};return a13_0x2230();}import{readConfig}from'../utils/config.js';function a13_0x1062(_0x2b7414,_0x276642){const _0x22302b=a13_0x2230();return a13_0x1062=function(_0x1062c7,_0x430815){_0x1062c7=_0x1062c7-0x172;let _0x1e4798=_0x22302b[_0x1062c7];return _0x1e4798;},a13_0x1062(_0x2b7414,_0x276642);}import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0xdd1c40=a13_0x1062,_0x2f620d=config?.['appcode'];if(!_0x2f620d){const _0x4c4162='未提供应用AppCode,且配置中也没有默认值';return logger['error'](_0xdd1c40(0x179),_0x4c4162),console['error']('×\x20'+_0x4c4162),console[_0xdd1c40(0x183)](_0xdd1c40(0x177)),console[_0xdd1c40(0x183)](_0xdd1c40(0x181)),console[_0xdd1c40(0x183)](_0xdd1c40(0x196)),[];}logger['info'](_0xdd1c40(0x179),_0xdd1c40(0x191)+_0x2f620d+')');const _0x133664=await fetch(getApiDomain()+_0xdd1c40(0x189)+_0x2f620d,{'method':_0xdd1c40(0x18d),'headers':{'Content-Type':_0xdd1c40(0x178),'Cookie':getCookie()}});if(!_0x133664['ok']){if(_0x133664[_0xdd1c40(0x18e)]===0x191){const _0x24a877=_0xdd1c40(0x194);logger[_0xdd1c40(0x175)]('get-online-menu-list',_0x24a877,{'status':_0x133664[_0xdd1c40(0x18e)]});throw new Error(_0x24a877);}const _0x20333b=_0xdd1c40(0x17f)+_0x133664[_0xdd1c40(0x18e)];logger[_0xdd1c40(0x175)]('get-online-menu-list',_0x20333b);throw new Error(_0x20333b);}const _0x3c9f4b=await _0x133664[_0xdd1c40(0x185)]();if(!_0x3c9f4b[_0xdd1c40(0x18b)]){const _0x4a7db4=_0xdd1c40(0x17b)+(_0x3c9f4b['errorMsg']||_0xdd1c40(0x199));logger[_0xdd1c40(0x175)](_0xdd1c40(0x179),_0x4a7db4,{'errorCode':_0x3c9f4b[_0xdd1c40(0x182)],'errorMsg':_0x3c9f4b[_0xdd1c40(0x187)]});throw new Error(_0x4a7db4);}if(!_0x3c9f4b[_0xdd1c40(0x18c)])return logger[_0xdd1c40(0x17e)](_0xdd1c40(0x179),_0xdd1c40(0x172)),[];return logger[_0xdd1c40(0x17e)](_0xdd1c40(0x179),'成功获取\x20'+_0x3c9f4b[_0xdd1c40(0x18c)][_0xdd1c40(0x174)]+_0xdd1c40(0x195)),_0x3c9f4b['data']['map'](_0x28b218=>{const _0xd09e37=_0xdd1c40;let _0x3fcf24=[];try{if(_0x28b218[_0xd09e37(0x18a)]?.[_0xd09e37(0x192)]){const _0x591871=JSON[_0xd09e37(0x190)](_0x28b218[_0xd09e37(0x18a)][_0xd09e37(0x192)]);Array[_0xd09e37(0x193)](_0x591871)&&(_0x3fcf24=_0x591871);}}catch(_0x47ca19){}return{'id':_0x28b218['id'],'path':_0x28b218[_0xd09e37(0x184)],'label':_0x28b218[_0xd09e37(0x176)],'resources':_0x3fcf24};});}
1
+ function a13_0x5028(_0xfaac43,_0x3f70aa){_0xfaac43=_0xfaac43-0x15c;const _0x5d02f8=a13_0x5d02();let _0x50288a=_0x5d02f8[_0xfaac43];return _0x50288a;}(function(_0x58bea4,_0x1c775d){const _0x37ad89=a13_0x5028,_0x469d03=_0x58bea4();while(!![]){try{const _0x520a72=parseInt(_0x37ad89(0x160))/0x1+parseInt(_0x37ad89(0x170))/0x2*(parseInt(_0x37ad89(0x169))/0x3)+parseInt(_0x37ad89(0x16a))/0x4+parseInt(_0x37ad89(0x172))/0x5*(-parseInt(_0x37ad89(0x166))/0x6)+parseInt(_0x37ad89(0x163))/0x7*(-parseInt(_0x37ad89(0x17c))/0x8)+-parseInt(_0x37ad89(0x180))/0x9+parseInt(_0x37ad89(0x16f))/0xa*(parseInt(_0x37ad89(0x171))/0xb);if(_0x520a72===_0x1c775d)break;else _0x469d03['push'](_0x469d03['shift']());}catch(_0x573e13){_0x469d03['push'](_0x469d03['shift']());}}}(a13_0x5d02,0x877a3));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x5d58bf=a13_0x5028,_0x33e99e=config?.['appcode'];if(!_0x33e99e){const _0x2024ef=_0x5d58bf(0x164);return logger['error'](_0x5d58bf(0x161),_0x2024ef),console[_0x5d58bf(0x17d)]('×\x20'+_0x2024ef),console['log'](_0x5d58bf(0x15d)),console[_0x5d58bf(0x16d)](_0x5d58bf(0x181)),console[_0x5d58bf(0x16d)](_0x5d58bf(0x16c)),[];}logger[_0x5d58bf(0x179)](_0x5d58bf(0x161),_0x5d58bf(0x16e)+_0x33e99e+')');const _0x2c37dd=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x33e99e,{'method':_0x5d58bf(0x15c),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2c37dd['ok']){if(_0x2c37dd[_0x5d58bf(0x15f)]===0x191){const _0x4220a5=_0x5d58bf(0x174);logger[_0x5d58bf(0x17d)](_0x5d58bf(0x161),_0x4220a5,{'status':_0x2c37dd[_0x5d58bf(0x15f)]});throw new Error(_0x4220a5);}const _0x49c01d=_0x5d58bf(0x162)+_0x2c37dd[_0x5d58bf(0x15f)];logger[_0x5d58bf(0x17d)](_0x5d58bf(0x161),_0x49c01d);throw new Error(_0x49c01d);}const _0x2116dd=await _0x2c37dd[_0x5d58bf(0x16b)]();if(!_0x2116dd[_0x5d58bf(0x168)]){const _0x1dddca=_0x5d58bf(0x178)+(_0x2116dd[_0x5d58bf(0x165)]||'未知错误');logger[_0x5d58bf(0x17d)](_0x5d58bf(0x161),_0x1dddca,{'errorCode':_0x2116dd['errorCode'],'errorMsg':_0x2116dd[_0x5d58bf(0x165)]});throw new Error(_0x1dddca);}if(!_0x2116dd[_0x5d58bf(0x177)])return logger['info']('get-online-menu-list',_0x5d58bf(0x17f)),[];return logger[_0x5d58bf(0x179)](_0x5d58bf(0x161),'成功获取\x20'+_0x2116dd[_0x5d58bf(0x177)][_0x5d58bf(0x15e)]+'\x20个线上菜单'),_0x2116dd[_0x5d58bf(0x177)][_0x5d58bf(0x17a)](formatMenuList)[_0x5d58bf(0x182)]();}function a13_0x5d02(){const _0x285dad=['147UknOjn','1766508naeeiv','json','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','log','正在获取线上菜单列表...\x20(appCode:\x20','318380kGeLwI','11536VQLZLT','11zvgWuW','105IKweLy','isArray','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','resources','extend','data','获取菜单列表失败:\x20','info','map','parse','256KRxhQG','error','push','服务端返回空菜单列表','587952wndLrz','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','flat','GET','!\x20请使用以下方式之一:','length','status','329837gLdGDL','get-online-menu-list','获取菜单列表失败,HTTP状态码:\x20','30359ZAGADK','未提供应用AppCode,且配置中也没有默认值','errorMsg','93402OcLwHC','children','success'];a13_0x5d02=function(){return _0x285dad;};return a13_0x5d02();}function formatMenuList(_0x3d7bfb){const _0x5eef38=a13_0x5028;let _0x26de81=[];try{if(_0x3d7bfb['extend']?.[_0x5eef38(0x175)]){const _0x5650d6=JSON[_0x5eef38(0x17b)](_0x3d7bfb[_0x5eef38(0x176)][_0x5eef38(0x175)]);Array[_0x5eef38(0x173)](_0x5650d6)&&(_0x26de81=_0x5650d6);}}catch(_0x53c790){}const _0x205c39=[{'id':_0x3d7bfb['id'],'path':_0x3d7bfb['path'],'label':_0x3d7bfb['label'],'resources':_0x26de81}];if(_0x3d7bfb[_0x5eef38(0x167)]&&_0x3d7bfb['children'][_0x5eef38(0x15e)]>0x0)for(const _0x8d3321 of _0x3d7bfb['children']){_0x205c39[_0x5eef38(0x17e)](...formatMenuList(_0x8d3321));}return _0x205c39;}
@@ -1 +1 @@
1
- function a15_0x15b7(_0x287ad7,_0x100dd3){const _0x9caf93=a15_0x9caf();return a15_0x15b7=function(_0x15b7a3,_0x2d186a){_0x15b7a3=_0x15b7a3-0x10f;let _0xe194ba=_0x9caf93[_0x15b7a3];return _0xe194ba;},a15_0x15b7(_0x287ad7,_0x100dd3);}function a15_0x9caf(){const _0x25275f=['8955LFufjD','then','46040TasEWm','3734zFNVJV','获取菜单列表失败','10zghEYm','3438CHPJiN','message','finally','4pxoOjk','catch','3012348BWSWlF','27VLqOWY','637XxztPk','3606390MGCJKw','2082291jrxqOI','9146203ZZlMkJ'];a15_0x9caf=function(){return _0x25275f;};return a15_0x9caf();}(function(_0x54eb33,_0x1a9eba){const _0x13002d=a15_0x15b7,_0x2c2087=_0x54eb33();while(!![]){try{const _0xffe0a8=-parseInt(_0x13002d(0x11c))/0x1*(parseInt(_0x13002d(0x113))/0x2)+-parseInt(_0x13002d(0x11f))/0x3*(parseInt(_0x13002d(0x119))/0x4)+parseInt(_0x13002d(0x110))/0x5*(parseInt(_0x13002d(0x116))/0x6)+parseInt(_0x13002d(0x11d))/0x7*(parseInt(_0x13002d(0x112))/0x8)+parseInt(_0x13002d(0x11e))/0x9+parseInt(_0x13002d(0x115))/0xa*(-parseInt(_0x13002d(0x10f))/0xb)+parseInt(_0x13002d(0x11b))/0xc;if(_0xffe0a8===_0x1a9eba)break;else _0x2c2087['push'](_0x2c2087['shift']());}catch(_0x2daec1){_0x2c2087['push'](_0x2c2087['shift']());}}}(a15_0x9caf,0x98c2c));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x3c18aa,_0x5a4584]=useState([]),[_0x1f2a79,_0x48f34b]=useState(!![]),[_0x11baf2,_0x37f6a7]=useState('');return useEffect(()=>{const _0x51d4fc=a15_0x15b7;_0x48f34b(!![]),_0x37f6a7(''),getOnlineMenuList()[_0x51d4fc(0x111)](_0x5a4584)[_0x51d4fc(0x11a)](_0x359106=>{const _0x45ced4=_0x51d4fc;_0x37f6a7(_0x359106[_0x45ced4(0x117)]||_0x45ced4(0x114));})[_0x51d4fc(0x118)](()=>_0x48f34b(![]));},[]),{'menuList':_0x3c18aa,'loading':_0x1f2a79,'error':_0x11baf2};}
1
+ (function(_0xdde2b8,_0x57d079){const _0x33f4ab=a15_0x2574,_0x398724=_0xdde2b8();while(!![]){try{const _0x523ede=parseInt(_0x33f4ab(0x1ab))/0x1*(-parseInt(_0x33f4ab(0x1b2))/0x2)+parseInt(_0x33f4ab(0x1b1))/0x3+-parseInt(_0x33f4ab(0x1ad))/0x4+-parseInt(_0x33f4ab(0x1ac))/0x5+-parseInt(_0x33f4ab(0x1b5))/0x6+-parseInt(_0x33f4ab(0x1af))/0x7+parseInt(_0x33f4ab(0x1b3))/0x8;if(_0x523ede===_0x57d079)break;else _0x398724['push'](_0x398724['shift']());}catch(_0x3fccd6){_0x398724['push'](_0x398724['shift']());}}}(a15_0x47a5,0xea786));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';function a15_0x47a5(){const _0x46d9b9=['1971360TDrzYm','6MBdRHc','41310456ieSyDY','catch','7511082EHZTFp','325555IcTXxU','1006295KTxFvG','4276816Hfpazy','获取菜单列表失败','9530934dDaROf','finally'];a15_0x47a5=function(){return _0x46d9b9;};return a15_0x47a5();}function a15_0x2574(_0x6a1393,_0xe120b4){_0x6a1393=_0x6a1393-0x1ab;const _0x47a523=a15_0x47a5();let _0x2574d3=_0x47a523[_0x6a1393];return _0x2574d3;}export function useGetOnlineMenuList(){const [_0x3d94d0,_0x289923]=useState([]),[_0x737ffa,_0x51bd98]=useState(!![]),[_0x3bbeba,_0x55d3c5]=useState('');return useEffect(()=>{const _0x2ad195=a15_0x2574;_0x51bd98(!![]),_0x55d3c5(''),getOnlineMenuList()['then'](_0x289923)[_0x2ad195(0x1b4)](_0x4c25e3=>{const _0x5be0fc=_0x2ad195;_0x55d3c5(_0x4c25e3['message']||_0x5be0fc(0x1ae));})[_0x2ad195(0x1b0)](()=>_0x51bd98(![]));},[]),{'menuList':_0x3d94d0,'loading':_0x737ffa,'error':_0x3bbeba};}
@@ -1 +1 @@
1
- (function(_0x46c6c5,_0x3bad0d){const _0x50e047=a16_0x3d0c,_0x4bfadc=_0x46c6c5();while(!![]){try{const _0x142e3c=parseInt(_0x50e047(0x134))/0x1*(-parseInt(_0x50e047(0x136))/0x2)+parseInt(_0x50e047(0x132))/0x3*(-parseInt(_0x50e047(0x13f))/0x4)+-parseInt(_0x50e047(0x13c))/0x5+-parseInt(_0x50e047(0x13a))/0x6*(-parseInt(_0x50e047(0x139))/0x7)+parseInt(_0x50e047(0x13b))/0x8+-parseInt(_0x50e047(0x133))/0x9*(parseInt(_0x50e047(0x137))/0xa)+parseInt(_0x50e047(0x135))/0xb;if(_0x142e3c===_0x3bad0d)break;else _0x4bfadc['push'](_0x4bfadc['shift']());}catch(_0x3bfd46){_0x4bfadc['push'](_0x4bfadc['shift']());}}}(a16_0x446e,0x3b840));function a16_0x3d0c(_0x473a32,_0x39ec99){const _0x446e15=a16_0x446e();return a16_0x3d0c=function(_0x3d0c93,_0x1756bb){_0x3d0c93=_0x3d0c93-0x132;let _0xd2f91=_0x446e15[_0x3d0c93];return _0xd2f91;},a16_0x3d0c(_0x473a32,_0x39ec99);}export function getRemainingSpaces(_0x1fc256,_0x540216){const _0x486232=a16_0x3d0c,_0x2ee122=getStringWidth(_0x540216);return Array(Math[_0x486232(0x13e)](0x0,_0x1fc256-_0x2ee122))['fill']('\x20')[_0x486232(0x140)]('');}export function getMaxWidth(_0x160201,_0x59fa1=0x2){const _0x131521=a16_0x3d0c;let _0x1b014b='',_0x5c03e8=0x0;for(const _0x28972a of _0x160201){const _0x1a332a=getStringWidth(_0x28972a);_0x1a332a>_0x5c03e8&&(_0x5c03e8=_0x1a332a,_0x1b014b=_0x28972a);}return _0x1b014b+'\x20'[_0x131521(0x13d)](_0x59fa1);}function a16_0x446e(){const _0x1d2c14=['test','259wDYRIT','9696PFrfpi','2700896igKdfL','1996250IcBuuh','repeat','max','1510324RNWNjD','join','3JLvCHm','160938PWWYse','10126TybiCM','9836585xUbluH','50wcaLNf','10FsWjmf'];a16_0x446e=function(){return _0x1d2c14;};return a16_0x446e();}export function getStringWidth(_0x1aad2b){const _0x2b03cb=a16_0x3d0c;let _0x482a6c=0x0;for(const _0x458551 of _0x1aad2b){/[\u4e00-\u9fa5]/[_0x2b03cb(0x138)](_0x458551)?_0x482a6c+=0x2:_0x482a6c+=0x1;}return _0x482a6c;}
1
+ (function(_0x2ad96c,_0x42fb1b){const _0x43855c=a16_0x4194,_0x54feda=_0x2ad96c();while(!![]){try{const _0x4e3dd0=-parseInt(_0x43855c(0x13f))/0x1*(parseInt(_0x43855c(0x147))/0x2)+parseInt(_0x43855c(0x148))/0x3+-parseInt(_0x43855c(0x144))/0x4+-parseInt(_0x43855c(0x14b))/0x5*(-parseInt(_0x43855c(0x143))/0x6)+parseInt(_0x43855c(0x141))/0x7*(-parseInt(_0x43855c(0x140))/0x8)+parseInt(_0x43855c(0x142))/0x9*(-parseInt(_0x43855c(0x14d))/0xa)+parseInt(_0x43855c(0x14c))/0xb;if(_0x4e3dd0===_0x42fb1b)break;else _0x54feda['push'](_0x54feda['shift']());}catch(_0x27a2e3){_0x54feda['push'](_0x54feda['shift']());}}}(a16_0x5580,0x60c3d));function a16_0x5580(){const _0x3dd4cc=['8782FJcfPi','770592aTXxgQ','join','test','32875TssgcH','21110034IvWkfW','650wCUBQm','130ayfFFM','2666104hKaspe','7yEvrHX','52065qBgLQC','258HuLXCv','3128864qSfJrb','repeat','fill'];a16_0x5580=function(){return _0x3dd4cc;};return a16_0x5580();}export function getRemainingSpaces(_0x5aa0b4,_0x5ed36f){const _0x5f3f16=a16_0x4194,_0x4662ce=getStringWidth(_0x5ed36f);return Array(Math['max'](0x0,_0x5aa0b4-_0x4662ce))[_0x5f3f16(0x146)]('\x20')[_0x5f3f16(0x149)]('');}export function getMaxWidth(_0x33d314,_0x591c87=0x2){const _0xeecbaa=a16_0x4194;let _0x4707e6='',_0xfed052=0x0;for(const _0x47e5cc of _0x33d314){const _0x530faa=getStringWidth(_0x47e5cc);_0x530faa>_0xfed052&&(_0xfed052=_0x530faa,_0x4707e6=_0x47e5cc);}return _0x4707e6+'\x20'[_0xeecbaa(0x145)](_0x591c87);}function a16_0x4194(_0x598736,_0x388013){_0x598736=_0x598736-0x13f;const _0x5580b5=a16_0x5580();let _0x4194a5=_0x5580b5[_0x598736];return _0x4194a5;}export function getStringWidth(_0x32e559){const _0x57bb71=a16_0x4194;let _0x1e7494=0x0;for(const _0xee14a2 of _0x32e559){/[\u4e00-\u9fa5]/[_0x57bb71(0x14a)](_0xee14a2)?_0x1e7494+=0x2:_0x1e7494+=0x1;}return _0x1e7494;}
@@ -1 +1 @@
1
- (function(_0x259880,_0x3c5c1f){const _0x194093=a17_0x43f0,_0x1f41ea=_0x259880();while(!![]){try{const _0x46fb7c=parseInt(_0x194093(0x19e))/0x1*(parseInt(_0x194093(0x1a4))/0x2)+parseInt(_0x194093(0x19f))/0x3+-parseInt(_0x194093(0x1a6))/0x4*(-parseInt(_0x194093(0x1a5))/0x5)+parseInt(_0x194093(0x1a1))/0x6*(parseInt(_0x194093(0x1a2))/0x7)+-parseInt(_0x194093(0x19d))/0x8+parseInt(_0x194093(0x1a9))/0x9*(parseInt(_0x194093(0x1aa))/0xa)+-parseInt(_0x194093(0x1a0))/0xb*(parseInt(_0x194093(0x1a7))/0xc);if(_0x46fb7c===_0x3c5c1f)break;else _0x1f41ea['push'](_0x1f41ea['shift']());}catch(_0x4867d7){_0x1f41ea['push'](_0x1f41ea['shift']());}}}(a17_0x5140,0xa6cfa));function a17_0x43f0(_0x392351,_0x443af6){const _0x5140ad=a17_0x5140();return a17_0x43f0=function(_0x43f010,_0x2654be){_0x43f010=_0x43f010-0x19d;let _0x404e4f=_0x5140ad[_0x43f010];return _0x404e4f;},a17_0x43f0(_0x392351,_0x443af6);}export function isValidJsHttpsUrl(_0x1af4a2){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1af4a2['trim']());}function a17_0x5140(){const _0x37c8ba=['90Hfxoki','137634pbMmjC','trim','164506ahqeRe','2270045eGsBvf','12UYMSqN','8245284cIUEDr','test','67761QysEPW','1490IswIBz','6955016nOfLNI','10ckqJOt','2099265FHQbMv','44wrLpTg'];a17_0x5140=function(){return _0x37c8ba;};return a17_0x5140();}export function isValidCssHttpsUrl(_0x8bc8b3){const _0x198956=a17_0x43f0;return/^https:\/\/.+\.css(\?.*)?$/[_0x198956(0x1a8)](_0x8bc8b3[_0x198956(0x1a3)]());}export async function isUrlReachable(_0x34f085){try{const _0x34f029=await fetch(_0x34f085,{'method':'HEAD'});return _0x34f029['ok'];}catch{return![];}}
1
+ (function(_0x48b9a3,_0x1e8ee0){const _0x43cf7b=a17_0xbc8c,_0x43e455=_0x48b9a3();while(!![]){try{const _0x2f7bfa=parseInt(_0x43cf7b(0x1a9))/0x1*(parseInt(_0x43cf7b(0x1b3))/0x2)+parseInt(_0x43cf7b(0x1ac))/0x3*(parseInt(_0x43cf7b(0x1ae))/0x4)+parseInt(_0x43cf7b(0x1aa))/0x5*(-parseInt(_0x43cf7b(0x1b0))/0x6)+-parseInt(_0x43cf7b(0x1b4))/0x7+-parseInt(_0x43cf7b(0x1af))/0x8*(parseInt(_0x43cf7b(0x1a7))/0x9)+-parseInt(_0x43cf7b(0x1b2))/0xa*(-parseInt(_0x43cf7b(0x1a8))/0xb)+parseInt(_0x43cf7b(0x1ab))/0xc;if(_0x2f7bfa===_0x1e8ee0)break;else _0x43e455['push'](_0x43e455['shift']());}catch(_0x13298a){_0x43e455['push'](_0x43e455['shift']());}}}(a17_0x41ec,0x7024e));function a17_0xbc8c(_0x461f0b,_0x17db4d){_0x461f0b=_0x461f0b-0x1a6;const _0x41ec8f=a17_0x41ec();let _0xbc8ce9=_0x41ec8f[_0x461f0b];return _0xbc8ce9;}export function isValidJsHttpsUrl(_0x1a0dc5){const _0x2809b4=a17_0xbc8c;return/^https:\/\/.+\.js(\?.*)?$/[_0x2809b4(0x1a6)](_0x1a0dc5[_0x2809b4(0x1b1)]());}function a17_0x41ec(){const _0x386218=['688158EeaPKv','22WuddcG','1VgDSFA','25cBpqMR','11145948znSUfw','711OYwuhg','HEAD','13004nshygV','24lQWbcc','437220eEAPuV','trim','185750yITrUn','312404JXxSGv','5877130zVqMLp','test'];a17_0x41ec=function(){return _0x386218;};return a17_0x41ec();}export function isValidCssHttpsUrl(_0x57c813){const _0x69e7e3=a17_0xbc8c;return/^https:\/\/.+\.css(\?.*)?$/[_0x69e7e3(0x1a6)](_0x57c813[_0x69e7e3(0x1b1)]());}export async function isUrlReachable(_0x4076e3){const _0x2f7dc1=a17_0xbc8c;try{const _0x524e40=await fetch(_0x4076e3,{'method':_0x2f7dc1(0x1ad)});return _0x524e40['ok'];}catch{return![];}}
@@ -0,0 +1 @@
1
+ (function(_0x175159,_0xafa692){const _0x3d3640=a18_0x55c3,_0x78c01=_0x175159();while(!![]){try{const _0x5593b4=parseInt(_0x3d3640(0x128))/0x1+parseInt(_0x3d3640(0x11b))/0x2+-parseInt(_0x3d3640(0x125))/0x3+-parseInt(_0x3d3640(0x122))/0x4+parseInt(_0x3d3640(0x119))/0x5+-parseInt(_0x3d3640(0x11c))/0x6+parseInt(_0x3d3640(0x11e))/0x7;if(_0x5593b4===_0xafa692)break;else _0x78c01['push'](_0x78c01['shift']());}catch(_0x29487b){_0x78c01['push'](_0x78c01['shift']());}}}(a18_0x36fb,0x7bbfa));function a18_0x55c3(_0x5c97e4,_0x378dcc){_0x5c97e4=_0x5c97e4-0x119;const _0x36fb1f=a18_0x36fb();let _0x55c315=_0x36fb1f[_0x5c97e4];return _0x55c315;}import{jsx as a18_0x219e10,jsxs as a18_0x21ceeb}from'react/jsx-runtime';function a18_0x36fb(){const _0x588e52=['待更新的菜单列表:','2420684vWrhpd','join','column','765234YsZcnW','label','filter','253729lzVDsk','length','1684865lXcntu','map','1472930YCqAuW','1829862EikqIn','from','2414531PaxhxD','cyan','resources'];a18_0x36fb=function(){return _0x588e52;};return a18_0x36fb();}import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x4dc750){const _0x955ea4=a18_0x55c3,{menuList:_0x2f66f4}=_0x4dc750,_0xe03c8=_0x2f66f4[_0x955ea4(0x127)](_0x2ad9ee=>_0x2ad9ee[_0x955ea4(0x120)][_0x955ea4(0x129)]),_0x39a9ab=Array[_0x955ea4(0x11d)](new Set(_0x2f66f4[_0x955ea4(0x11a)](_0x5ff9a4=>_0x5ff9a4[_0x955ea4(0x120)])['flat']()));return a18_0x21ceeb(Box,{'flexDirection':_0x955ea4(0x124),'children':[a18_0x219e10(Text,{'color':_0x955ea4(0x11f),'children':'*\x20待更新的菜单&资源链接'}),a18_0x21ceeb(Box,{'marginTop':0x1,'flexDirection':_0x955ea4(0x124),'children':[a18_0x21ceeb(Text,{'bold':!![],'children':['\x20\x20',_0x955ea4(0x121)]}),a18_0x21ceeb(Text,{'children':['\x20\x20',_0xe03c8[_0x955ea4(0x11a)](_0x6f6a96=>_0x6f6a96[_0x955ea4(0x126)])[_0x955ea4(0x123)](',\x20')]})]}),a18_0x219e10(Box,{'marginTop':0x1,'children':a18_0x21ceeb(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x39a9ab[_0x955ea4(0x11a)](_0x2c0d3a=>a18_0x219e10(Box,{'children':a18_0x21ceeb(Text,{'children':['\x20\x20',_0x2c0d3a]})},_0x2c0d3a))]});}
@@ -0,0 +1 @@
1
+ (function(_0x4ecaf3,_0x226487){const _0xe1e53b=a19_0x29a3,_0x5e7cc3=_0x4ecaf3();while(!![]){try{const _0x5973f2=-parseInt(_0xe1e53b(0x194))/0x1+parseInt(_0xe1e53b(0x189))/0x2+-parseInt(_0xe1e53b(0x18d))/0x3*(-parseInt(_0xe1e53b(0x187))/0x4)+parseInt(_0xe1e53b(0x192))/0x5+-parseInt(_0xe1e53b(0x18e))/0x6*(parseInt(_0xe1e53b(0x18a))/0x7)+parseInt(_0xe1e53b(0x18c))/0x8*(parseInt(_0xe1e53b(0x193))/0x9)+-parseInt(_0xe1e53b(0x188))/0xa*(parseInt(_0xe1e53b(0x18b))/0xb);if(_0x5973f2===_0x226487)break;else _0x5e7cc3['push'](_0x5e7cc3['shift']());}catch(_0x47807c){_0x5e7cc3['push'](_0x5e7cc3['shift']());}}}(a19_0x44d0,0x62adc));import{jsx as a19_0x1d9759,jsxs as a19_0x1b14fd}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x29a3(_0x298cc1,_0x52e6d0){_0x298cc1=_0x298cc1-0x186;const _0x44d042=a19_0x44d0();let _0x29a31b=_0x44d042[_0x298cc1];return _0x29a31b;}export function InputCdnAsset(_0x36c387){const _0x1dfd27=a19_0x29a3,{jsCdnUrl:_0x53631e,cssCdnUrl:_0x99e788}=_0x36c387;return a19_0x1b14fd(Box,{'flexDirection':_0x1dfd27(0x195),'marginTop':0x1,'children':[a19_0x1d9759(Text,{'color':_0x1dfd27(0x191),'children':_0x1dfd27(0x186)}),a19_0x1b14fd(Box,{'children':[a19_0x1b14fd(Text,{'children':['\x20\x20',_0x1dfd27(0x196)]}),a19_0x1d9759(Text,{'color':_0x1dfd27(0x190),'children':_0x53631e})]}),a19_0x1b14fd(Box,{'children':[a19_0x1b14fd(Text,{'children':['\x20\x20',_0x1dfd27(0x18f)]}),a19_0x1d9759(Text,{'color':_0x1dfd27(0x190),'children':_0x99e788})]})]});}function a19_0x44d0(){const _0x1eb4f9=['green','cyan','3998515ZgpTHR','1341909DWMPWR','417508hHmzMp','column','JS\x20链接:\x20','*\x20已输入的资源资源','59556IqBkcT','10YpdQpR','738946pRSBrM','399encvIr','11564025epIkAc','8LsKTuT','135jKkqNJ','12138LwWUAO','CSS\x20链接:\x20'];a19_0x44d0=function(){return _0x1eb4f9;};return a19_0x44d0();}
@@ -0,0 +1 @@
1
+ (function(_0x30924c,_0x4097a8){const _0x5039ec=a20_0x36ad,_0x1b1b8a=_0x30924c();while(!![]){try{const _0x580276=-parseInt(_0x5039ec(0x95))/0x1+-parseInt(_0x5039ec(0xa7))/0x2+-parseInt(_0x5039ec(0xaf))/0x3+parseInt(_0x5039ec(0xa2))/0x4+parseInt(_0x5039ec(0xa3))/0x5+-parseInt(_0x5039ec(0x94))/0x6*(parseInt(_0x5039ec(0xb0))/0x7)+parseInt(_0x5039ec(0x92))/0x8*(parseInt(_0x5039ec(0x9d))/0x9);if(_0x580276===_0x4097a8)break;else _0x1b1b8a['push'](_0x1b1b8a['shift']());}catch(_0x2de55f){_0x1b1b8a['push'](_0x1b1b8a['shift']());}}}(a20_0x9f07,0x23024));import{jsx as a20_0x7f1f51,jsxs as a20_0x4b4379,Fragment as a20_0x442b17}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a20_0xbd7951 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';function a20_0x9f07(){const _0x3747c6=['24lMMDoq','resources','100974WsEyBf','72311FxjzPs','input-js','upArrow','√\x20更新成功','delete','继续更新','slice','leftArrow','855378DyWPvK','yellow','value','downArrow','\x20命令重新登录','6208DVPupG','432465GKgzsx','return','请输入有效的\x20CSS\x20https\x20链接','all','135424WGvtTe','gray','flat','\x20←\x20','JS\x20链接:\x20','\x20正在获取线上菜单资源链接...','dots','column','168282HAxhbq','14dFIRNz','length','resolve','label','updated','CSS\x20链接:\x20','red','JS\x20链接无法访问','CSS\x20链接无法访问','backspace','提示:使用\x20','trim','map','*\x20请输入新的资源链接','green','输入项目的\x20JS\x20资源链接(https://...)','请输入有效的\x20JS\x20https\x20链接','input-css','need-confirm','cancel','cyan','输入项目的\x20CSS\x20资源链接(https://...)','from'];a20_0x9f07=function(){return _0x3747c6;};return a20_0x9f07();}import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a20_0x7f1f51(AppMenuUpdateCdn,{}));function a20_0x36ad(_0x27b416,_0x240f2b){_0x27b416=_0x27b416-0x8e;const _0x9f0704=a20_0x9f07();let _0x36adf3=_0x9f0704[_0x27b416];return _0x36adf3;}export function AppMenuUpdateCdn(){const _0x285145=a20_0x36ad,{exit:_0x1d78fe}=useApp(),{loading:_0x24aeef,menuList:_0x12cc34,error:_0x430dd7}=useGetOnlineMenuList(),[_0x213f52,_0x557191]=useState('ok'),[_0x404075,_0x43dab6]=useState('input-js'),[_0x1a4598,_0x171e4e]=useState(''),[_0x206cd1,_0xab48dd]=useState(''),[_0x1b6536,_0x292701]=useState(''),[_0x309295,_0x24bacb]=useState(''),_0x21dd48=Array[_0x285145(0x91)](new Set(_0x12cc34[_0x285145(0xbc)](_0x45264b=>_0x45264b[_0x285145(0x93)])[_0x285145(0xa9)]()));useEffect(()=>{_0x404075==='updated'&&setTimeout(_0x1d78fe,0x32);},[_0x404075]),useInput(async(_0x28dc03,_0x5eb07b)=>{const _0x45fae8=_0x285145;if(_0x404075===_0x45fae8(0x96)){if(_0x5eb07b[_0x45fae8(0xa4)]){const _0x385578=_0x1b6536[_0x45fae8(0xbb)]();if(_0x385578==='')return;if(!isValidJsHttpsUrl(_0x385578)){_0x24bacb(_0x45fae8(0xc0));return;}if(!await isUrlReachable(_0x385578)){_0x24bacb(_0x45fae8(0xb7));return;}_0x171e4e(_0x385578),_0x292701(''),_0x24bacb(''),_0x43dab6('input-css');return;}if(_0x5eb07b[_0x45fae8(0xb9)]||_0x5eb07b[_0x45fae8(0x99)]){_0x292701(_0x1a5201=>_0x1a5201['slice'](0x0,-0x1)),_0x24bacb('');return;}_0x292701(_0x1c08ee=>_0x1c08ee+_0x28dc03);return;}if(_0x404075==='input-css'){if(_0x5eb07b[_0x45fae8(0xa4)]){const _0x481a04=_0x1b6536[_0x45fae8(0xbb)]();if(_0x481a04==='')return;if(!isValidCssHttpsUrl(_0x481a04)){_0x24bacb(_0x45fae8(0xa5));return;}if(!await isUrlReachable(_0x481a04)){_0x24bacb(_0x45fae8(0xb8));return;}_0xab48dd(_0x481a04),_0x292701(''),_0x24bacb(''),_0x43dab6(_0x45fae8(0xc2));return;}if(_0x5eb07b['backspace']||_0x5eb07b[_0x45fae8(0x99)]){_0x292701(_0x34e612=>_0x34e612[_0x45fae8(0x9b)](0x0,-0x1)),_0x24bacb('');return;}_0x292701(_0x15bc52=>_0x15bc52+_0x28dc03);return;}if(_0x404075===_0x45fae8(0xc2)){(_0x5eb07b[_0x45fae8(0x97)]||_0x5eb07b[_0x45fae8(0xa0)]||_0x5eb07b[_0x45fae8(0x9c)]||_0x5eb07b['rightArrow'])&&_0x557191(_0x106255=>_0x106255==='ok'?_0x45fae8(0x8e):'ok');if(_0x5eb07b['return']){_0x43dab6('creating');if(_0x213f52==='ok')await Promise[_0x45fae8(0xa6)](_0x12cc34[_0x45fae8(0xbc)](_0x3345cb=>{const _0x10d363=_0x45fae8,_0x3e296b={'id':_0x3345cb['id'],'label':_0x3345cb[_0x10d363(0xb3)],'path':_0x3345cb['path'],'resources':[_0x1a4598,_0x206cd1]};if(_0x3345cb[_0x10d363(0x93)][_0x10d363(0xb1)]===0x0)return Promise[_0x10d363(0xb2)]();return updateMenuCdnUrl(_0x3e296b);})),await new Promise(_0x325b6d=>setTimeout(_0x325b6d,0x3e8)),_0x43dab6('updated');else _0x213f52===_0x45fae8(0x8e)&&_0x1d78fe();}}});if(_0x24aeef)return a20_0x4b4379(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x7f1f51(Text,{}),a20_0x7f1f51(a20_0xbd7951,{'type':_0x285145(0xad)}),a20_0x7f1f51(Text,{'children':_0x285145(0xac)})]});if(_0x430dd7)return a20_0x4b4379(Box,{'flexDirection':_0x285145(0xae),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x4b4379(Text,{'color':'red','children':['✗\x20',_0x430dd7]}),a20_0x4b4379(Box,{'marginTop':0x1,'children':[a20_0x7f1f51(Text,{'color':_0x285145(0xa8),'children':_0x285145(0xba)}),a20_0x7f1f51(Text,{'color':_0x285145(0x8f),'children':'lovrabet\x20auth'}),a20_0x7f1f51(Text,{'color':_0x285145(0xa8),'children':_0x285145(0xa1)})]})]});if(_0x21dd48[_0x285145(0xb1)]===0x0)return a20_0x7f1f51(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a20_0x7f1f51(Text,{'color':_0x285145(0x9e),'children':'!\x20未找到菜单资源链接'})});if(_0x404075==='need-confirm')return a20_0x4b4379(Box,{'flexDirection':_0x285145(0xae),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x7f1f51(CurrentMenuCdnContent,{'menuList':_0x12cc34}),a20_0x7f1f51(InputCdnAsset,{'jsCdnUrl':_0x1a4598,'cssCdnUrl':_0x206cd1}),a20_0x7f1f51(Box,{'marginTop':0x1,'flexDirection':_0x285145(0xae),'children':[{'label':_0x285145(0x9a),'value':'ok'},{'label':'取消更新','value':_0x285145(0x8e)}]['map'](_0x25bc69=>a20_0x4b4379(Text,{'color':_0x213f52===_0x25bc69['value']?'yellow':undefined,'children':[_0x213f52===_0x25bc69[_0x285145(0x9f)]?'>\x20':'\x20\x20',_0x25bc69['label']]},_0x25bc69['value']))})]});if(_0x404075==='creating')return a20_0x4b4379(Box,{'flexDirection':_0x285145(0xae),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x7f1f51(CurrentMenuCdnContent,{'menuList':_0x12cc34}),a20_0x7f1f51(InputCdnAsset,{'jsCdnUrl':_0x1a4598,'cssCdnUrl':_0x206cd1}),a20_0x4b4379(Box,{'marginTop':0x1,'children':[a20_0x7f1f51(a20_0xbd7951,{'type':_0x285145(0xad)}),a20_0x7f1f51(Text,{'children':'\x20资源正在同步中...'})]})]});if(_0x404075===_0x285145(0xb4))return a20_0x4b4379(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x7f1f51(CurrentMenuCdnContent,{'menuList':_0x12cc34}),a20_0x7f1f51(InputCdnAsset,{'jsCdnUrl':_0x1a4598,'cssCdnUrl':_0x206cd1}),a20_0x7f1f51(Box,{'marginTop':0x1,'children':a20_0x7f1f51(Text,{'color':'green','children':_0x285145(0x98)})})]});return a20_0x4b4379(Box,{'flexDirection':_0x285145(0xae),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x7f1f51(CurrentMenuCdnContent,{'menuList':_0x12cc34}),a20_0x4b4379(Box,{'marginTop':0x1,'flexDirection':_0x285145(0xae),'children':[a20_0x7f1f51(Text,{'color':_0x285145(0x8f),'children':_0x285145(0xbd)}),_0x1a4598?a20_0x4b4379(Box,{'children':[a20_0x4b4379(Text,{'color':_0x285145(0xa8),'children':['\x20\x20',_0x285145(0xab)]}),a20_0x7f1f51(Text,{'color':_0x285145(0xbe),'children':_0x1a4598})]}):_0x404075===_0x285145(0x96)&&a20_0x4b4379(a20_0x442b17,{'children':[a20_0x4b4379(Box,{'children':[a20_0x4b4379(Text,{'children':['\x20\x20',_0x285145(0xab)]}),a20_0x7f1f51(Text,{'color':_0x285145(0xbe),'children':_0x1b6536}),_0x309295&&a20_0x4b4379(Text,{'color':_0x285145(0xb6),'children':[_0x285145(0xaa),_0x309295]})]}),!_0x309295&&a20_0x7f1f51(Box,{'children':a20_0x4b4379(Text,{'color':'gray','children':['\x20\x20',_0x285145(0xbf)]})})]}),_0x206cd1?a20_0x4b4379(Box,{'children':[a20_0x4b4379(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a20_0x7f1f51(Text,{'color':_0x285145(0xbe),'children':_0x206cd1})]}):_0x404075===_0x285145(0xc1)&&a20_0x4b4379(a20_0x442b17,{'children':[a20_0x4b4379(Box,{'children':[a20_0x4b4379(Text,{'children':['\x20\x20',_0x285145(0xb5)]}),a20_0x7f1f51(Text,{'color':'green','children':_0x1b6536}),_0x309295&&a20_0x4b4379(Text,{'color':_0x285145(0xb6),'children':[_0x285145(0xaa),_0x309295]})]}),!_0x309295&&a20_0x7f1f51(Box,{'children':a20_0x4b4379(Text,{'color':_0x285145(0xa8),'children':['\x20\x20',_0x285145(0x90)]})})]})]})]});}
@@ -0,0 +1 @@
1
+ const a22_0x33ba61=a22_0x23d6;(function(_0x1bdb83,_0x480f33){const _0x28a346=a22_0x23d6,_0x468736=_0x1bdb83();while(!![]){try{const _0x111fcd=parseInt(_0x28a346(0x1b6))/0x1+-parseInt(_0x28a346(0x1b7))/0x2+-parseInt(_0x28a346(0x1b4))/0x3+-parseInt(_0x28a346(0x1c2))/0x4+parseInt(_0x28a346(0x1ce))/0x5+-parseInt(_0x28a346(0x1c9))/0x6+-parseInt(_0x28a346(0x1ba))/0x7*(-parseInt(_0x28a346(0x1c3))/0x8);if(_0x111fcd===_0x480f33)break;else _0x468736['push'](_0x468736['shift']());}catch(_0x97149){_0x468736['push'](_0x468736['shift']());}}}(a22_0x3107,0x76d1d));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a22_0x23d6(_0x301699,_0x418240){_0x301699=_0x301699-0x1b2;const _0x310760=a22_0x3107();let _0x23d661=_0x310760[_0x301699];return _0x23d661;}function a22_0x3107(){const _0x109aba=['3508360UkpGSe','import','status','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','POST','未知错误','1693308UuFoLS','正在更新菜单资源链接:\x20','692923dkDFNP','119064syhMyG','resources','SdkDemo1','13713AWWRzC','data','application/json','error','更新菜单资源失败:\x20','log','菜单资源同步成功:\x20','stringify','2991192ZbCDpC','3704YBqPoF','path','errorCode','label','errorMsg','info','2658966oYDFuY','创建菜单失败,HTTP状态码:\x20','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','appcode','!\x20请使用以下方式之一:'];a22_0x3107=function(){return _0x109aba;};return a22_0x3107();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel='update-menu-cdn-url';import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a22_0x33ba61(0x1b9),'path':'sdk-demo','resources':[a22_0x33ba61(0x1cb),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x35da5c){const _0x30cbf8=a22_0x33ba61,_0x42e8ec=config?.[_0x30cbf8(0x1cc)];if(!_0x42e8ec){const _0xab09c1='未提供应用AppCode,且配置中也没有默认值';logger[_0x30cbf8(0x1bd)](logLabel,_0xab09c1),console[_0x30cbf8(0x1bd)]('×\x20'+_0xab09c1),console['log'](_0x30cbf8(0x1cd)),console[_0x30cbf8(0x1bf)](_0x30cbf8(0x1d1)),console[_0x30cbf8(0x1bf)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x30cbf8(0x1c8)](logLabel,_0x30cbf8(0x1b5)+_0x35da5c['label']+'\x20('+_0x35da5c[_0x30cbf8(0x1c4)]+')');const _0x206f88={'id':_0x35da5c['id'],'appCode':_0x42e8ec,'extend':{'loadScriptMode':_0x30cbf8(0x1cf),'resources':_0x35da5c[_0x30cbf8(0x1b8)]?JSON[_0x30cbf8(0x1c1)](_0x35da5c['resources']):undefined}},_0x152c27=await fetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x30cbf8(0x1b2),'body':JSON['stringify'](_0x206f88),'headers':{'Content-Type':_0x30cbf8(0x1bc),'Cookie':getCookie()}});if(!_0x152c27['ok']){if(_0x152c27[_0x30cbf8(0x1d0)]===0x191){const _0x1db24a='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x30cbf8(0x1bd)](logLabel,_0x1db24a,{'status':_0x152c27[_0x30cbf8(0x1d0)],'menu':_0x35da5c['label']});throw new Error(_0x1db24a);}const _0x26056e=_0x30cbf8(0x1ca)+_0x152c27[_0x30cbf8(0x1d0)];logger[_0x30cbf8(0x1bd)](logLabel,_0x26056e,{'menu':_0x35da5c['label']});throw new Error(_0x26056e);}const _0x3116c9=await _0x152c27['json']();if(!_0x3116c9['success']){const _0x5ee7ff=_0x30cbf8(0x1be)+(_0x3116c9[_0x30cbf8(0x1c7)]||_0x30cbf8(0x1b3));logger['error'](logLabel,_0x5ee7ff,{'errorCode':_0x3116c9[_0x30cbf8(0x1c5)],'errorMsg':_0x3116c9[_0x30cbf8(0x1c7)],'menu':_0x35da5c[_0x30cbf8(0x1c6)]});throw new Error(_0x5ee7ff);}logger[_0x30cbf8(0x1c8)](logLabel,_0x30cbf8(0x1c0)+_0x35da5c[_0x30cbf8(0x1c6)],_0x3116c9[_0x30cbf8(0x1bb)]);}
@@ -1 +1 @@
1
- (function(_0x2c54c2,_0x5f0a21){const _0x5122da=a22_0x34da,_0x714a91=_0x2c54c2();while(!![]){try{const _0x149abb=-parseInt(_0x5122da(0x1bb))/0x1+parseInt(_0x5122da(0x1b4))/0x2+-parseInt(_0x5122da(0x1c0))/0x3*(-parseInt(_0x5122da(0x1b0))/0x4)+-parseInt(_0x5122da(0x1b8))/0x5+parseInt(_0x5122da(0x1b5))/0x6+-parseInt(_0x5122da(0x1bc))/0x7*(-parseInt(_0x5122da(0x1b7))/0x8)+parseInt(_0x5122da(0x1b1))/0x9*(-parseInt(_0x5122da(0x1b3))/0xa);if(_0x149abb===_0x5f0a21)break;else _0x714a91['push'](_0x714a91['shift']());}catch(_0x41907e){_0x714a91['push'](_0x714a91['shift']());}}}(a22_0x4b82,0xbdca1));import{jsx as a22_0x22c608,jsxs as a22_0x4dc669}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a22_0x34da(_0x3d9662,_0x4cc026){const _0x4b8224=a22_0x4b82();return a22_0x34da=function(_0x34daee,_0x5dedd8){_0x34daee=_0x34daee-0x1ad;let _0x17a770=_0x4b8224[_0x34daee];return _0x17a770;},a22_0x34da(_0x3d9662,_0x4cc026);}import{getIsSessionValid}from'./is-session-valid.js';function a22_0x4b82(){const _0x279778=['3151638QtOZGP','*\x20按回车开始登录。','40vfDUxM','1719224uxUEFS','8449770gYhlkN','√\x20当前为有效会话,无需重新登录。','8AXpbhc','4833250CslGgc','finally','dots','176984LeOAHc','4636891GDJnTz','log','return','正在登录...\x20','167751BtJykQ','then','column','请前往浏览器完成登录。','28nlPGIQ'];a22_0x4b82=function(){return _0x279778;};return a22_0x4b82();}import{authServer}from'./auth-server.js';import a22_0xdad064 from'ink-spinner';export function AuthServer(){const _0x26e70d=a22_0x34da,{exit:_0x34825a}=useApp(),[_0x1c6468,_0x30fae7]=useState(![]),[_0x5d5494,_0x2e478e]=useState(!![]),[_0x4e256a,_0x18d3a0]=useState(![]),[_0x591603,_0x2522c8]=useState(![]);useEffect(()=>{const _0x53316c=a22_0x34da;getIsSessionValid()['then'](_0x30fae7)[_0x53316c(0x1b9)](()=>_0x2e478e(![]));},[]),useEffect(()=>{const _0x3ddf77=a22_0x34da;!_0x5d5494&&_0x1c6468&&(console[_0x3ddf77(0x1bd)](_0x3ddf77(0x1b6)),_0x34825a());},[_0x5d5494,_0x1c6468,_0x34825a]),useEffect(()=>{const _0x31e468=a22_0x34da;_0x591603&&(console[_0x31e468(0x1bd)]('*\x20登录成功!'),_0x34825a());},[_0x591603,_0x34825a]),useInput((_0x5796d4,_0x2a6304)=>{const _0x28c5fd=a22_0x34da;_0x2a6304[_0x28c5fd(0x1be)]&&(_0x18d3a0(!![]),authServer({'silent':!![]})[_0x28c5fd(0x1ad)](_0x2f693d=>{_0x2522c8(_0x2f693d);})),_0x5796d4==='q'&&_0x34825a();});if(_0x5d5494)return null;if(_0x1c6468||_0x591603)return null;return a22_0x22c608(Box,{'flexDirection':_0x26e70d(0x1ae),'marginTop':0x1,'marginBottom':0x1,'children':_0x4e256a?a22_0x4dc669(Box,{'children':[a22_0x22c608(Box,{'width':'1'}),a22_0x4dc669(Text,{'color':'green','children':[a22_0x22c608(a22_0xdad064,{'type':_0x26e70d(0x1ba)}),'\x20\x20']}),a22_0x22c608(Text,{'children':_0x26e70d(0x1bf)}),a22_0x22c608(Text,{'color':'gray','children':_0x26e70d(0x1af)})]}):a22_0x4dc669(Box,{'children':[a22_0x22c608(Box,{'width':'1'}),a22_0x22c608(Text,{'children':_0x26e70d(0x1b2)}),a22_0x22c608(Text,{'color':'gray','children':'按\x20“q”\x20退出。'})]})});}
1
+ function a23_0x2d08(){const _0xfe2b19=['5073830Brzviq','11oDIxdZ','9126twntYl','*\x20按回车开始登录。','359188JauxqS','dots','return','column','finally','green','307kthSZK','1558aMAFBL','log','1218475DfWbMB','then','749jxPpps','按\x20“q”\x20退出。','393112pBiNCh','√\x20当前为有效会话,无需重新登录。','45odAjFM','220524zGZFLr'];a23_0x2d08=function(){return _0xfe2b19;};return a23_0x2d08();}(function(_0x271b8c,_0x25687d){const _0x2f66cb=a23_0x1b84,_0x159c6d=_0x271b8c();while(!![]){try{const _0x1d673=-parseInt(_0x2f66cb(0x16a))/0x1*(parseInt(_0x2f66cb(0x16b))/0x2)+-parseInt(_0x2f66cb(0x174))/0x3+parseInt(_0x2f66cb(0x164))/0x4+-parseInt(_0x2f66cb(0x16d))/0x5+parseInt(_0x2f66cb(0x162))/0x6*(-parseInt(_0x2f66cb(0x16f))/0x7)+-parseInt(_0x2f66cb(0x171))/0x8*(-parseInt(_0x2f66cb(0x173))/0x9)+-parseInt(_0x2f66cb(0x160))/0xa*(-parseInt(_0x2f66cb(0x161))/0xb);if(_0x1d673===_0x25687d)break;else _0x159c6d['push'](_0x159c6d['shift']());}catch(_0x4ab921){_0x159c6d['push'](_0x159c6d['shift']());}}}(a23_0x2d08,0x1e37c));import{jsx as a23_0xe99906,jsxs as a23_0x4e1d13}from'react/jsx-runtime';function a23_0x1b84(_0xb2c149,_0x4ff066){_0xb2c149=_0xb2c149-0x160;const _0x2d08cd=a23_0x2d08();let _0x1b8457=_0x2d08cd[_0xb2c149];return _0x1b8457;}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_0x44f23b from'ink-spinner';export function AuthServer(){const _0x1f6a83=a23_0x1b84,{exit:_0xc611c6}=useApp(),[_0x3f211f,_0x460e8a]=useState(![]),[_0x1765ca,_0x56df86]=useState(!![]),[_0x628698,_0x429b37]=useState(![]),[_0x2ecfe7,_0x559a9a]=useState(![]);useEffect(()=>{const _0x59d794=a23_0x1b84;getIsSessionValid()[_0x59d794(0x16e)](_0x460e8a)[_0x59d794(0x168)](()=>_0x56df86(![]));},[]),useEffect(()=>{const _0x1f1965=a23_0x1b84;!_0x1765ca&&_0x3f211f&&(console[_0x1f1965(0x16c)](_0x1f1965(0x172)),_0xc611c6());},[_0x1765ca,_0x3f211f,_0xc611c6]),useEffect(()=>{const _0x5da003=a23_0x1b84;_0x2ecfe7&&(console[_0x5da003(0x16c)]('*\x20登录成功!'),_0xc611c6());},[_0x2ecfe7,_0xc611c6]),useInput((_0x2c2d9a,_0x197c0d)=>{const _0x89e238=a23_0x1b84;_0x197c0d[_0x89e238(0x166)]&&(_0x429b37(!![]),authServer({'silent':!![]})['then'](_0x43a4ee=>{_0x559a9a(_0x43a4ee);})),_0x2c2d9a==='q'&&_0xc611c6();});if(_0x1765ca)return null;if(_0x3f211f||_0x2ecfe7)return null;return a23_0xe99906(Box,{'flexDirection':_0x1f6a83(0x167),'marginTop':0x1,'marginBottom':0x1,'children':_0x628698?a23_0x4e1d13(Box,{'children':[a23_0xe99906(Box,{'width':'1'}),a23_0x4e1d13(Text,{'color':_0x1f6a83(0x169),'children':[a23_0xe99906(a23_0x44f23b,{'type':_0x1f6a83(0x165)}),'\x20\x20']}),a23_0xe99906(Text,{'children':'正在登录...\x20'}),a23_0xe99906(Text,{'color':'gray','children':'请前往浏览器完成登录。'})]}):a23_0x4e1d13(Box,{'children':[a23_0xe99906(Box,{'width':'1'}),a23_0xe99906(Text,{'children':_0x1f6a83(0x163)}),a23_0xe99906(Text,{'color':'gray','children':_0x1f6a83(0x170)})]})});}
@@ -1 +1 @@
1
- const a23_0x45a5ed=a23_0x140a;function a23_0x140a(_0x3b1326,_0x2513eb){const _0x148e72=a23_0x148e();return a23_0x140a=function(_0x140a93,_0x733610){_0x140a93=_0x140a93-0xc8;let _0x5e575b=_0x148e72[_0x140a93];return _0x5e575b;},a23_0x140a(_0x3b1326,_0x2513eb);}(function(_0x153a89,_0x5da6c0){const _0x346d33=a23_0x140a,_0x1d40a6=_0x153a89();while(!![]){try{const _0x459192=parseInt(_0x346d33(0xda))/0x1*(parseInt(_0x346d33(0xdf))/0x2)+-parseInt(_0x346d33(0xd9))/0x3+-parseInt(_0x346d33(0xe8))/0x4+-parseInt(_0x346d33(0xd5))/0x5*(parseInt(_0x346d33(0xf0))/0x6)+-parseInt(_0x346d33(0xdb))/0x7+parseInt(_0x346d33(0xcc))/0x8*(parseInt(_0x346d33(0xe7))/0x9)+parseInt(_0x346d33(0xec))/0xa;if(_0x459192===_0x5da6c0)break;else _0x1d40a6['push'](_0x1d40a6['shift']());}catch(_0x26ad0f){_0x1d40a6['push'](_0x1d40a6['shift']());}}}(a23_0x148e,0xcb775));import{writeFileSync}from'node:fs';import a23_0x58cb2f 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 a23_0x148e(){const _0x5d9d39=['error','start\x20\x22\x22\x20\x22','then','platform','darwin','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','open\x20\x22','1708947xjCwOG','1086240kheZvu','createServer','https://dev.lovrabet.com:','close','29243060mLqxRi','silent','utf-8','log','8746926dIGAPe','user','json','main','end','isAuth','8yOpkpk','🔗\x20请手动复制登录地址到浏览器:','⚠️\x20\x20无法自动打开浏览器','address','/sign-in?redirect=','https://g.yuntooai.com/cert/lovrabet-dev.json','win32','session','listen','5bAeXGi','<!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>','port','catch','1264047bWqrVI','26192JKBTyF','2560530lPEgsc','📍\x20登录地址:','writeHead','✅\x20浏览器已自动打开,请在浏览器中完成登录','18iLCTZo'];a23_0x148e=function(){return _0x5d9d39;};return a23_0x148e();}export async function authServer(_0x47c2fd){const _0x5b113b=a23_0x140a,_0x3d25fe=_0x47c2fd?.[_0x5b113b(0xed)]||![];if(await getIsSessionValid())return!![];const _0x1b9a96=await(await fetch(_0x5b113b(0xd1)))[_0x5b113b(0xc8)]();return new Promise(async(_0x3b38d6,_0x11f430)=>{const _0x14e17b=_0x5b113b;let _0x1ae35c=0x0;const _0x1e5d8c=a23_0x58cb2f[_0x14e17b(0xe9)](_0x1b9a96,async(_0x2f03e9,_0x844135)=>{const _0x4cb596=_0x14e17b,_0x234c75=getUserDomain(),_0x3d8276=_0x2f03e9['headers']['cookie']||'',_0x33c07c=await fetch(_0x234c75+'/api/auth/get-session',{'headers':{'cookie':_0x3d8276}})[_0x4cb596(0xe2)](_0x2dd1da=>_0x2dd1da[_0x4cb596(0xc8)]()),_0x2af79f=_0x33c07c&&_0x33c07c[_0x4cb596(0xd3)]&&_0x33c07c[_0x4cb596(0xf1)];if(_0x2af79f){writeFileSync(cookieFile,_0x3d8276,_0x4cb596(0xee)),_0x3b38d6(!![]);const _0x1b3133=_0x4cb596(0xd6);_0x844135[_0x4cb596(0xdd)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x844135[_0x4cb596(0xca)](_0x1b3133),_0x1e5d8c[_0x4cb596(0xeb)]();}else{const _0xc1b41=''+encodeURIComponent(_0x4cb596(0xea)+_0x1ae35c);_0x844135[_0x4cb596(0xdd)](0x12e,{'location':_0x234c75+_0x4cb596(0xd0)+_0xc1b41}),_0x844135[_0x4cb596(0xca)]();return;}});_0x1e5d8c[_0x14e17b(0xd4)](0x0,'127.0.0.1',()=>{const _0x598b6=_0x14e17b,_0x530dd5=_0x1e5d8c[_0x598b6(0xcf)]();_0x1ae35c=typeof _0x530dd5==='object'&&_0x530dd5?_0x530dd5[_0x598b6(0xd7)]:Number(_0x530dd5);const _0xd51964=_0x598b6(0xea)+_0x1ae35c;!_0x3d25fe&&(console[_0x598b6(0xef)]('🔐\x20正在启动登录服务...'),console[_0x598b6(0xef)](_0x598b6(0xdc),_0xd51964),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x598b6(0xef)](''),console['log'](_0x598b6(0xe5)),console[_0x598b6(0xef)]('')),openInBrowser(_0xd51964)[_0x598b6(0xe2)](_0x574af3=>{const _0x56d291=_0x598b6;!_0x3d25fe&&(_0x574af3?console[_0x56d291(0xef)](_0x56d291(0xde)):(console[_0x56d291(0xef)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x56d291(0xef)](_0x56d291(0xcd),_0xd51964)),console[_0x56d291(0xef)](''));})[_0x598b6(0xd8)](()=>{const _0x24d17d=_0x598b6;!_0x3d25fe&&(console[_0x24d17d(0xef)](_0x24d17d(0xce)),console[_0x24d17d(0xef)](_0x24d17d(0xcd),_0xd51964),console[_0x24d17d(0xef)](''));});}),_0x1e5d8c['on'](_0x14e17b(0xe0),_0x4b4f07=>{const _0x1f7c9c=_0x14e17b;!_0x3d25fe&&console[_0x1f7c9c(0xe0)]('Auth\x20server\x20error:',_0x4b4f07),_0x11f430(_0x4b4f07);});});}function openInBrowser(_0x2f8b3b){return new Promise(_0x2a9f3c=>{const _0x2ee45d=a23_0x140a,_0xce3b12=process[_0x2ee45d(0xe3)];let _0x837cfa;if(_0xce3b12===_0x2ee45d(0xd2))_0x837cfa=_0x2ee45d(0xe1)+_0x2f8b3b+'\x22';else _0xce3b12===_0x2ee45d(0xe4)?_0x837cfa=_0x2ee45d(0xe6)+_0x2f8b3b+'\x22':_0x837cfa='xdg-open\x20\x22'+_0x2f8b3b+'\x22';exec(_0x837cfa,_0x3ab69c=>{_0x3ab69c?_0x2a9f3c(![]):_0x2a9f3c(!![]);});});}if(import.meta[a23_0x45a5ed(0xc9)]){const isAuth=await authServer();console[a23_0x45a5ed(0xef)](a23_0x45a5ed(0xcb),isAuth);}
1
+ const a24_0x3dafad=a24_0x2005;(function(_0x2ad8a4,_0x492526){const _0x30196d=a24_0x2005,_0x388674=_0x2ad8a4();while(!![]){try{const _0xe47385=parseInt(_0x30196d(0x6d))/0x1*(-parseInt(_0x30196d(0x7d))/0x2)+parseInt(_0x30196d(0x7a))/0x3+-parseInt(_0x30196d(0x87))/0x4*(-parseInt(_0x30196d(0x7e))/0x5)+parseInt(_0x30196d(0x7b))/0x6*(parseInt(_0x30196d(0x71))/0x7)+parseInt(_0x30196d(0x8b))/0x8*(parseInt(_0x30196d(0x90))/0x9)+parseInt(_0x30196d(0x8e))/0xa+parseInt(_0x30196d(0x78))/0xb*(-parseInt(_0x30196d(0x79))/0xc);if(_0xe47385===_0x492526)break;else _0x388674['push'](_0x388674['shift']());}catch(_0x5bc53b){_0x388674['push'](_0x388674['shift']());}}}(a24_0x11e0,0xd3bc6));import{writeFileSync}from'node:fs';import a24_0x506bbd from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a24_0x11e0(){const _0x2d5ff3=['headers','json','port','close','writeHead','1hahjxP','user','xdg-open\x20\x22','isAuth','57736PHtCln','🔐\x20正在启动登录服务...','createServer','https://dev.lovrabet.com:','/api/auth/get-session','object','end','21013289jwMAPM','12JMEdbk','2048574ITRwwc','276whhcZo','darwin','1324324UqzHtr','580icUzUK','cookie','open\x20\x22','log','⚠️\x20\x20无法自动打开浏览器','Auth\x20server\x20error:','https://g.yuntooai.com/cert/lovrabet-dev.json','session','/sign-in?redirect=','49424IWCLph','🌐\x20正在尝试自动打开浏览器...','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','✅\x20浏览器已自动打开,请在浏览器中完成登录','200680xgFiWS','📍\x20登录地址:','listen','912790qcMFYl','catch','306xcPDhc','127.0.0.1','error','🔗\x20请手动复制登录地址到浏览器:','then'];a24_0x11e0=function(){return _0x2d5ff3;};return a24_0x11e0();}import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a24_0x2005(_0x1f98e3,_0x3b66fa){_0x1f98e3=_0x1f98e3-0x6b;const _0x11e009=a24_0x11e0();let _0x2005af=_0x11e009[_0x1f98e3];return _0x2005af;}export async function authServer(_0x36d7a1){const _0x58aa38=a24_0x2005,_0x3166cc=_0x36d7a1?.['silent']||![];if(await getIsSessionValid())return!![];const _0x16cb67=await(await fetch(_0x58aa38(0x84)))[_0x58aa38(0x96)]();return new Promise(async(_0x4bdf29,_0x232334)=>{const _0x47bfc4=_0x58aa38;let _0x1bf51a=0x0;const _0x316a84=a24_0x506bbd[_0x47bfc4(0x73)](_0x16cb67,async(_0x43bd50,_0x2ea3b4)=>{const _0xfe8ce8=_0x47bfc4,_0x24fe23=getUserDomain(),_0x5d9d69=_0x43bd50[_0xfe8ce8(0x95)][_0xfe8ce8(0x7f)]||'',_0x58f6a4=await fetch(_0x24fe23+_0xfe8ce8(0x75),{'headers':{'cookie':_0x5d9d69}})[_0xfe8ce8(0x94)](_0x517f47=>_0x517f47[_0xfe8ce8(0x96)]()),_0x405090=_0x58f6a4&&_0x58f6a4[_0xfe8ce8(0x85)]&&_0x58f6a4[_0xfe8ce8(0x6e)];if(_0x405090){writeFileSync(cookieFile,_0x5d9d69,'utf-8'),_0x4bdf29(!![]);const _0x4489ec='<!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>';_0x2ea3b4[_0xfe8ce8(0x6c)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x2ea3b4[_0xfe8ce8(0x77)](_0x4489ec),_0x316a84[_0xfe8ce8(0x6b)]();}else{const _0x27f6c9=''+encodeURIComponent(_0xfe8ce8(0x74)+_0x1bf51a);_0x2ea3b4[_0xfe8ce8(0x6c)](0x12e,{'location':_0x24fe23+_0xfe8ce8(0x86)+_0x27f6c9}),_0x2ea3b4[_0xfe8ce8(0x77)]();return;}});_0x316a84[_0x47bfc4(0x8d)](0x0,_0x47bfc4(0x91),()=>{const _0x4001a8=_0x47bfc4,_0x30e784=_0x316a84['address']();_0x1bf51a=typeof _0x30e784===_0x4001a8(0x76)&&_0x30e784?_0x30e784[_0x4001a8(0x97)]:Number(_0x30e784);const _0x1728ae='https://dev.lovrabet.com:'+_0x1bf51a;!_0x3166cc&&(console[_0x4001a8(0x81)](_0x4001a8(0x72)),console[_0x4001a8(0x81)](_0x4001a8(0x8c),_0x1728ae),console[_0x4001a8(0x81)](_0x4001a8(0x88)),console[_0x4001a8(0x81)](''),console[_0x4001a8(0x81)](_0x4001a8(0x89)),console[_0x4001a8(0x81)]('')),openInBrowser(_0x1728ae)['then'](_0x938530=>{const _0x5d8bb4=_0x4001a8;!_0x3166cc&&(_0x938530?console[_0x5d8bb4(0x81)](_0x5d8bb4(0x8a)):(console[_0x5d8bb4(0x81)](_0x5d8bb4(0x82)),console[_0x5d8bb4(0x81)](_0x5d8bb4(0x93),_0x1728ae)),console[_0x5d8bb4(0x81)](''));})[_0x4001a8(0x8f)](()=>{const _0x20701d=_0x4001a8;!_0x3166cc&&(console['log'](_0x20701d(0x82)),console[_0x20701d(0x81)]('🔗\x20请手动复制登录地址到浏览器:',_0x1728ae),console[_0x20701d(0x81)](''));});}),_0x316a84['on'](_0x47bfc4(0x92),_0x326d78=>{const _0x281605=_0x47bfc4;!_0x3166cc&&console[_0x281605(0x92)](_0x281605(0x83),_0x326d78),_0x232334(_0x326d78);});});}function openInBrowser(_0x7c3d00){return new Promise(_0x59214b=>{const _0x54927c=a24_0x2005,_0x4002e4=process['platform'];let _0x2f8086;if(_0x4002e4==='win32')_0x2f8086='start\x20\x22\x22\x20\x22'+_0x7c3d00+'\x22';else _0x4002e4===_0x54927c(0x7c)?_0x2f8086=_0x54927c(0x80)+_0x7c3d00+'\x22':_0x2f8086=_0x54927c(0x6f)+_0x7c3d00+'\x22';exec(_0x2f8086,_0x3c85e8=>{_0x3c85e8?_0x59214b(![]):_0x59214b(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a24_0x3dafad(0x70),isAuth);}
@@ -1 +1 @@
1
- function a24_0x4e30(_0xaaab6a,_0x1844f7){const _0x3f9317=a24_0x3f93();return a24_0x4e30=function(_0x4e30e0,_0x334277){_0x4e30e0=_0x4e30e0-0x1ab;let _0x11bd1c=_0x3f9317[_0x4e30e0];return _0x11bd1c;},a24_0x4e30(_0xaaab6a,_0x1844f7);}const a24_0x18de4a=a24_0x4e30;(function(_0x5b3c9c,_0x240c8f){const _0x297b33=a24_0x4e30,_0x335b7f=_0x5b3c9c();while(!![]){try{const _0x58cc64=parseInt(_0x297b33(0x1b2))/0x1*(parseInt(_0x297b33(0x1b4))/0x2)+-parseInt(_0x297b33(0x1af))/0x3+parseInt(_0x297b33(0x1ae))/0x4+parseInt(_0x297b33(0x1b5))/0x5*(-parseInt(_0x297b33(0x1ab))/0x6)+-parseInt(_0x297b33(0x1b6))/0x7*(parseInt(_0x297b33(0x1b1))/0x8)+-parseInt(_0x297b33(0x1ad))/0x9+-parseInt(_0x297b33(0x1b3))/0xa*(-parseInt(_0x297b33(0x1ac))/0xb);if(_0x58cc64===_0x240c8f)break;else _0x335b7f['push'](_0x335b7f['shift']());}catch(_0x515df6){_0x335b7f['push'](_0x335b7f['shift']());}}}(a24_0x3f93,0xb1f05));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a24_0x18de4a(0x1b0);export const cookieFile=configDir+'/cookie';function a24_0x3f93(){const _0x3e4436=['2311VujGSF','50wgxhjW','526pkMlrN','880BcSkZH','1918rkqtuv','2022EOXbRw','5221447KLMcsq','11104515dEXqmn','1892804XcJcOD','1687335GvyqhN','/.lovrabet','25400McuPty'];a24_0x3f93=function(){return _0x3e4436;};return a24_0x3f93();}mkdirSync(configDir,{'recursive':!![]});
1
+ function a25_0x1bb9(_0x4ee8b4,_0x491f8f){_0x4ee8b4=_0x4ee8b4-0xb6;const _0x4dc167=a25_0x4dc1();let _0x1bb96e=_0x4dc167[_0x4ee8b4];return _0x1bb96e;}const a25_0x151636=a25_0x1bb9;(function(_0x3417dd,_0x184d2c){const _0x463a69=a25_0x1bb9,_0x253691=_0x3417dd();while(!![]){try{const _0x4c8d8f=-parseInt(_0x463a69(0xb8))/0x1*(-parseInt(_0x463a69(0xc0))/0x2)+-parseInt(_0x463a69(0xb7))/0x3*(parseInt(_0x463a69(0xbb))/0x4)+-parseInt(_0x463a69(0xbf))/0x5*(parseInt(_0x463a69(0xc1))/0x6)+parseInt(_0x463a69(0xbd))/0x7+-parseInt(_0x463a69(0xc2))/0x8*(parseInt(_0x463a69(0xc3))/0x9)+parseInt(_0x463a69(0xb6))/0xa+-parseInt(_0x463a69(0xbc))/0xb*(-parseInt(_0x463a69(0xb9))/0xc);if(_0x4c8d8f===_0x184d2c)break;else _0x253691['push'](_0x253691['shift']());}catch(_0x31a28a){_0x253691['push'](_0x253691['shift']());}}}(a25_0x4dc1,0xa20ff));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a25_0x4dc1(){const _0x3a61e7=['/cookie','2525205zGsbpW','16186hoEAyX','6feqULd','8Alodop','4036131QBrLOt','1111340gLSeGB','42FrGlEH','84jnLFob','12SBgyEH','/.lovrabet','296008NjOsko','13243043qHnAGL','4609332LPKrhi'];a25_0x4dc1=function(){return _0x3a61e7;};return a25_0x4dc1();}export const configDir=homedir()+a25_0x151636(0xba);export const cookieFile=configDir+a25_0x151636(0xbe);mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a25_0x3495(_0x2103d5,_0x18b3d9){var _0x54242e=a25_0x5424();return a25_0x3495=function(_0x3495a1,_0x27b0e3){_0x3495a1=_0x3495a1-0xea;var _0xf0a6=_0x54242e[_0x3495a1];return _0xf0a6;},a25_0x3495(_0x2103d5,_0x18b3d9);}(function(_0x57eae5,_0x397303){var _0x5ca8a0=a25_0x3495,_0x3f2d5d=_0x57eae5();while(!![]){try{var _0x46abfa=parseInt(_0x5ca8a0(0xf3))/0x1+-parseInt(_0x5ca8a0(0xea))/0x2*(-parseInt(_0x5ca8a0(0xf5))/0x3)+-parseInt(_0x5ca8a0(0xec))/0x4+parseInt(_0x5ca8a0(0xee))/0x5*(parseInt(_0x5ca8a0(0xef))/0x6)+parseInt(_0x5ca8a0(0xf2))/0x7*(parseInt(_0x5ca8a0(0xed))/0x8)+parseInt(_0x5ca8a0(0xf4))/0x9*(-parseInt(_0x5ca8a0(0xeb))/0xa)+-parseInt(_0x5ca8a0(0xf0))/0xb*(-parseInt(_0x5ca8a0(0xf1))/0xc);if(_0x46abfa===_0x397303)break;else _0x3f2d5d['push'](_0x3f2d5d['shift']());}catch(_0x3556d2){_0x3f2d5d['push'](_0x3f2d5d['shift']());}}}(a25_0x5424,0x98150));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a25_0x5424(){var _0x4b24b0=['4013360xbuhHt','324328BpoMgr','70LktFYp','469698OFhxHq','169301fpbcug','708anvNqQ','35peLTdu','51702pARtet','2956977Isxmsq','72jWXNAJ','2078OikpbJ','20QGJhPP'];a25_0x5424=function(){return _0x4b24b0;};return a25_0x5424();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
1
+ (function(_0x5d2273,_0x140474){var _0x13acbf=a26_0x233b,_0x15d4b5=_0x5d2273();while(!![]){try{var _0xf4baa7=-parseInt(_0x13acbf(0xe8))/0x1*(parseInt(_0x13acbf(0xec))/0x2)+parseInt(_0x13acbf(0xe5))/0x3+parseInt(_0x13acbf(0xea))/0x4+parseInt(_0x13acbf(0xe6))/0x5+-parseInt(_0x13acbf(0xe9))/0x6+-parseInt(_0x13acbf(0xe4))/0x7*(parseInt(_0x13acbf(0xeb))/0x8)+parseInt(_0x13acbf(0xe7))/0x9;if(_0xf4baa7===_0x140474)break;else _0x15d4b5['push'](_0x15d4b5['shift']());}catch(_0x2339e6){_0x15d4b5['push'](_0x15d4b5['shift']());}}}(a26_0x15af,0x31e80));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a26_0x233b(_0x11bf04,_0x52412a){_0x11bf04=_0x11bf04-0xe4;var _0x15afc4=a26_0x15af();var _0x233b46=_0x15afc4[_0x11bf04];return _0x233b46;}function a26_0x15af(){var _0x40022a=['2015028oQmjWC','990IFiXJQ','1750458jTeIFE','686700Kwytui','67680rxZeyC','264NSWXvB','287tiazfs','769122FNQStY','1608790mlySuC'];a26_0x15af=function(){return _0x40022a;};return a26_0x15af();}
@@ -1 +1 @@
1
- (function(_0x5225d2,_0x287700){const _0x236c9f=a26_0x2aaf,_0x8dd38c=_0x5225d2();while(!![]){try{const _0x31196e=parseInt(_0x236c9f(0xbf))/0x1+-parseInt(_0x236c9f(0xba))/0x2+parseInt(_0x236c9f(0xc6))/0x3*(parseInt(_0x236c9f(0xc4))/0x4)+-parseInt(_0x236c9f(0xc1))/0x5*(-parseInt(_0x236c9f(0xbb))/0x6)+parseInt(_0x236c9f(0xb9))/0x7+-parseInt(_0x236c9f(0xc8))/0x8*(parseInt(_0x236c9f(0xc3))/0x9)+parseInt(_0x236c9f(0xbc))/0xa*(-parseInt(_0x236c9f(0xc2))/0xb);if(_0x31196e===_0x287700)break;else _0x8dd38c['push'](_0x8dd38c['shift']());}catch(_0x3c731e){_0x8dd38c['push'](_0x8dd38c['shift']());}}}(a26_0x14b9,0x52726));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a26_0x2aaf(_0x5802ab,_0x26830d){const _0x14b956=a26_0x14b9();return a26_0x2aaf=function(_0x2aaf54,_0xf7e234){_0x2aaf54=_0x2aaf54-0xb9;let _0x23f22c=_0x14b956[_0x2aaf54];return _0x23f22c;},a26_0x2aaf(_0x5802ab,_0x26830d);}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xfa0688=a26_0x2aaf;try{if(!existsSync(cookieFile))return![];const _0x2e4e0c=readFileSync(cookieFile,_0xfa0688(0xc0)),_0x1a5d00=await fetch(getUserDomain()+_0xfa0688(0xbd),{'headers':{'cookie':_0x2e4e0c}})[_0xfa0688(0xbe)](_0x231dce=>_0x231dce['json']());return _0x1a5d00&&_0x1a5d00[_0xfa0688(0xc5)]&&_0x1a5d00[_0xfa0688(0xc7)];}catch{}return![];}function a26_0x14b9(){const _0x228838=['user','24kxBevi','4198866iFlVBq','853496oLvqgp','5250lgMsJz','1210BuXHsZ','/api/auth/get-session','then','603124GXQoKh','utf-8','2965DhjKrr','105446mvxNvS','210213HtbANx','4mtuuBb','session','817770cHujlm'];a26_0x14b9=function(){return _0x228838;};return a26_0x14b9();}
1
+ (function(_0x2e0b5e,_0x23bcc3){const _0x15c22a=a27_0x76ec,_0x37cac0=_0x2e0b5e();while(!![]){try{const _0x5ad049=parseInt(_0x15c22a(0x75))/0x1+parseInt(_0x15c22a(0x7a))/0x2+parseInt(_0x15c22a(0x72))/0x3+parseInt(_0x15c22a(0x76))/0x4+-parseInt(_0x15c22a(0x73))/0x5+parseInt(_0x15c22a(0x7b))/0x6+-parseInt(_0x15c22a(0x7d))/0x7;if(_0x5ad049===_0x23bcc3)break;else _0x37cac0['push'](_0x37cac0['shift']());}catch(_0xbf0956){_0x37cac0['push'](_0x37cac0['shift']());}}}(a27_0x16c9,0xe422d));function a27_0x16c9(){const _0x5e39c3=['987978IWAWCh','/api/auth/get-session','18933320zcxxvZ','4253331LSAuDM','2624200gCAPnG','utf-8','662838NmIwsj','874092GcOsFr','session','then','user','3400488PruVPw'];a27_0x16c9=function(){return _0x5e39c3;};return a27_0x16c9();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a27_0x76ec(_0x3e657b,_0x4df85c){_0x3e657b=_0x3e657b-0x72;const _0x16c90d=a27_0x16c9();let _0x76ec52=_0x16c90d[_0x3e657b];return _0x76ec52;}export async function getIsSessionValid(){const _0x2d82bf=a27_0x76ec;try{if(!existsSync(cookieFile))return![];const _0x29ebc9=readFileSync(cookieFile,_0x2d82bf(0x74)),_0x584190=await fetch(getUserDomain()+_0x2d82bf(0x7c),{'headers':{'cookie':_0x29ebc9}})[_0x2d82bf(0x78)](_0x5b0901=>_0x5b0901['json']());return _0x584190&&_0x584190[_0x2d82bf(0x77)]&&_0x584190[_0x2d82bf(0x79)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x2c171c,_0x5cf49d){var _0x1e7eca=a27_0x2605,_0x25969d=_0x2c171c();while(!![]){try{var _0x1d9d05=parseInt(_0x1e7eca(0x93))/0x1+-parseInt(_0x1e7eca(0x92))/0x2+parseInt(_0x1e7eca(0x95))/0x3+parseInt(_0x1e7eca(0x91))/0x4+parseInt(_0x1e7eca(0x94))/0x5+parseInt(_0x1e7eca(0x8f))/0x6*(-parseInt(_0x1e7eca(0x96))/0x7)+-parseInt(_0x1e7eca(0x90))/0x8;if(_0x1d9d05===_0x5cf49d)break;else _0x25969d['push'](_0x25969d['shift']());}catch(_0x25972a){_0x25969d['push'](_0x25969d['shift']());}}}(a27_0x177e,0xaa040));function a27_0x177e(){var _0x3bb792=['433578lMtiQo','20615ncIlvR','log','!\x20当前未登录','✓\x20已退出登录','2130JuSiqr','8002416FZLxkG','5493140AcPiNK','2284142EichiV','1178899lrKZiK','5937610OzBxfW'];a27_0x177e=function(){return _0x3bb792;};return a27_0x177e();}import{unlinkSync,existsSync}from'node:fs';function a27_0x2605(_0x39497c,_0xde4cee){var _0x177e72=a27_0x177e();return a27_0x2605=function(_0x26055b,_0x2f889b){_0x26055b=_0x26055b-0x8f;var _0x4adf8f=_0x177e72[_0x26055b];return _0x4adf8f;},a27_0x2605(_0x39497c,_0xde4cee);}import{cookieFile}from'./constant.js';export function logout(){var _0x51aca5=a27_0x2605;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x51aca5(0x97)](_0x51aca5(0x99))):console[_0x51aca5(0x97)](_0x51aca5(0x98));}
1
+ function a28_0x4cee(_0x387d8d,_0x2c40c9){_0x387d8d=_0x387d8d-0x1ad;var _0x2437a9=a28_0x2437();var _0x4cee48=_0x2437a9[_0x387d8d];return _0x4cee48;}(function(_0x43cc3e,_0x256d66){var _0x4915b=a28_0x4cee,_0x2575a2=_0x43cc3e();while(!![]){try{var _0x454f89=parseInt(_0x4915b(0x1b0))/0x1+parseInt(_0x4915b(0x1b1))/0x2*(-parseInt(_0x4915b(0x1b5))/0x3)+parseInt(_0x4915b(0x1ad))/0x4+parseInt(_0x4915b(0x1b3))/0x5+parseInt(_0x4915b(0x1b6))/0x6+-parseInt(_0x4915b(0x1ae))/0x7+-parseInt(_0x4915b(0x1b4))/0x8;if(_0x454f89===_0x256d66)break;else _0x2575a2['push'](_0x2575a2['shift']());}catch(_0x19ef10){_0x2575a2['push'](_0x2575a2['shift']());}}}(a28_0x2437,0x744dc));function a28_0x2437(){var _0x338afd=['479234QHKlGG','!\x20当前未登录','136613Facifv','719692vzNwDL','✓\x20已退出登录','3455320rtNjoX','1849640hFpRvB','6MyMxIW','3240906dmmYVJ','log','511644DKDEsL'];a28_0x2437=function(){return _0x338afd;};return a28_0x2437();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x237188=a28_0x4cee;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x237188(0x1b7)](_0x237188(0x1b2))):console['log'](_0x237188(0x1af));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a28_0x5d3d07=a28_0x2903;(function(_0x30d95d,_0x240428){const _0x9571e=a28_0x2903,_0x53f90d=_0x30d95d();while(!![]){try{const _0x37b4be=parseInt(_0x9571e(0x93))/0x1+-parseInt(_0x9571e(0x8b))/0x2*(-parseInt(_0x9571e(0x80))/0x3)+-parseInt(_0x9571e(0x94))/0x4+parseInt(_0x9571e(0x9a))/0x5+-parseInt(_0x9571e(0x76))/0x6+-parseInt(_0x9571e(0x77))/0x7*(parseInt(_0x9571e(0x97))/0x8)+-parseInt(_0x9571e(0x79))/0x9;if(_0x37b4be===_0x240428)break;else _0x53f90d['push'](_0x53f90d['shift']());}catch(_0x228867){_0x53f90d['push'](_0x53f90d['shift']());}}}(a28_0x4325,0x7360b));import{jsx as a28_0x37a0b2}from'react/jsx-runtime';import a28_0x293fe2 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';function a28_0x2903(_0x2f3242,_0x2b9eae){const _0x43255a=a28_0x4325();return a28_0x2903=function(_0x290329,_0x20e9e8){_0x290329=_0x290329-0x70;let _0x3129a1=_0x43255a[_0x290329];return _0x3129a1;},a28_0x2903(_0x2f3242,_0x2b9eae);}function a28_0x4325(){const _0x436bb7=['822108TEVXZN','68576hCBgce','\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\x20cdn\x20sync\x20--version\x201.0.0\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','trim','1240648vPRxwy','info','logout','3671415OTXYct','auth','exit','start','join','menu','create','4815240iVEWKi','7sWSNOI','setRawCommand','8128107qnmBKb','slice','preview','page','init','env','api','2382252QTEkaf','config','\x20(监听模式)','add','build','string','logs','argv','cwd','boolean','input','2wclhPy','flags','error','执行添加页面命令','add-page','version','setLogPath','clear'];a28_0x4325=function(){return _0x436bb7;};return a28_0x4325();}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{AppMenuSyncCdnVersionUI}from'./app-menu-cdn-version/app-menu-sync-cdn-version-ui.js';const cli=a28_0x293fe2(a28_0x5d3d07(0x95),{'importMeta':import.meta,'flags':{'name':{'type':a28_0x5d3d07(0x85)},'clear':{'type':a28_0x5d3d07(0x89)},'env':{'type':a28_0x5d3d07(0x85)},'watch':{'type':a28_0x5d3d07(0x89)},'help':{'type':a28_0x5d3d07(0x89)},'appcode':{'type':a28_0x5d3d07(0x85)},'output':{'type':a28_0x5d3d07(0x85)},'params':{'type':'string'},'datasetcode':{'type':a28_0x5d3d07(0x85)},'version':{'type':a28_0x5d3d07(0x85)}}});await run();async function run(){const _0x223c43=a28_0x5d3d07,_0x1ba082=cli[_0x223c43(0x8a)][0x0],_0x41e19c=cli[_0x223c43(0x8a)][0x1],_0x5edef3=cli['input'][0x2],_0x5863b5=('lovrabet\x20'+process[_0x223c43(0x87)][_0x223c43(0x7a)](0x2)[_0x223c43(0x73)]('\x20'))['trim']();logger[_0x223c43(0x78)](_0x5863b5);switch(_0x1ba082){case _0x223c43(0x7d):{const _0x3d1359=cli[_0x223c43(0x8c)]['appcode'],_0x15fc48=cli['flags'][_0x223c43(0x7e)];logger['setLogPath'](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x7d),'执行初始化配置命令'),render(a28_0x37a0b2(Init,{'appcode':_0x3d1359,'env':_0x15fc48}));break;}case _0x223c43(0x75):{const _0x42ddae=cli[_0x223c43(0x8a)][0x1]?.[_0x223c43(0x96)](),_0x1562d3=cli['flags'][_0x223c43(0x7e)];render(a28_0x37a0b2(CreateApp,{'projectCode':_0x42ddae,'env':_0x1562d3}));break;}case _0x223c43(0x83):{cli[_0x223c43(0x8a)][0x1]===_0x223c43(0x7c)&&(logger['setLogPath'](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x8f),_0x223c43(0x8e)),render(a28_0x37a0b2(AddPage,{})));break;}case'start':{try{logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger['info'](_0x223c43(0x72),'执行启动命令'),await runStart();}catch(_0x55a846){console[_0x223c43(0x8d)](_0x55a846),process[_0x223c43(0x71)](0x1);}break;}case _0x223c43(0x84):{try{logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x84),'执行构建命令'),await runBuild();}catch(_0x278cb0){console['error'](_0x278cb0),process['exit'](0x1);}break;}case _0x223c43(0x7b):{const _0x4577e5=cli[_0x223c43(0x8c)]['watch'];logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)](_0x223c43(0x7b),'执行预览命令'+(_0x4577e5?_0x223c43(0x82):''));if(_0x4577e5)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x3c60a7){console[_0x223c43(0x8d)](_0x3c60a7),process['exit'](0x1);}else try{await runPreview();}catch(_0x181c66){console['error'](_0x181c66),process[_0x223c43(0x71)](0x1);}break;}case _0x223c43(0x81):{render(a28_0x37a0b2(Config,{'cli':cli}));break;}case _0x223c43(0x7f):{await apiCli(cli);break;}case _0x223c43(0x70):{render(a28_0x37a0b2(AuthServer,{}));break;}case _0x223c43(0x74):{if(_0x41e19c==='cdn'){if(_0x5edef3==='sync'&&cli['flags'][_0x223c43(0x90)]){logger[_0x223c43(0x91)](process[_0x223c43(0x88)]()),logger[_0x223c43(0x98)]('menu-sync-cdn','执行菜单\x20CDN\x20版本同步命令'),render(a28_0x37a0b2(AppMenuSyncCdnVersionUI,{'newVersion':cli[_0x223c43(0x8c)][_0x223c43(0x90)]}));break;}}else render(a28_0x37a0b2(AppMenuSyncUI,{}));break;}case _0x223c43(0x99):{logout();break;}case'mcp':{const _0x208d6b=cli['input'][0x1];await mcpCommand(_0x208d6b);break;}case _0x223c43(0x86):{cli[_0x223c43(0x8c)][_0x223c43(0x92)]?clearLogs():showLogs();break;}default:render(a28_0x37a0b2(Help,{}));break;}}
2
+ const a29_0xe0ce4f=a29_0x69e6;(function(_0x1b7b04,_0xaf503b){const _0x3402ca=a29_0x69e6,_0x1c2c59=_0x1b7b04();while(!![]){try{const _0x10fb44=parseInt(_0x3402ca(0x1d9))/0x1*(-parseInt(_0x3402ca(0x1c9))/0x2)+-parseInt(_0x3402ca(0x1de))/0x3*(parseInt(_0x3402ca(0x1e2))/0x4)+-parseInt(_0x3402ca(0x1ec))/0x5*(-parseInt(_0x3402ca(0x1c5))/0x6)+-parseInt(_0x3402ca(0x1cb))/0x7*(-parseInt(_0x3402ca(0x1d6))/0x8)+parseInt(_0x3402ca(0x1f2))/0x9+parseInt(_0x3402ca(0x1c1))/0xa*(parseInt(_0x3402ca(0x1c4))/0xb)+parseInt(_0x3402ca(0x1e1))/0xc*(-parseInt(_0x3402ca(0x1e3))/0xd);if(_0x10fb44===_0xaf503b)break;else _0x1c2c59['push'](_0x1c2c59['shift']());}catch(_0x1483bb){_0x1c2c59['push'](_0x1c2c59['shift']());}}}(a29_0x2555,0xa8fb8));import{jsx as a29_0x278f6b}from'react/jsx-runtime';import a29_0x5a989d 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';function a29_0x69e6(_0x5296c0,_0x57a543){_0x5296c0=_0x5296c0-0x1c1;const _0x255511=a29_0x2555();let _0x69e6b9=_0x255511[_0x5296c0];return _0x69e6b9;}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_0x2555(){const _0x32718d=['argv','page','setRawCommand','exit','2559537weAAwQ','boolean','error','clear','140vkQuda','执行初始化配置命令','info','753577NcecOP','618nAfPgZ','cwd','trim','all','2GlVdhK','执行构建命令','9905fdiGBX','执行预览命令','build','create','\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','join','input','env','执行添加页面命令','lovrabet\x20','setLogPath','1168GErXFP','auth','menu-update-cdn','552514LYfAga','执行更新菜单\x20CDN\x20资源命令','string','start','flags','57543EmYjGD','mcp','preview','1551648KESQkm','196lkheMW','13OlBvFL','menu','logs','add-page','api','logout','执行启动命令','watch','add','41930RlYLXC','init'];a29_0x2555=function(){return _0x32718d;};return a29_0x2555();}import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x5a989d(a29_0xe0ce4f(0x1cf),{'importMeta':import.meta,'flags':{'name':{'type':a29_0xe0ce4f(0x1db)},'clear':{'type':a29_0xe0ce4f(0x1f3)},'env':{'type':'string'},'watch':{'type':a29_0xe0ce4f(0x1f3)},'help':{'type':a29_0xe0ce4f(0x1f3)},'appcode':{'type':a29_0xe0ce4f(0x1db)},'output':{'type':a29_0xe0ce4f(0x1db)},'params':{'type':a29_0xe0ce4f(0x1db)},'datasetcode':{'type':a29_0xe0ce4f(0x1db)},'version':{'type':a29_0xe0ce4f(0x1db)}}});await run();async function run(){const _0x40baa7=a29_0xe0ce4f,_0xddf6c3=cli[_0x40baa7(0x1d1)][0x0],_0x14e028=cli[_0x40baa7(0x1d1)][0x1],_0x409f8f=cli[_0x40baa7(0x1d1)][0x2],_0x1657b3=(_0x40baa7(0x1d4)+process[_0x40baa7(0x1ee)]['slice'](0x2)[_0x40baa7(0x1d0)]('\x20'))[_0x40baa7(0x1c7)]();logger[_0x40baa7(0x1f0)](_0x1657b3);switch(_0xddf6c3){case _0x40baa7(0x1ed):{const _0x3b743a=cli[_0x40baa7(0x1dd)]['appcode'],_0x4e2ef0=cli[_0x40baa7(0x1dd)]['env'];logger[_0x40baa7(0x1d5)](process[_0x40baa7(0x1c6)]()),logger[_0x40baa7(0x1c3)](_0x40baa7(0x1ed),_0x40baa7(0x1c2)),render(a29_0x278f6b(Init,{'appcode':_0x3b743a,'env':_0x4e2ef0}));break;}case _0x40baa7(0x1ce):{const _0xe15ecb=cli[_0x40baa7(0x1d1)][0x1]?.[_0x40baa7(0x1c7)](),_0x591c58=cli[_0x40baa7(0x1dd)][_0x40baa7(0x1d2)];render(a29_0x278f6b(CreateApp,{'projectCode':_0xe15ecb,'env':_0x591c58}));break;}case _0x40baa7(0x1eb):{cli[_0x40baa7(0x1d1)][0x1]===_0x40baa7(0x1ef)&&(logger[_0x40baa7(0x1d5)](process[_0x40baa7(0x1c6)]()),logger[_0x40baa7(0x1c3)](_0x40baa7(0x1e6),_0x40baa7(0x1d3)),render(a29_0x278f6b(AddPage,{})));break;}case _0x40baa7(0x1dc):{try{logger[_0x40baa7(0x1d5)](process[_0x40baa7(0x1c6)]()),logger['info'](_0x40baa7(0x1dc),_0x40baa7(0x1e9)),await runStart();}catch(_0x139530){console[_0x40baa7(0x1f4)](_0x139530),process[_0x40baa7(0x1f1)](0x1);}break;}case _0x40baa7(0x1cd):{try{logger[_0x40baa7(0x1d5)](process[_0x40baa7(0x1c6)]()),logger[_0x40baa7(0x1c3)](_0x40baa7(0x1cd),_0x40baa7(0x1ca)),await runBuild();}catch(_0x45a2ef){console[_0x40baa7(0x1f4)](_0x45a2ef),process['exit'](0x1);}break;}case _0x40baa7(0x1e0):{const _0x4b2d27=cli[_0x40baa7(0x1dd)][_0x40baa7(0x1ea)];logger[_0x40baa7(0x1d5)](process[_0x40baa7(0x1c6)]()),logger[_0x40baa7(0x1c3)](_0x40baa7(0x1e0),_0x40baa7(0x1cc)+(_0x4b2d27?'\x20(监听模式)':''));if(_0x4b2d27)try{await Promise[_0x40baa7(0x1c8)]([runBuildWatch(),runPreview()]);}catch(_0x1b7434){console['error'](_0x1b7434),process['exit'](0x1);}else try{await runPreview();}catch(_0x4b96e7){console[_0x40baa7(0x1f4)](_0x4b96e7),process[_0x40baa7(0x1f1)](0x1);}break;}case'config':{render(a29_0x278f6b(Config,{'cli':cli}));break;}case _0x40baa7(0x1e7):{await apiCli(cli);break;}case _0x40baa7(0x1d7):{render(a29_0x278f6b(AuthServer,{}));break;}case _0x40baa7(0x1e4):{if(_0x14e028==='update'){logger[_0x40baa7(0x1d5)](process['cwd']()),logger[_0x40baa7(0x1c3)](_0x40baa7(0x1d8),_0x40baa7(0x1da)),render(a29_0x278f6b(AppMenuUpdateCdn,{}));break;}else render(a29_0x278f6b(AppMenuSyncUI,{}));break;}case _0x40baa7(0x1e8):{logout();break;}case _0x40baa7(0x1df):{const _0x5da905=cli[_0x40baa7(0x1d1)][0x1];await mcpCommand(_0x5da905);break;}case _0x40baa7(0x1e5):{cli[_0x40baa7(0x1dd)][_0x40baa7(0x1f5)]?clearLogs():showLogs();break;}default:render(a29_0x278f6b(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x291c76,_0x25d835){const _0x27caac=a29_0x3b34,_0x4956a3=_0x291c76();while(!![]){try{const _0x5ec36d=parseInt(_0x27caac(0x1ca))/0x1+-parseInt(_0x27caac(0x1cb))/0x2+-parseInt(_0x27caac(0x1d8))/0x3+-parseInt(_0x27caac(0x1d5))/0x4+-parseInt(_0x27caac(0x1d1))/0x5*(parseInt(_0x27caac(0x1d4))/0x6)+parseInt(_0x27caac(0x1d0))/0x7+parseInt(_0x27caac(0x1cd))/0x8;if(_0x5ec36d===_0x25d835)break;else _0x4956a3['push'](_0x4956a3['shift']());}catch(_0x13194a){_0x4956a3['push'](_0x4956a3['shift']());}}}(a29_0x4303,0x4cf5f));import{spawn}from'node:child_process';function a29_0x3b34(_0x11c716,_0x1cab00){const _0x430305=a29_0x4303();return a29_0x3b34=function(_0x3b3471,_0x58557c){_0x3b3471=_0x3b3471-0x1ca;let _0x55223e=_0x430305[_0x3b3471];return _0x55223e;},a29_0x3b34(_0x11c716,_0x1cab00);}import{delimiter,join}from'node:path';function a29_0x4303(){const _0x182bfd=['build','3379425fvNNKJ','61785hOKqrQ','PATH','env','162mhdLvd','1319884udDZdx','inherit','cwd','371862qixUkx','node_modules','46637ImgyHK','474094kmQdTn','close','6483440WwIdBZ','vite'];a29_0x4303=function(){return _0x182bfd;};return a29_0x4303();}export function runBuildWatch(){return new Promise((_0x4fc5a9,_0x17793d)=>{const _0x499264=a29_0x3b34,_0x286c91=spawn(_0x499264(0x1ce),[_0x499264(0x1cf),'--watch'],{'stdio':_0x499264(0x1d6),'shell':!![],'env':{...process[_0x499264(0x1d3)],'PATH':''+join(process[_0x499264(0x1d7)](),_0x499264(0x1d9),'.bin')+delimiter+process[_0x499264(0x1d3)][_0x499264(0x1d2)]}});_0x286c91['on'](_0x499264(0x1cc),_0x7d6a24=>{if(_0x7d6a24===0x0||_0x7d6a24===null)_0x4fc5a9();else _0x17793d(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x7d6a24));}),_0x286c91['on']('error',_0x17793d);});}
1
+ (function(_0x289a88,_0x4271c7){const _0x95ce9=a30_0x4ed5,_0x512bff=_0x289a88();while(!![]){try{const _0x5b429f=parseInt(_0x95ce9(0x1e9))/0x1+parseInt(_0x95ce9(0x1eb))/0x2*(parseInt(_0x95ce9(0x1ea))/0x3)+parseInt(_0x95ce9(0x1de))/0x4*(parseInt(_0x95ce9(0x1e3))/0x5)+parseInt(_0x95ce9(0x1e8))/0x6+parseInt(_0x95ce9(0x1e7))/0x7+-parseInt(_0x95ce9(0x1ee))/0x8+-parseInt(_0x95ce9(0x1e5))/0x9;if(_0x5b429f===_0x4271c7)break;else _0x512bff['push'](_0x512bff['shift']());}catch(_0x2d54b9){_0x512bff['push'](_0x512bff['shift']());}}}(a30_0x20b9,0xa51c7));function a30_0x4ed5(_0x4ed0c9,_0x4f1b5f){_0x4ed0c9=_0x4ed0c9-0x1de;const _0x20b9d9=a30_0x20b9();let _0x4ed5a4=_0x20b9d9[_0x4ed0c9];return _0x4ed5a4;}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x479b71,_0xa756cb)=>{const _0x1b338e=a30_0x4ed5,_0x418d98=spawn('vite',[_0x1b338e(0x1ed),_0x1b338e(0x1e1)],{'stdio':'inherit','shell':!![],'env':{...process[_0x1b338e(0x1e6)],'PATH':''+join(process[_0x1b338e(0x1ec)](),_0x1b338e(0x1df),_0x1b338e(0x1ef))+delimiter+process['env'][_0x1b338e(0x1e2)]}});_0x418d98['on'](_0x1b338e(0x1e0),_0x3aff7d=>{const _0x2ac3f9=_0x1b338e;if(_0x3aff7d===0x0||_0x3aff7d===null)_0x479b71();else _0xa756cb(new Error(_0x2ac3f9(0x1e4)+_0x3aff7d));}),_0x418d98['on'](_0x1b338e(0x1f0),_0xa756cb);});}function a30_0x20b9(){const _0x4b4a1c=['build','10338696Buxmtl','.bin','error','59472KFlBWz','node_modules','close','--watch','PATH','195DKhDmb','npm\x20run\x20build\x20exited\x20with\x20code\x20','5441841ekqtoH','env','3581998XEdXOj','1097388IbGUpA','1032102shlNML','88905eBXbRm','18fvVyLx','cwd'];a30_0x20b9=function(){return _0x4b4a1c;};return a30_0x20b9();}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x504879,_0x5f244e){const _0x309aad=a30_0x1857,_0x185937=_0x504879();while(!![]){try{const _0x1d0443=-parseInt(_0x309aad(0x188))/0x1*(parseInt(_0x309aad(0x18c))/0x2)+parseInt(_0x309aad(0x189))/0x3+-parseInt(_0x309aad(0x19a))/0x4*(-parseInt(_0x309aad(0x187))/0x5)+-parseInt(_0x309aad(0x180))/0x6*(parseInt(_0x309aad(0x197))/0x7)+-parseInt(_0x309aad(0x194))/0x8*(-parseInt(_0x309aad(0x182))/0x9)+parseInt(_0x309aad(0x190))/0xa*(-parseInt(_0x309aad(0x18e))/0xb)+-parseInt(_0x309aad(0x195))/0xc*(-parseInt(_0x309aad(0x184))/0xd);if(_0x1d0443===_0x5f244e)break;else _0x185937['push'](_0x185937['shift']());}catch(_0x3dd0e7){_0x185937['push'](_0x185937['shift']());}}}(a30_0x2475,0x814bd));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a30_0x2475(){const _0x196da8=['12782RROAAG','npm\x20run\x20build\x20exited\x20with\x20code\x20','6130vUGXQA','success','pipe','npm\x20run\x20build','3634328livSSi','12blcXTX','message','651fqdyUA','stderr','项目构建出错','4ROQmtw','PATH','build','node_modules','now','toString','trim','59442fnOuFO','开始构建项目','9dkVoES','data','6244277rMOmLh','cwd','error','1923425QkMDil','5471atQxCw','2564673wIaTRj','项目构建成功','npm','4zXvAhn','.bin'];a30_0x2475=function(){return _0x196da8;};return a30_0x2475();}function a30_0x1857(_0x5cea3f,_0x3ab9e0){const _0x2475b2=a30_0x2475();return a30_0x1857=function(_0x185709,_0x63e75e){_0x185709=_0x185709-0x17f;let _0x856f8a=_0x2475b2[_0x185709];return _0x856f8a;},a30_0x1857(_0x5cea3f,_0x3ab9e0);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x63835b,_0x3044fa)=>{const _0x5293a0=a30_0x1857,_0x247766=Date[_0x5293a0(0x19e)]();logger['info'](_0x5293a0(0x19c),_0x5293a0(0x181),{'command':_0x5293a0(0x193)});let _0x4f06c9='';const _0x4959bf=spawn(_0x5293a0(0x18b),['run',_0x5293a0(0x19c)],{'stdio':['inherit','inherit',_0x5293a0(0x192)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x5293a0(0x185)](),_0x5293a0(0x19d),_0x5293a0(0x18d))+delimiter+process['env'][_0x5293a0(0x19b)]}});_0x4959bf[_0x5293a0(0x198)]?.['on'](_0x5293a0(0x183),_0x102e44=>{const _0x18f39b=_0x5293a0;_0x4f06c9+=_0x102e44[_0x18f39b(0x19f)]();}),_0x4959bf['on']('close',_0x266911=>{const _0x3f88ed=_0x5293a0,_0x4366c7=Date['now']()-_0x247766;if(_0x266911===0x0||_0x266911===null)logger[_0x3f88ed(0x191)]('build',_0x3f88ed(0x18a),_0x4366c7),_0x63835b();else{const _0x1201be={'exitCode':_0x266911,'duration':_0x4366c7,'command':_0x3f88ed(0x193),'cwd':process['cwd']()};_0x4f06c9[_0x3f88ed(0x17f)]()&&(_0x1201be[_0x3f88ed(0x198)]=_0x4f06c9[_0x3f88ed(0x17f)]()),logger[_0x3f88ed(0x186)](_0x3f88ed(0x19c),'项目构建失败',_0x1201be),_0x3044fa(new Error(_0x3f88ed(0x18f)+_0x266911));}}),_0x4959bf['on']('error',_0x99121e=>{const _0x1f6044=_0x5293a0,_0x83cabd=Date[_0x1f6044(0x19e)]()-_0x247766;logger[_0x1f6044(0x186)](_0x1f6044(0x19c),_0x1f6044(0x199),{'error':_0x99121e[_0x1f6044(0x196)],'duration':_0x83cabd,'stderr':_0x4f06c9[_0x1f6044(0x17f)]()||undefined}),_0x3044fa(_0x99121e);});});}
1
+ function a31_0x1b7a(_0x483783,_0x179a21){_0x483783=_0x483783-0x1d6;const _0xde7f73=a31_0xde7f();let _0x1b7a7e=_0xde7f73[_0x483783];return _0x1b7a7e;}function a31_0xde7f(){const _0x4cc0f3=['run','132087ayIwrf','项目构建出错','1237585vSdeto','231iabcin','data','2721424LksVwQ','inherit','close','npm\x20run\x20build','message','477946mRXgUZ','toString','6982362aySVXX','cwd','520787terVnT','324910GCZedw','18hQfUeh','now','build','56niPSnm','PATH','pipe','28lAYqzE','stderr','开始构建项目','error','npm\x20run\x20build\x20exited\x20with\x20code\x20','项目构建成功','trim','npm'];a31_0xde7f=function(){return _0x4cc0f3;};return a31_0xde7f();}(function(_0x27407c,_0x3f728f){const _0x19b9d8=a31_0x1b7a,_0x2e30ba=_0x27407c();while(!![]){try{const _0x14d959=parseInt(_0x19b9d8(0x1e7))/0x1+parseInt(_0x19b9d8(0x1ef))/0x2*(-parseInt(_0x19b9d8(0x1d9))/0x3)+parseInt(_0x19b9d8(0x1de))/0x4+-parseInt(_0x19b9d8(0x1db))/0x5*(parseInt(_0x19b9d8(0x1e9))/0x6)+parseInt(_0x19b9d8(0x1e3))/0x7*(parseInt(_0x19b9d8(0x1ec))/0x8)+parseInt(_0x19b9d8(0x1e5))/0x9+-parseInt(_0x19b9d8(0x1e8))/0xa*(parseInt(_0x19b9d8(0x1dc))/0xb);if(_0x14d959===_0x3f728f)break;else _0x2e30ba['push'](_0x2e30ba['shift']());}catch(_0x58ca7e){_0x2e30ba['push'](_0x2e30ba['shift']());}}}(a31_0xde7f,0x64fc7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x4da814,_0x107ad4)=>{const _0x2358a8=a31_0x1b7a,_0x1f2f87=Date['now']();logger['info']('build',_0x2358a8(0x1f1),{'command':_0x2358a8(0x1e1)});let _0x803f39='';const _0x17f14f=spawn(_0x2358a8(0x1d7),[_0x2358a8(0x1d8),_0x2358a8(0x1eb)],{'stdio':['inherit',_0x2358a8(0x1df),_0x2358a8(0x1ee)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x2358a8(0x1e6)](),'node_modules','.bin')+delimiter+process['env'][_0x2358a8(0x1ed)]}});_0x17f14f[_0x2358a8(0x1f0)]?.['on'](_0x2358a8(0x1dd),_0x55a112=>{const _0x4f5e5b=_0x2358a8;_0x803f39+=_0x55a112[_0x4f5e5b(0x1e4)]();}),_0x17f14f['on'](_0x2358a8(0x1e0),_0x10367b=>{const _0x5f4a31=_0x2358a8,_0x304b90=Date[_0x5f4a31(0x1ea)]()-_0x1f2f87;if(_0x10367b===0x0||_0x10367b===null)logger['success'](_0x5f4a31(0x1eb),_0x5f4a31(0x1f4),_0x304b90),_0x4da814();else{const _0x429b0b={'exitCode':_0x10367b,'duration':_0x304b90,'command':'npm\x20run\x20build','cwd':process[_0x5f4a31(0x1e6)]()};_0x803f39[_0x5f4a31(0x1d6)]()&&(_0x429b0b[_0x5f4a31(0x1f0)]=_0x803f39[_0x5f4a31(0x1d6)]()),logger[_0x5f4a31(0x1f2)](_0x5f4a31(0x1eb),'项目构建失败',_0x429b0b),_0x107ad4(new Error(_0x5f4a31(0x1f3)+_0x10367b));}}),_0x17f14f['on'](_0x2358a8(0x1f2),_0x1e198d=>{const _0x1bddb1=_0x2358a8,_0x43fafb=Date[_0x1bddb1(0x1ea)]()-_0x1f2f87;logger[_0x1bddb1(0x1f2)](_0x1bddb1(0x1eb),_0x1bddb1(0x1da),{'error':_0x1e198d[_0x1bddb1(0x1e2)],'duration':_0x43fafb,'stderr':_0x803f39[_0x1bddb1(0x1d6)]()||undefined}),_0x107ad4(_0x1e198d);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3e31b6,_0x529e6f){const _0x43722c=a31_0x12bb,_0x313e60=_0x3e31b6();while(!![]){try{const _0x4ce37f=-parseInt(_0x43722c(0xa3))/0x1*(parseInt(_0x43722c(0xa0))/0x2)+-parseInt(_0x43722c(0xa9))/0x3+parseInt(_0x43722c(0x9e))/0x4*(parseInt(_0x43722c(0xb8))/0x5)+parseInt(_0x43722c(0xa7))/0x6+-parseInt(_0x43722c(0xa4))/0x7*(parseInt(_0x43722c(0xbb))/0x8)+-parseInt(_0x43722c(0x9c))/0x9+parseInt(_0x43722c(0xb4))/0xa*(parseInt(_0x43722c(0x9f))/0xb);if(_0x4ce37f===_0x529e6f)break;else _0x313e60['push'](_0x313e60['shift']());}catch(_0x429355){_0x313e60['push'](_0x313e60['shift']());}}}(a31_0x1505,0x71b92));import{logger}from'../utils/logger.js';function a31_0x1505(){const _0x597482=['toLocaleString','*\x20暂无日志记录','\x20\x20\x20耗时:\x20','stringify','message','error','setLogPath','command','4589860ltKubQ','\x20\x20\x20时间:\x20','log','success','15oUHDIw','zh-CN','details','40XKtnWZ','readLogs','level','2736783ZAWgMw','*\x20日志已清空','864452UegReq','22PBiOlG','464064crAFNt','duration','timestamp','4BiwYXa','202846pbkJDL','warn','length','1816938GKvkha','keys','78657HqOVsf','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','\x20\x20\x20详情:\x20'];a31_0x1505=function(){return _0x597482;};return a31_0x1505();}function a31_0x12bb(_0x10feee,_0x5729eb){const _0x1505d5=a31_0x1505();return a31_0x12bb=function(_0x12bb1b,_0x45ed99){_0x12bb1b=_0x12bb1b-0x9a;let _0x26bfce=_0x1505d5[_0x12bb1b];return _0x26bfce;},a31_0x12bb(_0x10feee,_0x5729eb);}export function showLogs(){const _0x12b53d=a31_0x12bb;logger[_0x12b53d(0xb2)](process['cwd']());const _0x2ad07d=logger[_0x12b53d(0x9a)]();if(_0x2ad07d[_0x12b53d(0xa6)]===0x0){console[_0x12b53d(0xb6)](_0x12b53d(0xad));return;}console['log'](_0x12b53d(0xaa)),_0x2ad07d['forEach']((_0x495fa2,_0x1bee72)=>{const _0x3abe78=_0x12b53d,_0x5cc231=new Date(_0x495fa2[_0x3abe78(0xa2)])[_0x3abe78(0xac)](_0x3abe78(0xb9)),_0x2568a9=_0x495fa2['level']===_0x3abe78(0xb7)?'√':_0x495fa2[_0x3abe78(0x9b)]===_0x3abe78(0xb1)?'×':_0x495fa2[_0x3abe78(0x9b)]===_0x3abe78(0xa5)?'!':'i';console[_0x3abe78(0xb6)](_0x1bee72+0x1+'.\x20'+_0x2568a9+'\x20['+_0x495fa2[_0x3abe78(0xb3)]+']\x20'+_0x495fa2[_0x3abe78(0xb0)]),console[_0x3abe78(0xb6)](_0x3abe78(0xb5)+_0x5cc231),_0x495fa2[_0x3abe78(0xa1)]&&console[_0x3abe78(0xb6)](_0x3abe78(0xae)+_0x495fa2[_0x3abe78(0xa1)]+'ms'),_0x495fa2[_0x3abe78(0xba)]&&Object[_0x3abe78(0xa8)](_0x495fa2['details'])['length']>0x0&&console[_0x3abe78(0xb6)](_0x3abe78(0xab)+JSON[_0x3abe78(0xaf)](_0x495fa2['details'],null,0x2)),console[_0x3abe78(0xb6)]('');});}export function clearLogs(){const _0x2d7a0a=a31_0x12bb;logger[_0x2d7a0a(0xb2)](process['cwd']()),logger['clearLogs'](),console[_0x2d7a0a(0xb6)](_0x2d7a0a(0x9d));}
1
+ (function(_0x104120,_0x3f7120){const _0x21adf6=a32_0x5193,_0x30ce6b=_0x104120();while(!![]){try{const _0x82dbe=parseInt(_0x21adf6(0x176))/0x1*(parseInt(_0x21adf6(0x172))/0x2)+parseInt(_0x21adf6(0x167))/0x3+-parseInt(_0x21adf6(0x165))/0x4+parseInt(_0x21adf6(0x17b))/0x5*(parseInt(_0x21adf6(0x17e))/0x6)+parseInt(_0x21adf6(0x17f))/0x7+parseInt(_0x21adf6(0x174))/0x8*(-parseInt(_0x21adf6(0x17c))/0x9)+-parseInt(_0x21adf6(0x16b))/0xa;if(_0x82dbe===_0x3f7120)break;else _0x30ce6b['push'](_0x30ce6b['shift']());}catch(_0x52bb6e){_0x30ce6b['push'](_0x30ce6b['shift']());}}}(a32_0x2866,0x537ff));import{logger}from'../utils/logger.js';export function showLogs(){const _0x39432=a32_0x5193;logger[_0x39432(0x169)](process[_0x39432(0x173)]());const _0x435eb0=logger[_0x39432(0x164)]();if(_0x435eb0[_0x39432(0x17a)]===0x0){console['log']('*\x20暂无日志记录');return;}console[_0x39432(0x168)](_0x39432(0x171)),_0x435eb0[_0x39432(0x16e)]((_0x41aa32,_0x14064e)=>{const _0x17d3bb=_0x39432,_0x27adbb=new Date(_0x41aa32['timestamp'])['toLocaleString'](_0x17d3bb(0x16d)),_0x163e69=_0x41aa32[_0x17d3bb(0x179)]===_0x17d3bb(0x178)?'√':_0x41aa32['level']==='error'?'×':_0x41aa32[_0x17d3bb(0x179)]===_0x17d3bb(0x166)?'!':'i';console['log'](_0x14064e+0x1+'.\x20'+_0x163e69+'\x20['+_0x41aa32['command']+']\x20'+_0x41aa32[_0x17d3bb(0x16a)]),console[_0x17d3bb(0x168)]('\x20\x20\x20时间:\x20'+_0x27adbb),_0x41aa32[_0x17d3bb(0x16f)]&&console[_0x17d3bb(0x168)]('\x20\x20\x20耗时:\x20'+_0x41aa32['duration']+'ms'),_0x41aa32[_0x17d3bb(0x175)]&&Object['keys'](_0x41aa32[_0x17d3bb(0x175)])[_0x17d3bb(0x17a)]>0x0&&console['log'](_0x17d3bb(0x177)+JSON[_0x17d3bb(0x16c)](_0x41aa32[_0x17d3bb(0x175)],null,0x2)),console[_0x17d3bb(0x168)]('');});}export function clearLogs(){const _0x440758=a32_0x5193;logger[_0x440758(0x169)](process[_0x440758(0x173)]()),logger[_0x440758(0x17d)](),console['log'](_0x440758(0x170));}function a32_0x5193(_0x4d6f37,_0xd5ae69){_0x4d6f37=_0x4d6f37-0x164;const _0x28663f=a32_0x2866();let _0x51935e=_0x28663f[_0x4d6f37];return _0x51935e;}function a32_0x2866(){const _0x5c5e3d=['706zcnrwv','\x20\x20\x20详情:\x20','success','level','length','55LgHRkp','9pawbRf','clearLogs','92622BStqSs','3514707brtzFM','readLogs','821336MqCUtB','warn','1778247TRcMYE','log','setLogPath','message','8247950YxPIro','stringify','zh-CN','forEach','duration','*\x20日志已清空','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','1306RZbozs','cwd','2828248hHqTMa','details'];a32_0x2866=function(){return _0x5c5e3d;};return a32_0x2866();}
@@ -1 +1 @@
1
- function a32_0x1c21(_0x5660ec,_0xdd1887){const _0x467a18=a32_0x467a();return a32_0x1c21=function(_0x1c2131,_0x35bd07){_0x1c2131=_0x1c2131-0x127;let _0x93c8ac=_0x467a18[_0x1c2131];return _0x93c8ac;},a32_0x1c21(_0x5660ec,_0xdd1887);}(function(_0x3ba6b2,_0x1edd51){const _0x4955e3=a32_0x1c21,_0x4fdf2d=_0x3ba6b2();while(!![]){try{const _0x132bdc=-parseInt(_0x4955e3(0x13e))/0x1*(-parseInt(_0x4955e3(0x12f))/0x2)+parseInt(_0x4955e3(0x138))/0x3+parseInt(_0x4955e3(0x127))/0x4+parseInt(_0x4955e3(0x136))/0x5*(-parseInt(_0x4955e3(0x128))/0x6)+parseInt(_0x4955e3(0x143))/0x7*(-parseInt(_0x4955e3(0x130))/0x8)+parseInt(_0x4955e3(0x144))/0x9+parseInt(_0x4955e3(0x13c))/0xa;if(_0x132bdc===_0x1edd51)break;else _0x4fdf2d['push'](_0x4fdf2d['shift']());}catch(_0x52c85c){_0x4fdf2d['push'](_0x4fdf2d['shift']());}}}(a32_0x467a,0xc89fd));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a32_0x467a(){const _0x3bc418=['vite\x20preview','.bin','stderr','1633933yqOoFO','3262500vkUCEV','preview','3003324UJxOsE','4836GiNZWI','node_modules','success','close','PATH','now','info','38PcpTBd','56AwGBGt','env','message','inherit','toString','error','805PmHJid','vite','2610705vtFCXX','预览服务器启动出错','pipe','cwd','3079220RgwwGo','trim','15472IiBUMx','预览服务器启动失败'];a32_0x467a=function(){return _0x3bc418;};return a32_0x467a();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x33d7b3,_0x1d35cb)=>{const _0x367af1=a32_0x1c21,_0x1ccebe=Date['now']();logger[_0x367af1(0x12e)](_0x367af1(0x145),'启动预览服务器',{'command':'vite\x20preview'});let _0x43c26f='';const _0x3181fe=spawn(_0x367af1(0x137),[_0x367af1(0x145)],{'stdio':[_0x367af1(0x133),_0x367af1(0x133),_0x367af1(0x13a)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x367af1(0x13b)](),_0x367af1(0x129),_0x367af1(0x141))+delimiter+process[_0x367af1(0x131)][_0x367af1(0x12c)]}});_0x3181fe[_0x367af1(0x142)]?.['on']('data',_0x5553c6=>{const _0x28e8f5=_0x367af1;_0x43c26f+=_0x5553c6[_0x28e8f5(0x134)]();}),_0x3181fe['on'](_0x367af1(0x12b),_0x461b0b=>{const _0x42f807=_0x367af1,_0x1aca06=Date[_0x42f807(0x12d)]()-_0x1ccebe;if(_0x461b0b===0x0||_0x461b0b===null)logger[_0x42f807(0x12a)](_0x42f807(0x145),'预览服务器启动成功',_0x1aca06),_0x33d7b3();else{const _0x47a633={'exitCode':_0x461b0b,'duration':_0x1aca06,'command':_0x42f807(0x140),'cwd':process[_0x42f807(0x13b)]()};_0x43c26f[_0x42f807(0x13d)]()&&(_0x47a633[_0x42f807(0x142)]=_0x43c26f['trim']()),logger['error'](_0x42f807(0x145),_0x42f807(0x13f),_0x47a633),_0x1d35cb(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x461b0b));}}),_0x3181fe['on'](_0x367af1(0x135),_0x4d7d01=>{const _0x5b9b35=_0x367af1,_0x4eacb1=Date['now']()-_0x1ccebe;logger[_0x5b9b35(0x135)](_0x5b9b35(0x145),_0x5b9b35(0x139),{'error':_0x4d7d01[_0x5b9b35(0x132)],'duration':_0x4eacb1,'stderr':_0x43c26f[_0x5b9b35(0x13d)]()||undefined}),_0x1d35cb(_0x4d7d01);});});}
1
+ (function(_0x4f3b3a,_0x33c8e4){const _0x4aa2f2=a33_0x1467,_0x5c9e7d=_0x4f3b3a();while(!![]){try{const _0x570eaa=parseInt(_0x4aa2f2(0xc6))/0x1+parseInt(_0x4aa2f2(0xbe))/0x2+parseInt(_0x4aa2f2(0xbc))/0x3+-parseInt(_0x4aa2f2(0xba))/0x4+-parseInt(_0x4aa2f2(0xb0))/0x5+parseInt(_0x4aa2f2(0xc7))/0x6+-parseInt(_0x4aa2f2(0xc2))/0x7;if(_0x570eaa===_0x33c8e4)break;else _0x5c9e7d['push'](_0x5c9e7d['shift']());}catch(_0x299b96){_0x5c9e7d['push'](_0x5c9e7d['shift']());}}}(a33_0x127a,0xa287f));import{delimiter,join}from'node:path';function a33_0x1467(_0x2b12b0,_0x429341){_0x2b12b0=_0x2b12b0-0xb0;const _0x127a51=a33_0x127a();let _0x146763=_0x127a51[_0x2b12b0];return _0x146763;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x6202a4,_0x4d4948)=>{const _0x1c2261=a33_0x1467,_0x461eda=Date['now']();logger[_0x1c2261(0xc1)]('preview',_0x1c2261(0xb8),{'command':_0x1c2261(0xb5)});let _0x47a128='';const _0x225bfb=spawn('vite',[_0x1c2261(0xb3)],{'stdio':[_0x1c2261(0xb6),_0x1c2261(0xb6),_0x1c2261(0xb1)],'shell':!![],'env':{...process[_0x1c2261(0xbf)],'PATH':''+join(process[_0x1c2261(0xc8)](),_0x1c2261(0xc4),_0x1c2261(0xca))+delimiter+process[_0x1c2261(0xbf)][_0x1c2261(0xb2)]}});_0x225bfb[_0x1c2261(0xbb)]?.['on'](_0x1c2261(0xbd),_0x17c3bc=>{const _0xe32880=_0x1c2261;_0x47a128+=_0x17c3bc[_0xe32880(0xb4)]();}),_0x225bfb['on']('close',_0x293eac=>{const _0x1b2d6a=_0x1c2261,_0x9e9aa4=Date[_0x1b2d6a(0xc9)]()-_0x461eda;if(_0x293eac===0x0||_0x293eac===null)logger['success'](_0x1b2d6a(0xb3),'预览服务器启动成功',_0x9e9aa4),_0x6202a4();else{const _0x560df8={'exitCode':_0x293eac,'duration':_0x9e9aa4,'command':_0x1b2d6a(0xb5),'cwd':process[_0x1b2d6a(0xc8)]()};_0x47a128['trim']()&&(_0x560df8[_0x1b2d6a(0xbb)]=_0x47a128[_0x1b2d6a(0xb9)]()),logger[_0x1b2d6a(0xc5)](_0x1b2d6a(0xb3),'预览服务器启动失败',_0x560df8),_0x4d4948(new Error(_0x1b2d6a(0xc3)+_0x293eac));}}),_0x225bfb['on']('error',_0x13da69=>{const _0x14c31b=_0x1c2261,_0x5d8bbe=Date[_0x14c31b(0xc9)]()-_0x461eda;logger[_0x14c31b(0xc5)](_0x14c31b(0xb3),_0x14c31b(0xb7),{'error':_0x13da69[_0x14c31b(0xc0)],'duration':_0x5d8bbe,'stderr':_0x47a128['trim']()||undefined}),_0x4d4948(_0x13da69);});});}function a33_0x127a(){const _0x239ac5=['3936065eMwrnc','pipe','PATH','preview','toString','vite\x20preview','inherit','预览服务器启动出错','启动预览服务器','trim','3050592pbPMic','stderr','1764960kFBKTM','data','1017100DnXJSP','env','message','info','8514758PNNqEc','vite\x20preview\x20exited\x20with\x20code\x20','node_modules','error','1317976CSgWFJ','6102816jJljBs','cwd','now','.bin'];a33_0x127a=function(){return _0x239ac5;};return a33_0x127a();}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x358889,_0x48836c){const _0x294176=a33_0x1bbe,_0x344725=_0x358889();while(!![]){try{const _0x5f08fe=parseInt(_0x294176(0xb5))/0x1+-parseInt(_0x294176(0xb1))/0x2*(parseInt(_0x294176(0xc6))/0x3)+-parseInt(_0x294176(0xcd))/0x4*(-parseInt(_0x294176(0xc4))/0x5)+-parseInt(_0x294176(0xc0))/0x6*(parseInt(_0x294176(0xcb))/0x7)+parseInt(_0x294176(0xbe))/0x8*(parseInt(_0x294176(0xce))/0x9)+parseInt(_0x294176(0xb6))/0xa+parseInt(_0x294176(0xb3))/0xb;if(_0x5f08fe===_0x48836c)break;else _0x344725['push'](_0x344725['shift']());}catch(_0x274a53){_0x344725['push'](_0x344725['shift']());}}}(a33_0x2b53,0xe0d57));function a33_0x1bbe(_0x14257d,_0x42abac){const _0x2b5301=a33_0x2b53();return a33_0x1bbe=function(_0x1bbea6,_0x9696d6){_0x1bbea6=_0x1bbea6-0xae;let _0x4f0b8b=_0x2b5301[_0x1bbea6];return _0x4f0b8b;},a33_0x1bbe(_0x14257d,_0x42abac);}function a33_0x2b53(){const _0x15a287=['data','now','info','close','8GHWZVb','pipe','10812036CGKrIV','cwd','trim','inherit','539160hetyfi','stderr','4978245cFRRVj','node_modules','message','开发服务器启动成功','vite','7FLojnp','env','48bdiQPS','11026413XqNOcs','toString','.bin','write','start','2LDepYV','启动开发服务器','2770240OSddiz','PATH','717343imYiMB','8940160cKXqDp','vite\x20exited\x20with\x20code\x20','开发服务器启动失败','error'];a33_0x2b53=function(){return _0x15a287;};return a33_0x2b53();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x2b33d9){return new Promise((_0x1c4ba2,_0x28630c)=>{const _0x4684b3=a33_0x1bbe,_0x496db2=Date['now'](),_0x1900ad=_0x2b33d9||process[_0x4684b3(0xc1)]();logger[_0x4684b3(0xbc)]('start',_0x4684b3(0xb2),{'command':_0x4684b3(0xca),'cwd':_0x1900ad});let _0x1bdf20='';const _0x2f730f=spawn('vite',{'stdio':[_0x4684b3(0xc3),'inherit',_0x4684b3(0xbf)],'shell':!![],'cwd':_0x1900ad,'env':{...process[_0x4684b3(0xcc)],'PATH':''+join(_0x1900ad,_0x4684b3(0xc7),_0x4684b3(0xae))+delimiter+process[_0x4684b3(0xcc)][_0x4684b3(0xb4)]}});_0x2f730f[_0x4684b3(0xc5)]?.['on'](_0x4684b3(0xba),_0x518d5b=>{const _0xac9dd1=_0x4684b3,_0x35da87=_0x518d5b[_0xac9dd1(0xcf)]();_0x1bdf20+=_0x35da87,process[_0xac9dd1(0xc5)][_0xac9dd1(0xaf)](_0x35da87);}),_0x2f730f['on'](_0x4684b3(0xbd),_0x4575b7=>{const _0x495eb7=_0x4684b3,_0x1ec8bf=Date[_0x495eb7(0xbb)]()-_0x496db2;if(_0x4575b7===0x0||_0x4575b7===null)logger['success'](_0x495eb7(0xb0),_0x495eb7(0xc9),_0x1ec8bf),_0x1c4ba2();else{const _0x4e89c0={'exitCode':_0x4575b7,'duration':_0x1ec8bf,'command':_0x495eb7(0xca),'cwd':_0x1900ad};_0x1bdf20[_0x495eb7(0xc2)]()&&(_0x4e89c0[_0x495eb7(0xc5)]=_0x1bdf20[_0x495eb7(0xc2)]()),logger['error'](_0x495eb7(0xb0),_0x495eb7(0xb8),_0x4e89c0),_0x28630c(new Error(_0x495eb7(0xb7)+_0x4575b7));}}),_0x2f730f['on'](_0x4684b3(0xb9),_0x16919e=>{const _0x781649=_0x4684b3,_0x578085=Date[_0x781649(0xbb)]()-_0x496db2,_0x4a9eca={'error':_0x16919e[_0x781649(0xc8)],'duration':_0x578085,'command':_0x781649(0xca),'cwd':_0x1900ad};_0x1bdf20['trim']()&&(_0x4a9eca[_0x781649(0xc5)]=_0x1bdf20[_0x781649(0xc2)]()),logger[_0x781649(0xb9)](_0x781649(0xb0),'开发服务器启动出错',_0x4a9eca),_0x28630c(_0x16919e);});});}
1
+ (function(_0x5a0ae8,_0x1a2231){const _0x3edd7a=a34_0x2a8f,_0x4d568c=_0x5a0ae8();while(!![]){try{const _0x12a848=parseInt(_0x3edd7a(0x1d9))/0x1*(-parseInt(_0x3edd7a(0x1c5))/0x2)+parseInt(_0x3edd7a(0x1d1))/0x3*(parseInt(_0x3edd7a(0x1cf))/0x4)+-parseInt(_0x3edd7a(0x1d2))/0x5*(-parseInt(_0x3edd7a(0x1da))/0x6)+parseInt(_0x3edd7a(0x1c8))/0x7+parseInt(_0x3edd7a(0x1dc))/0x8*(parseInt(_0x3edd7a(0x1dd))/0x9)+parseInt(_0x3edd7a(0x1be))/0xa+parseInt(_0x3edd7a(0x1d5))/0xb*(-parseInt(_0x3edd7a(0x1df))/0xc);if(_0x12a848===_0x1a2231)break;else _0x4d568c['push'](_0x4d568c['shift']());}catch(_0x548345){_0x4d568c['push'](_0x4d568c['shift']());}}}(a34_0x1bee,0x1b7d0));function a34_0x2a8f(_0x490e6c,_0x55e9ed){_0x490e6c=_0x490e6c-0x1be;const _0x1bee79=a34_0x1bee();let _0x2a8fa7=_0x1bee79[_0x490e6c];return _0x2a8fa7;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a34_0x1bee(){const _0x584115=['write','11sXOcxQ','info','PATH','SDK\x20版本低于推荐版本','681LKCtTa','6NlBuRb','pipe','616qmnWdX','9729xAAqQl','toString','3988920qIDxYs','vite\x20exited\x20with\x20code\x20','cwd','429140OpMASE','start','error','warn','needsUpgrade','.bin','env','604CvBXJs','vite','开发服务器启动成功','864661yhgrhn','success','message','version','trim','now','stderr','4cqOnks','启动开发服务器','547143Khywym','1093045lCJNce','inherit'];a34_0x1bee=function(){return _0x584115;};return a34_0x1bee();}import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x3a476e){return new Promise((_0x128d1c,_0x670e60)=>{const _0x3149c2=a34_0x2a8f,_0x146143=Date[_0x3149c2(0x1cd)](),_0x189fe9=_0x3a476e||process[_0x3149c2(0x1e1)](),_0x1a61a2=checkSdkVersion(_0x189fe9);_0x1a61a2[_0x3149c2(0x1c2)]&&(printSdkUpgradeWarning(_0x1a61a2),logger[_0x3149c2(0x1c1)](_0x3149c2(0x1bf),_0x3149c2(0x1d8),{'currentVersion':_0x1a61a2[_0x3149c2(0x1cb)],'minVersion':_0x1a61a2['minVersion']}));logger[_0x3149c2(0x1d6)](_0x3149c2(0x1bf),_0x3149c2(0x1d0),{'command':_0x3149c2(0x1c6),'cwd':_0x189fe9});let _0xe5b4c8='';const _0x254ebc=spawn(_0x3149c2(0x1c6),{'stdio':['inherit',_0x3149c2(0x1d3),_0x3149c2(0x1db)],'shell':!![],'cwd':_0x189fe9,'env':{...process[_0x3149c2(0x1c4)],'PATH':''+join(_0x189fe9,'node_modules',_0x3149c2(0x1c3))+delimiter+process[_0x3149c2(0x1c4)][_0x3149c2(0x1d7)]}});_0x254ebc[_0x3149c2(0x1ce)]?.['on']('data',_0x488e8b=>{const _0x58097f=_0x3149c2,_0x1b1aa2=_0x488e8b[_0x58097f(0x1de)]();_0xe5b4c8+=_0x1b1aa2,process['stderr'][_0x58097f(0x1d4)](_0x1b1aa2);}),_0x254ebc['on']('close',_0x5477c1=>{const _0x4687a5=_0x3149c2,_0x525eeb=Date[_0x4687a5(0x1cd)]()-_0x146143;if(_0x5477c1===0x0||_0x5477c1===null)logger[_0x4687a5(0x1c9)](_0x4687a5(0x1bf),_0x4687a5(0x1c7),_0x525eeb),_0x128d1c();else{const _0x7d320e={'exitCode':_0x5477c1,'duration':_0x525eeb,'command':_0x4687a5(0x1c6),'cwd':_0x189fe9};_0xe5b4c8[_0x4687a5(0x1cc)]()&&(_0x7d320e[_0x4687a5(0x1ce)]=_0xe5b4c8[_0x4687a5(0x1cc)]()),logger[_0x4687a5(0x1c0)](_0x4687a5(0x1bf),'开发服务器启动失败',_0x7d320e),_0x670e60(new Error(_0x4687a5(0x1e0)+_0x5477c1));}}),_0x254ebc['on'](_0x3149c2(0x1c0),_0x4f77b2=>{const _0x43af9a=_0x3149c2,_0x16c085=Date['now']()-_0x146143,_0x1b890b={'error':_0x4f77b2[_0x43af9a(0x1ca)],'duration':_0x16c085,'command':'vite','cwd':_0x189fe9};_0xe5b4c8[_0x43af9a(0x1cc)]()&&(_0x1b890b[_0x43af9a(0x1ce)]=_0xe5b4c8[_0x43af9a(0x1cc)]()),logger[_0x43af9a(0x1c0)]('start','开发服务器启动出错',_0x1b890b),_0x670e60(_0x4f77b2);});});}