@lovrabet/cli 1.2.4 → 1.2.5-beta.1

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 (88) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  16. package/lib/app-menu/utils.js +1 -1
  17. package/lib/app-menu/valid-url.js +1 -1
  18. package/lib/app-menu-update-cdn/current-content.js +1 -1
  19. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  20. package/lib/app-menu-update-cdn/main.js +1 -1
  21. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  22. package/lib/auth/auth-server-ui.js +1 -1
  23. package/lib/auth/auth-server.js +1 -1
  24. package/lib/auth/constant.js +1 -1
  25. package/lib/auth/get-cookie.js +1 -1
  26. package/lib/auth/is-session-valid.js +1 -1
  27. package/lib/auth/logout.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start.js +1 -1
  34. package/lib/config/config-help.js +1 -1
  35. package/lib/config/main.js +1 -1
  36. package/lib/constant/domain.js +1 -1
  37. package/lib/constant/env.js +1 -1
  38. package/lib/create-app/enhanced-guided-create.js +1 -1
  39. package/lib/create-app/format-elapsed.js +1 -1
  40. package/lib/create-app/main.js +1 -1
  41. package/lib/create-app/task-finished.js +1 -1
  42. package/lib/create-app/task-loading.js +1 -1
  43. package/lib/create-app/task-running.js +1 -1
  44. package/lib/create-app/task-time.js +1 -1
  45. package/lib/create-app/use-copy-project-template.js +1 -1
  46. package/lib/create-app/use-format-code.js +1 -1
  47. package/lib/create-app/use-install-dependencies.js +1 -1
  48. package/lib/help.js +1 -1
  49. package/lib/init/main.js +1 -1
  50. package/lib/mcp/claude.js +1 -0
  51. package/lib/mcp/cursor.js +1 -1
  52. package/lib/mcp/main.js +1 -1
  53. package/lib/skills/main.js +1 -0
  54. package/lib/utils/check-sdk-version.js +1 -1
  55. package/lib/utils/config.js +1 -1
  56. package/lib/utils/copy-directory.js +1 -1
  57. package/lib/utils/http-client.js +1 -1
  58. package/lib/utils/logger.js +1 -1
  59. package/lib/utils/router-updater.js +1 -1
  60. package/lib/utils/sleep.js +1 -1
  61. package/lib/utils/template-replacer.js +1 -1
  62. package/package.json +1 -1
  63. package/templates/projects/sub-app-react-demo/index.html +22 -34
  64. package/templates/projects/sub-app-react-demo/public/logo.svg +1 -0
  65. package/templates/projects/sub-app-react-demo/src/api/api.ts +1 -1
  66. package/templates/projects/sub-app-react-demo/src/api/client.ts +1 -1
  67. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +44 -71
  68. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +387 -927
  69. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +1 -1
  70. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +293 -0
  71. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +100 -414
  72. package/templates/projects/sub-app-react-demo/src/style.css +21 -15
  73. package/templates/projects/sub-app-react-demo/vite.config.ts +18 -13
  74. package/templates/rules/lovrabet_rules.mdc.tpl +636 -43
  75. package/templates/skills/.claude/skills/lovrabet/SKILL.md +257 -0
  76. package/templates/skills/.cursor/commands/lovrabet.md +247 -0
  77. package/templates/skills/.cursorrules +109 -0
  78. package/templates/skills/.shared/README.md +45 -0
  79. package/templates/skills/.shared/guides/01-filter-query/guide.md +300 -0
  80. package/templates/skills/.shared/guides/02-mcp-sql-workflow/guide.md +272 -0
  81. package/templates/skills/.shared/guides/03-antd-style/guide.md +227 -0
  82. package/templates/skills/.shared/guides/04-troubleshooting/guide.md +426 -0
  83. package/templates/skills/.shared/guides/05-api-integration/guide.md +327 -0
  84. package/templates/skills/.shared/guides/06-menu-management/guide.md +305 -0
  85. package/templates/skills/.windsurf/workflows/lovrabet.md +256 -0
  86. package/templates/projects/sub-app-react-demo/.vscode/extensions.json +0 -3
  87. package/templates/projects/sub-app-react-demo/.vscode/settings.json +0 -57
  88. package/templates/projects/sub-app-react-demo/src/pages/intro/index.tsx +0 -560
@@ -1 +1 @@
1
- (function(_0x1488d4,_0x340713){const _0x584309=a11_0x2c9a,_0x54d4f1=_0x1488d4();while(!![]){try{const _0x6b3aa9=parseInt(_0x584309(0x126))/0x1+parseInt(_0x584309(0x118))/0x2+-parseInt(_0x584309(0x128))/0x3*(parseInt(_0x584309(0x11d))/0x4)+parseInt(_0x584309(0x10f))/0x5*(parseInt(_0x584309(0x10d))/0x6)+parseInt(_0x584309(0x11f))/0x7*(-parseInt(_0x584309(0x109))/0x8)+parseInt(_0x584309(0xfe))/0x9+parseInt(_0x584309(0x123))/0xa;if(_0x6b3aa9===_0x340713)break;else _0x54d4f1['push'](_0x54d4f1['shift']());}catch(_0x6d8251){_0x54d4f1['push'](_0x54d4f1['shift']());}}}(a11_0x478e,0x1ebbb));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a11_0x478e(){const _0x3add2e=['25583CCEHXx','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','27YvRjTb','正在创建菜单:\x20','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','resources','info','13149hqpOkP','all','create-menu','status','path','未提供应用AppCode,且配置中也没有默认值','0011','import','label','errorCode','创建菜单成功:','1186936GeLasX','开始批量创建菜单,共\x20','创建菜单失败:\x20','未知错误','525558drLkYz','errorMsg','5vMgDqU','error','procode','POST','length','create-menus','/smartapi/menu/create','success','appcode','79800ORmRFu','application/json','!\x20请使用以下方式之一:','创建菜单失败,HTTP状态码:\x20','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','97892QGvJIG','log','7nkkVAf','stringify','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','map','3399700YkDlIo','includes','批量创建菜单完成,共\x20'];a11_0x478e=function(){return _0x3add2e;};return a11_0x478e();}const config=readConfig();function a11_0x2c9a(_0x32c1cc,_0xa84e1f){_0x32c1cc=_0x32c1cc-0xfa;const _0x478e4e=a11_0x478e();let _0x2c9a61=_0x478e4e[_0x32c1cc];return _0x2c9a61;}export async function createMenu(_0xdcfb5c){const _0x341759=a11_0x2c9a,_0x2541ad=config?.['appcode'];if(!_0x2541ad){const _0x222cb1='未提供应用AppCode,且配置中也没有默认值';logger['error']('create-menu',_0x222cb1),console[_0x341759(0x110)]('×\x20'+_0x222cb1),console[_0x341759(0x11e)](_0x341759(0x11a)),console[_0x341759(0x11e)](_0x341759(0x127)),console[_0x341759(0x11e)](_0x341759(0x121));return;}logger[_0x341759(0xfd)](_0x341759(0x100),_0x341759(0xfa)+_0xdcfb5c[_0x341759(0x106)]+'\x20('+_0xdcfb5c[_0x341759(0x102)]+')');const _0x2fbdc8={'appCode':_0x2541ad,'type':_0x341759(0x111),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0xdcfb5c[_0x341759(0xfc)]?JSON[_0x341759(0x120)](_0xdcfb5c[_0x341759(0xfc)]):undefined},..._0xdcfb5c},_0x2450bf=await fetch(getApiDomain()+_0x341759(0x115),{'method':_0x341759(0x112),'body':JSON[_0x341759(0x120)](_0x2fbdc8),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2450bf['ok']){if(_0x2450bf[_0x341759(0x101)]===0x191){const _0x1f129b=_0x341759(0x11c);logger['error'](_0x341759(0x100),_0x1f129b,{'status':_0x2450bf[_0x341759(0x101)],'menu':_0xdcfb5c[_0x341759(0x106)]});throw new Error(_0x1f129b);}const _0x44bb61=_0x341759(0x11b)+_0x2450bf[_0x341759(0x101)];logger['error'](_0x341759(0x100),_0x44bb61,{'menu':_0xdcfb5c[_0x341759(0x106)]});throw new Error(_0x44bb61);}const _0x74a837=await _0x2450bf['json']();if(!_0x74a837['success']){const _0x48b256=_0x341759(0x10b)+(_0x74a837[_0x341759(0x10e)]||_0x341759(0x10c));logger[_0x341759(0x110)](_0x341759(0x100),_0x48b256,{'errorCode':_0x74a837[_0x341759(0x107)],'errorMsg':_0x74a837['errorMsg'],'menu':_0xdcfb5c[_0x341759(0x106)]});throw new Error(_0x48b256);}logger[_0x341759(0xfd)](_0x341759(0x100),'菜单创建成功:\x20'+_0xdcfb5c[_0x341759(0x106)],_0x74a837['data']),console[_0x341759(0x11e)](_0x341759(0x108),_0x74a837['data']);}async function _createMenu(_0x2e8bdb,_0x107bf5){const _0x127384=a11_0x2c9a,_0x54baba=config?.[_0x127384(0x117)];if(!_0x54baba){const _0x15f0e2=_0x127384(0x103);logger[_0x127384(0x110)](_0x127384(0x100),_0x15f0e2),console[_0x127384(0x110)]('×\x20'+_0x15f0e2),console[_0x127384(0x11e)](_0x127384(0x11a)),console[_0x127384(0x11e)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x127384(0x11e)](_0x127384(0x121));return;}const _0x42438f={'appCode':_0x54baba,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x127384(0x105),'resources':_0x107bf5?JSON[_0x127384(0x120)](_0x107bf5):undefined},'label':_0x2e8bdb[_0x127384(0x106)],'path':_0x2e8bdb[_0x127384(0x102)]},_0x289840=await fetch(getApiDomain()+_0x127384(0x115),{'method':_0x127384(0x112),'body':JSON['stringify'](_0x42438f),'headers':{'Content-Type':_0x127384(0x119),'Cookie':getCookie()}});if(!_0x289840['ok']){if(_0x289840[_0x127384(0x101)]===0x191){const _0xd77c81=_0x127384(0x11c);logger['error'](_0x127384(0x100),_0xd77c81,{'status':_0x289840['status'],'menu':_0x2e8bdb[_0x127384(0x106)]});throw new Error(_0xd77c81);}const _0x51eddf=_0x127384(0x11b)+_0x289840[_0x127384(0x101)];logger[_0x127384(0x110)](_0x127384(0x100),_0x51eddf,{'menu':_0x2e8bdb[_0x127384(0x106)]});throw new Error(_0x51eddf);}const _0x51770f=await _0x289840['json']();if(!_0x51770f[_0x127384(0x116)]){if(_0x51770f[_0x127384(0x107)]===_0x127384(0x104)||_0x51770f[_0x127384(0x10e)]?.[_0x127384(0x124)]('登录')){const _0x82640=_0x127384(0xfb);logger[_0x127384(0x110)](_0x127384(0x100),_0x82640,{'errorCode':_0x51770f[_0x127384(0x107)],'errorMsg':_0x51770f[_0x127384(0x10e)],'menu':_0x2e8bdb[_0x127384(0x106)]});throw new Error(_0x82640);}const _0x13e914=_0x127384(0x10b)+(_0x51770f[_0x127384(0x10e)]||_0x127384(0x10c));logger['error'](_0x127384(0x100),_0x13e914,{'errorCode':_0x51770f[_0x127384(0x107)],'errorMsg':_0x51770f[_0x127384(0x10e)],'menu':_0x2e8bdb['label']});throw new Error(_0x13e914);}logger['info'](_0x127384(0x100),'菜单创建成功:\x20'+_0x2e8bdb[_0x127384(0x106)]);}export async function createMenus(_0xd31e3d,_0x484fca){const _0x1dda34=a11_0x2c9a;logger['info']('create-menus',_0x1dda34(0x10a)+_0xd31e3d['length']+'\x20个'),await Promise[_0x1dda34(0xff)](_0xd31e3d[_0x1dda34(0x122)](async _0x495abf=>{await _createMenu(_0x495abf,_0x484fca);})),logger['info'](_0x1dda34(0x114),_0x1dda34(0x125)+_0xd31e3d[_0x1dda34(0x113)]+'\x20个');}
1
+ function a11_0x70cb(){const _0x54b459=['appcode','!\x20请使用以下方式之一:','7173neUCEU','errorCode','procode','正在创建菜单:\x20','创建菜单成功:','创建菜单失败:\x20','5170116WFtDtG','开始批量创建菜单,共\x20','6WXKCsA','status','stringify','批量创建菜单完成,共\x20','12fuZSrl','log','2UPhVMo','create-menus','length','未知错误','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','success','2480735cBTzkl','import','0011','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','error','info','resources','path','14440RtAeoP','json','菜单创建成功:\x20','创建菜单失败,HTTP状态码:\x20','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','errorMsg','4860900yhSEwL','1305332sxsWMa','302828ezRhnR','create-menu','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','application/json','data','label','/smartapi/menu/create','POST','33757262WVYyDO','未提供应用AppCode,且配置中也没有默认值'];a11_0x70cb=function(){return _0x54b459;};return a11_0x70cb();}function a11_0x5505(_0x49849b,_0x4a5895){_0x49849b=_0x49849b-0x1bc;const _0x70cb89=a11_0x70cb();let _0x550541=_0x70cb89[_0x49849b];return _0x550541;}(function(_0xece498,_0x51855b){const _0x628ce=a11_0x5505,_0x2ea5a1=_0xece498();while(!![]){try{const _0x382266=-parseInt(_0x628ce(0x1cd))/0x1*(parseInt(_0x628ce(0x1e3))/0x2)+parseInt(_0x628ce(0x1cb))/0x3*(-parseInt(_0x628ce(0x1e2))/0x4)+-parseInt(_0x628ce(0x1d3))/0x5*(parseInt(_0x628ce(0x1c7))/0x6)+parseInt(_0x628ce(0x1c5))/0x7+-parseInt(_0x628ce(0x1db))/0x8*(parseInt(_0x628ce(0x1bf))/0x9)+parseInt(_0x628ce(0x1e1))/0xa+parseInt(_0x628ce(0x1eb))/0xb;if(_0x382266===_0x51855b)break;else _0x2ea5a1['push'](_0x2ea5a1['shift']());}catch(_0x5ce93d){_0x2ea5a1['push'](_0x2ea5a1['shift']());}}}(a11_0x70cb,0xb7424));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(_0x133deb){const _0x31afc4=a11_0x5505,_0x5a46c3=config?.['appcode'];if(!_0x5a46c3){const _0x159bf2='未提供应用AppCode,且配置中也没有默认值';logger['error'](_0x31afc4(0x1e4),_0x159bf2),console[_0x31afc4(0x1d7)]('×\x20'+_0x159bf2),console['log']('!\x20请使用以下方式之一:'),console[_0x31afc4(0x1cc)](_0x31afc4(0x1d6)),console[_0x31afc4(0x1cc)](_0x31afc4(0x1e5));return;}logger[_0x31afc4(0x1d8)](_0x31afc4(0x1e4),_0x31afc4(0x1c2)+_0x133deb[_0x31afc4(0x1e8)]+'\x20('+_0x133deb[_0x31afc4(0x1da)]+')');const _0x442c01={'appCode':_0x5a46c3,'type':_0x31afc4(0x1c1),'sort':0x0,'extend':{'loadScriptMode':_0x31afc4(0x1d4),'resources':_0x133deb[_0x31afc4(0x1d9)]?JSON['stringify'](_0x133deb['resources']):undefined},..._0x133deb},_0x385847=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x31afc4(0x1ea),'body':JSON[_0x31afc4(0x1c9)](_0x442c01),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x385847['ok']){if(_0x385847['status']===0x191){const _0x1364c7=_0x31afc4(0x1d1);logger['error']('create-menu',_0x1364c7,{'status':_0x385847[_0x31afc4(0x1c8)],'menu':_0x133deb['label']});throw new Error(_0x1364c7);}const _0xffc077=_0x31afc4(0x1de)+_0x385847[_0x31afc4(0x1c8)];logger[_0x31afc4(0x1d7)](_0x31afc4(0x1e4),_0xffc077,{'menu':_0x133deb['label']});throw new Error(_0xffc077);}const _0x16767f=await _0x385847['json']();if(!_0x16767f[_0x31afc4(0x1d2)]){const _0x2a3ac4='创建菜单失败:\x20'+(_0x16767f['errorMsg']||_0x31afc4(0x1d0));logger[_0x31afc4(0x1d7)](_0x31afc4(0x1e4),_0x2a3ac4,{'errorCode':_0x16767f[_0x31afc4(0x1c0)],'errorMsg':_0x16767f[_0x31afc4(0x1e0)],'menu':_0x133deb[_0x31afc4(0x1e8)]});throw new Error(_0x2a3ac4);}logger[_0x31afc4(0x1d8)]('create-menu',_0x31afc4(0x1dd)+_0x133deb[_0x31afc4(0x1e8)],_0x16767f[_0x31afc4(0x1e7)]),console[_0x31afc4(0x1cc)](_0x31afc4(0x1c3),_0x16767f[_0x31afc4(0x1e7)]);}async function _createMenu(_0xfef91e,_0x464459){const _0x55fa7a=a11_0x5505,_0x1e2685=config?.[_0x55fa7a(0x1bd)];if(!_0x1e2685){const _0x294888=_0x55fa7a(0x1bc);logger[_0x55fa7a(0x1d7)](_0x55fa7a(0x1e4),_0x294888),console[_0x55fa7a(0x1d7)]('×\x20'+_0x294888),console[_0x55fa7a(0x1cc)](_0x55fa7a(0x1be)),console[_0x55fa7a(0x1cc)](_0x55fa7a(0x1d6)),console['log'](_0x55fa7a(0x1e5));return;}const _0x3781df={'appCode':_0x1e2685,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x55fa7a(0x1d4),'resources':_0x464459?JSON['stringify'](_0x464459):undefined},'label':_0xfef91e['label'],'path':_0xfef91e[_0x55fa7a(0x1da)]},_0x14a2d8=await fetch(getApiDomain()+_0x55fa7a(0x1e9),{'method':_0x55fa7a(0x1ea),'body':JSON[_0x55fa7a(0x1c9)](_0x3781df),'headers':{'Content-Type':_0x55fa7a(0x1e6),'Cookie':getCookie()}});if(!_0x14a2d8['ok']){if(_0x14a2d8['status']===0x191){const _0x4e1bf1=_0x55fa7a(0x1d1);logger[_0x55fa7a(0x1d7)](_0x55fa7a(0x1e4),_0x4e1bf1,{'status':_0x14a2d8[_0x55fa7a(0x1c8)],'menu':_0xfef91e['label']});throw new Error(_0x4e1bf1);}const _0x4c5c86='创建菜单失败,HTTP状态码:\x20'+_0x14a2d8[_0x55fa7a(0x1c8)];logger[_0x55fa7a(0x1d7)](_0x55fa7a(0x1e4),_0x4c5c86,{'menu':_0xfef91e['label']});throw new Error(_0x4c5c86);}const _0x3ed65a=await _0x14a2d8[_0x55fa7a(0x1dc)]();if(!_0x3ed65a['success']){if(_0x3ed65a[_0x55fa7a(0x1c0)]===_0x55fa7a(0x1d5)||_0x3ed65a[_0x55fa7a(0x1e0)]?.['includes']('登录')){const _0x37a9ee=_0x55fa7a(0x1df);logger['error'](_0x55fa7a(0x1e4),_0x37a9ee,{'errorCode':_0x3ed65a[_0x55fa7a(0x1c0)],'errorMsg':_0x3ed65a['errorMsg'],'menu':_0xfef91e['label']});throw new Error(_0x37a9ee);}const _0x39800e=_0x55fa7a(0x1c4)+(_0x3ed65a[_0x55fa7a(0x1e0)]||_0x55fa7a(0x1d0));logger[_0x55fa7a(0x1d7)](_0x55fa7a(0x1e4),_0x39800e,{'errorCode':_0x3ed65a['errorCode'],'errorMsg':_0x3ed65a['errorMsg'],'menu':_0xfef91e[_0x55fa7a(0x1e8)]});throw new Error(_0x39800e);}logger[_0x55fa7a(0x1d8)](_0x55fa7a(0x1e4),_0x55fa7a(0x1dd)+_0xfef91e[_0x55fa7a(0x1e8)]);}export async function createMenus(_0x5e2833,_0x16506a){const _0x32a5bf=a11_0x5505;logger[_0x32a5bf(0x1d8)](_0x32a5bf(0x1ce),_0x32a5bf(0x1c6)+_0x5e2833[_0x32a5bf(0x1cf)]+'\x20个'),await Promise['all'](_0x5e2833['map'](async _0x5960d2=>{await _createMenu(_0x5960d2,_0x16506a);})),logger['info'](_0x32a5bf(0x1ce),_0x32a5bf(0x1ca)+_0x5e2833[_0x32a5bf(0x1cf)]+'\x20个');}
@@ -1 +1 @@
1
- const a12_0x33e185=a12_0x5049;(function(_0x5cb19f,_0x2c19f5){const _0x5754b0=a12_0x5049,_0x2df60e=_0x5cb19f();while(!![]){try{const _0x30a567=-parseInt(_0x5754b0(0x12b))/0x1*(-parseInt(_0x5754b0(0x128))/0x2)+-parseInt(_0x5754b0(0x125))/0x3+parseInt(_0x5754b0(0x129))/0x4+-parseInt(_0x5754b0(0x11f))/0x5*(-parseInt(_0x5754b0(0x12e))/0x6)+-parseInt(_0x5754b0(0x121))/0x7+-parseInt(_0x5754b0(0x12d))/0x8*(parseInt(_0x5754b0(0x122))/0x9)+parseInt(_0x5754b0(0x12a))/0xa;if(_0x30a567===_0x2c19f5)break;else _0x2df60e['push'](_0x2df60e['shift']());}catch(_0x350a5e){_0x2df60e['push'](_0x2df60e['shift']());}}}(a12_0x3137,0xbd478));import{readdirSync,statSync,readFileSync}from'fs';function a12_0x5049(_0x1c0d6a,_0x25522b){_0x1c0d6a=_0x1c0d6a-0x118;const _0x313769=a12_0x3137();let _0x50495f=_0x313769[_0x1c0d6a];return _0x50495f;}import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x33e185(0x124)](),'src/pages');export function extractTitleFromComment(_0x1b1748){const _0x53f8ec=a12_0x33e185;try{const _0x4b2019=readFileSync(_0x1b1748,_0x53f8ec(0x11b)),_0x458c8f=_0x4b2019[_0x53f8ec(0x11a)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x458c8f&&_0x458c8f[0x1]){const _0x3a5a02=_0x458c8f[0x1],_0x5e0410=_0x3a5a02[_0x53f8ec(0x11a)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5e0410&&_0x5e0410[0x1])return _0x5e0410[0x1][_0x53f8ec(0x12c)]();}let _0x1ad592=null;const _0x186af4=_0x4b2019[_0x53f8ec(0x11a)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x186af4&&_0x186af4[0x1]&&(_0x1ad592=_0x186af4[0x1]);if(!_0x1ad592){const _0x6817d2=_0x4b2019[_0x53f8ec(0x11a)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x6817d2&&_0x6817d2[0x1]&&(_0x1ad592=_0x6817d2[0x1]);}if(_0x1ad592){const _0xc7c190=new RegExp('\x5cb'+_0x1ad592+_0x53f8ec(0x119)),_0x3d9338=_0x4b2019['match'](_0xc7c190);if(_0x3d9338&&_0x3d9338[0x1])return _0x3d9338[0x1];return _0x1ad592;}return null;}catch(_0x2713f9){return null;}}export function getLocalPages(_0x117701=pagesDir,_0x35a520=pagesDir){const _0x2cfd14=a12_0x33e185;let _0x327342=[];const _0x215222=readdirSync(_0x117701);return _0x215222['forEach'](_0x2c0abf=>{const _0x1c994a=a12_0x5049,_0x5897c6=join(_0x117701,_0x2c0abf),_0x615eac=statSync(_0x5897c6);if(_0x615eac&&_0x615eac[_0x1c994a(0x11e)]())_0x327342=_0x327342['concat'](getLocalPages(_0x5897c6,_0x35a520));else{if(_0x2c0abf[_0x1c994a(0x11c)](_0x1c994a(0x126))){let _0x33dfbe=relative(_0x35a520,_0x5897c6);_0x33dfbe['endsWith'](_0x1c994a(0x123))?_0x33dfbe=_0x33dfbe[_0x1c994a(0x12f)](/index\.tsx$/,''):_0x33dfbe=_0x33dfbe['replace'](/\.tsx$/,'');_0x33dfbe['endsWith']('/')&&(_0x33dfbe=_0x33dfbe[_0x1c994a(0x127)](0x0,-0x1));const _0x5c4d62=extractTitleFromComment(_0x5897c6),_0x53cb04=_0x5c4d62||_0x33dfbe;_0x327342['push']({'path':_0x33dfbe[_0x1c994a(0x118)]('$',':'),'label':_0x53cb04});}}}),_0x327342[_0x2cfd14(0x120)](_0x41beeb=>_0x41beeb[_0x2cfd14(0x11d)]!=='');}function a12_0x3137(){const _0x56376d=['.tsx','slice','2KYkCjr','3711428bknkhK','18883550sLsjyQ','90354LQUwgB','trim','616rCqAFA','12uQjdBq','replace','replaceAll','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','utf-8','endsWith','path','isDirectory','717905TVOYLU','filter','3049529mLwULk','167355SwadLD','index.tsx','cwd','1652934NCQzyy'];a12_0x3137=function(){return _0x56376d;};return a12_0x3137();}
1
+ const a12_0x1d40f8=a12_0x2569;(function(_0x45774b,_0x24b03d){const _0x1fe63e=a12_0x2569,_0x4141f9=_0x45774b();while(!![]){try{const _0x2e9ef5=parseInt(_0x1fe63e(0x17c))/0x1*(-parseInt(_0x1fe63e(0x18e))/0x2)+parseInt(_0x1fe63e(0x191))/0x3*(-parseInt(_0x1fe63e(0x185))/0x4)+parseInt(_0x1fe63e(0x182))/0x5*(-parseInt(_0x1fe63e(0x18a))/0x6)+-parseInt(_0x1fe63e(0x18c))/0x7+parseInt(_0x1fe63e(0x194))/0x8+-parseInt(_0x1fe63e(0x189))/0x9*(parseInt(_0x1fe63e(0x190))/0xa)+parseInt(_0x1fe63e(0x192))/0xb*(parseInt(_0x1fe63e(0x180))/0xc);if(_0x2e9ef5===_0x24b03d)break;else _0x4141f9['push'](_0x4141f9['shift']());}catch(_0x54b151){_0x4141f9['push'](_0x4141f9['shift']());}}}(a12_0x5b11,0xf31c4));import{readdirSync,statSync,readFileSync}from'fs';function a12_0x2569(_0x2155ff,_0x12aa5d){_0x2155ff=_0x2155ff-0x17c;const _0x5b113b=a12_0x5b11();let _0x256941=_0x5b113b[_0x2155ff];return _0x256941;}import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x1d40f8(0x184)](),'src/pages');export function extractTitleFromComment(_0x4e0716){const _0x198fe3=a12_0x1d40f8;try{const _0x2c80ff=readFileSync(_0x4e0716,'utf-8'),_0x4c1fbb=_0x2c80ff['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4c1fbb&&_0x4c1fbb[0x1]){const _0x35a10e=_0x4c1fbb[0x1],_0x37951d=_0x35a10e[_0x198fe3(0x183)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x37951d&&_0x37951d[0x1])return _0x37951d[0x1][_0x198fe3(0x18d)]();}let _0x287da1=null;const _0x512fda=_0x2c80ff[_0x198fe3(0x183)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x512fda&&_0x512fda[0x1]&&(_0x287da1=_0x512fda[0x1]);if(!_0x287da1){const _0x4532b5=_0x2c80ff[_0x198fe3(0x183)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4532b5&&_0x4532b5[0x1]&&(_0x287da1=_0x4532b5[0x1]);}if(_0x287da1){const _0xe7aca=new RegExp('\x5cb'+_0x287da1+_0x198fe3(0x17f)),_0x19a587=_0x2c80ff[_0x198fe3(0x183)](_0xe7aca);if(_0x19a587&&_0x19a587[0x1])return _0x19a587[0x1];return _0x287da1;}return null;}catch(_0x16e7b5){return null;}}export function getLocalPages(_0x42739=pagesDir,_0x2be8c9=pagesDir){const _0x1065c5=a12_0x1d40f8;let _0x93c774=[];const _0x55a65e=readdirSync(_0x42739);return _0x55a65e[_0x1065c5(0x17d)](_0x362072=>{const _0x5d6fdd=_0x1065c5,_0x18ff6e=join(_0x42739,_0x362072),_0x590f79=statSync(_0x18ff6e);if(_0x590f79&&_0x590f79[_0x5d6fdd(0x193)]())_0x93c774=_0x93c774['concat'](getLocalPages(_0x18ff6e,_0x2be8c9));else{if(_0x362072['endsWith']('.tsx')){let _0x1e210a=relative(_0x2be8c9,_0x18ff6e);_0x1e210a[_0x5d6fdd(0x17e)](_0x5d6fdd(0x18b))?_0x1e210a=_0x1e210a[_0x5d6fdd(0x181)](/index\.tsx$/,''):_0x1e210a=_0x1e210a[_0x5d6fdd(0x181)](/\.tsx$/,'');_0x1e210a[_0x5d6fdd(0x17e)]('/')&&(_0x1e210a=_0x1e210a[_0x5d6fdd(0x188)](0x0,-0x1));const _0x2747d9=extractTitleFromComment(_0x18ff6e),_0x4c305f=_0x2747d9||_0x1e210a;_0x93c774['push']({'path':_0x1e210a[_0x5d6fdd(0x187)]('$',':'),'label':_0x4c305f});}}}),_0x93c774[_0x1065c5(0x186)](_0xed548f=>_0xed548f[_0x1065c5(0x18f)]!=='');}function a12_0x5b11(){const _0x595549=['6tPGAMb','index.tsx','8569484ulPkHK','trim','3351934fIYrta','path','28820wtEPZQ','70386shwzXm','91603754vePbAe','isDirectory','5124912rMQvlS','1KFLEiP','forEach','endsWith','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','12jauEtP','replace','8857805NpZgOK','match','cwd','292DRmhfZ','filter','replaceAll','slice','4959FOzMYi'];a12_0x5b11=function(){return _0x595549;};return a12_0x5b11();}
@@ -1 +1 @@
1
- function a13_0x5b3d(_0x36d70c,_0x53bf40){_0x36d70c=_0x36d70c-0x1d0;const _0xb324a7=a13_0xb324();let _0x5b3d55=_0xb324a7[_0x36d70c];return _0x5b3d55;}(function(_0x40165e,_0xad9d04){const _0x47f826=a13_0x5b3d,_0x5b591e=_0x40165e();while(!![]){try{const _0x2de45e=parseInt(_0x47f826(0x1db))/0x1+-parseInt(_0x47f826(0x1dd))/0x2*(parseInt(_0x47f826(0x1e6))/0x3)+-parseInt(_0x47f826(0x1dc))/0x4*(parseInt(_0x47f826(0x1f4))/0x5)+parseInt(_0x47f826(0x1da))/0x6*(parseInt(_0x47f826(0x1ea))/0x7)+-parseInt(_0x47f826(0x1d5))/0x8*(-parseInt(_0x47f826(0x1d0))/0x9)+-parseInt(_0x47f826(0x1f7))/0xa*(parseInt(_0x47f826(0x1f0))/0xb)+parseInt(_0x47f826(0x1eb))/0xc;if(_0x2de45e===_0xad9d04)break;else _0x5b591e['push'](_0x5b591e['shift']());}catch(_0x2a54ae){_0x5b591e['push'](_0x5b591e['shift']());}}}(a13_0xb324,0x464f0));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0xb324(){const _0x59be40=['GET','99brRZrG','errorMsg','!\x20请使用以下方式之一:','push','189920WwPGax','children','label','568810zIIPgb','extend','info','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','2331JndJqG','status','parse','path','data','12784qEZcxZ','成功获取\x20','get-online-menu-list','获取菜单列表失败,HTTP状态码:\x20','isArray','3678EIZQlp','212314zZYsDU','12lpDupR','4cexrpR','resources','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','application/json','success','\x20个线上菜单','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','log','服务端返回空菜单列表','508674lEmnyF','正在获取线上菜单列表...\x20(appCode:\x20','flat','error','5859cEXYnq','1364448zFDMiM','length','map','未知错误'];a13_0xb324=function(){return _0x59be40;};return a13_0xb324();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x1ca3a3=a13_0x5b3d,_0x32138b=config?.['appcode'];if(!_0x32138b){const _0x4427dd='未提供应用AppCode,且配置中也没有默认值';return logger[_0x1ca3a3(0x1e9)](_0x1ca3a3(0x1d7),_0x4427dd),console[_0x1ca3a3(0x1e9)]('×\x20'+_0x4427dd),console[_0x1ca3a3(0x1e4)](_0x1ca3a3(0x1f2)),console[_0x1ca3a3(0x1e4)](_0x1ca3a3(0x1df)),console['log'](_0x1ca3a3(0x1e3)),[];}logger[_0x1ca3a3(0x1f9)]('get-online-menu-list',_0x1ca3a3(0x1e7)+_0x32138b+')');const _0x569ed0=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x32138b,{'method':_0x1ca3a3(0x1ef),'headers':{'Content-Type':_0x1ca3a3(0x1e0),'Cookie':getCookie()}});if(!_0x569ed0['ok']){if(_0x569ed0[_0x1ca3a3(0x1d1)]===0x191){const _0x5d4903=_0x1ca3a3(0x1fa);logger[_0x1ca3a3(0x1e9)]('get-online-menu-list',_0x5d4903,{'status':_0x569ed0[_0x1ca3a3(0x1d1)]});throw new Error(_0x5d4903);}const _0x7959f1=_0x1ca3a3(0x1d8)+_0x569ed0[_0x1ca3a3(0x1d1)];logger[_0x1ca3a3(0x1e9)]('get-online-menu-list',_0x7959f1);throw new Error(_0x7959f1);}const _0x2f3036=await _0x569ed0['json']();if(!_0x2f3036[_0x1ca3a3(0x1e1)]){const _0x102be4='获取菜单列表失败:\x20'+(_0x2f3036[_0x1ca3a3(0x1f1)]||_0x1ca3a3(0x1ee));logger[_0x1ca3a3(0x1e9)](_0x1ca3a3(0x1d7),_0x102be4,{'errorCode':_0x2f3036['errorCode'],'errorMsg':_0x2f3036[_0x1ca3a3(0x1f1)]});throw new Error(_0x102be4);}if(!_0x2f3036[_0x1ca3a3(0x1d4)])return logger[_0x1ca3a3(0x1f9)](_0x1ca3a3(0x1d7),_0x1ca3a3(0x1e5)),[];return logger['info'](_0x1ca3a3(0x1d7),_0x1ca3a3(0x1d6)+_0x2f3036[_0x1ca3a3(0x1d4)][_0x1ca3a3(0x1ec)]+_0x1ca3a3(0x1e2)),_0x2f3036['data'][_0x1ca3a3(0x1ed)](formatMenuList)[_0x1ca3a3(0x1e8)]();}function formatMenuList(_0x2df56a){const _0x23bacc=a13_0x5b3d;let _0x42b00e=[];try{if(_0x2df56a[_0x23bacc(0x1f8)]?.[_0x23bacc(0x1de)]){const _0x55c4d6=JSON[_0x23bacc(0x1d2)](_0x2df56a['extend']['resources']);Array[_0x23bacc(0x1d9)](_0x55c4d6)&&(_0x42b00e=_0x55c4d6);}}catch(_0x15ab7e){}const _0x12b33d=[{'id':_0x2df56a['id'],'path':_0x2df56a[_0x23bacc(0x1d3)],'label':_0x2df56a[_0x23bacc(0x1f6)],'resources':_0x42b00e}];if(_0x2df56a[_0x23bacc(0x1f5)]&&_0x2df56a[_0x23bacc(0x1f5)][_0x23bacc(0x1ec)]>0x0)for(const _0x423693 of _0x2df56a[_0x23bacc(0x1f5)]){_0x12b33d[_0x23bacc(0x1f3)](...formatMenuList(_0x423693));}return _0x12b33d;}
1
+ (function(_0x4968da,_0x15e0ed){const _0x4f4ef4=a13_0x177b,_0x5de2cb=_0x4968da();while(!![]){try{const _0x1b540e=-parseInt(_0x4f4ef4(0xd1))/0x1+parseInt(_0x4f4ef4(0xcc))/0x2*(-parseInt(_0x4f4ef4(0xd6))/0x3)+parseInt(_0x4f4ef4(0xd9))/0x4*(parseInt(_0x4f4ef4(0xdf))/0x5)+parseInt(_0x4f4ef4(0xce))/0x6+-parseInt(_0x4f4ef4(0xd3))/0x7+-parseInt(_0x4f4ef4(0xe1))/0x8*(parseInt(_0x4f4ef4(0xe8))/0x9)+-parseInt(_0x4f4ef4(0xe5))/0xa*(-parseInt(_0x4f4ef4(0xd5))/0xb);if(_0x1b540e===_0x15e0ed)break;else _0x5de2cb['push'](_0x5de2cb['shift']());}catch(_0x4947f5){_0x5de2cb['push'](_0x5de2cb['shift']());}}}(a13_0x522a,0xdd43e));function a13_0x522a(){const _0x824344=['正在获取线上菜单列表...\x20(appCode:\x20','resources','parse','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','path','map','length','children','获取菜单列表失败,HTTP状态码:\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','label','extend','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','76skCBwJ','status','2625492UnkHJm','push','GET','803069hhKtfu','flat','5296655ISHQNt','服务端返回空菜单列表','8558erZqjb','20469ZNMzjj','/smartapi/menu/find?appCode=','data','5272252RObDtT','get-online-menu-list','errorMsg','errorCode','success','log','5hfYdBa','json','82568dpGDHL','application/json','info','error','32230YpOtPo','未提供应用AppCode,且配置中也没有默认值','获取菜单列表失败:\x20','1341lTrdcu'];a13_0x522a=function(){return _0x824344;};return a13_0x522a();}import{getCookie}from'../auth/get-cookie.js';function a13_0x177b(_0xdcbcef,_0x381252){_0xdcbcef=_0xdcbcef-0xcc;const _0x522a4d=a13_0x522a();let _0x177bcb=_0x522a4d[_0xdcbcef];return _0x177bcb;}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 _0x5a93ec=a13_0x177b,_0x10ad43=config?.['appcode'];if(!_0x10ad43){const _0x2aff30=_0x5a93ec(0xe6);return logger['error'](_0x5a93ec(0xda),_0x2aff30),console[_0x5a93ec(0xe4)]('×\x20'+_0x2aff30),console[_0x5a93ec(0xde)]('!\x20请使用以下方式之一:'),console['log'](_0x5a93ec(0xec)),console[_0x5a93ec(0xde)](_0x5a93ec(0xf2)),[];}logger[_0x5a93ec(0xe3)]('get-online-menu-list',_0x5a93ec(0xe9)+_0x10ad43+')');const _0x188f37=await fetch(getApiDomain()+_0x5a93ec(0xd7)+_0x10ad43,{'method':_0x5a93ec(0xd0),'headers':{'Content-Type':_0x5a93ec(0xe2),'Cookie':getCookie()}});if(!_0x188f37['ok']){if(_0x188f37[_0x5a93ec(0xcd)]===0x191){const _0xa47b28=_0x5a93ec(0xf5);logger[_0x5a93ec(0xe4)]('get-online-menu-list',_0xa47b28,{'status':_0x188f37[_0x5a93ec(0xcd)]});throw new Error(_0xa47b28);}const _0xc4472b=_0x5a93ec(0xf1)+_0x188f37[_0x5a93ec(0xcd)];logger[_0x5a93ec(0xe4)](_0x5a93ec(0xda),_0xc4472b);throw new Error(_0xc4472b);}const _0x480e59=await _0x188f37[_0x5a93ec(0xe0)]();if(!_0x480e59[_0x5a93ec(0xdd)]){const _0x4aeb05=_0x5a93ec(0xe7)+(_0x480e59['errorMsg']||'未知错误');logger[_0x5a93ec(0xe4)](_0x5a93ec(0xda),_0x4aeb05,{'errorCode':_0x480e59[_0x5a93ec(0xdc)],'errorMsg':_0x480e59[_0x5a93ec(0xdb)]});throw new Error(_0x4aeb05);}if(!_0x480e59[_0x5a93ec(0xd8)])return logger['info'](_0x5a93ec(0xda),_0x5a93ec(0xd4)),[];return logger['info'](_0x5a93ec(0xda),'成功获取\x20'+_0x480e59[_0x5a93ec(0xd8)][_0x5a93ec(0xef)]+'\x20个线上菜单'),_0x480e59[_0x5a93ec(0xd8)][_0x5a93ec(0xee)](formatMenuList)[_0x5a93ec(0xd2)]();}function formatMenuList(_0x4ab85f){const _0xa34ed=a13_0x177b;let _0x36712d=[];try{if(_0x4ab85f['extend']?.[_0xa34ed(0xea)]){const _0x3f5216=JSON[_0xa34ed(0xeb)](_0x4ab85f[_0xa34ed(0xf4)]['resources']);Array['isArray'](_0x3f5216)&&(_0x36712d=_0x3f5216);}}catch(_0x2f562e){}const _0x2b465e=[{'id':_0x4ab85f['id'],'path':_0x4ab85f[_0xa34ed(0xed)],'label':_0x4ab85f[_0xa34ed(0xf3)],'resources':_0x36712d}];if(_0x4ab85f[_0xa34ed(0xf0)]&&_0x4ab85f[_0xa34ed(0xf0)]['length']>0x0)for(const _0x42d22d of _0x4ab85f['children']){_0x2b465e[_0xa34ed(0xcf)](...formatMenuList(_0x42d22d));}return _0x2b465e;}
@@ -1 +1 @@
1
- function a15_0x8281(){const _0x3d137a=['337eZrjIb','1562199OMTKmI','获取菜单列表失败','3415689LPoOwy','8vJizLS','6007666xzocVZ','70543dgrZTp','1593510HnuBgm','then','message','470eFzgSh','879975TrAcbh','5658asjbzd','4OzELri'];a15_0x8281=function(){return _0x3d137a;};return a15_0x8281();}(function(_0x539eea,_0x4eb372){const _0x5149c8=a15_0x4b6b,_0x1ce1b1=_0x539eea();while(!![]){try{const _0x6b1469=parseInt(_0x5149c8(0xc8))/0x1*(-parseInt(_0x5149c8(0xc6))/0x2)+-parseInt(_0x5149c8(0xc9))/0x3*(-parseInt(_0x5149c8(0xc7))/0x4)+-parseInt(_0x5149c8(0xc5))/0x5+parseInt(_0x5149c8(0xcf))/0x6+-parseInt(_0x5149c8(0xcd))/0x7*(-parseInt(_0x5149c8(0xcc))/0x8)+parseInt(_0x5149c8(0xcb))/0x9+parseInt(_0x5149c8(0xc4))/0xa*(-parseInt(_0x5149c8(0xce))/0xb);if(_0x6b1469===_0x4eb372)break;else _0x1ce1b1['push'](_0x1ce1b1['shift']());}catch(_0x42ecc8){_0x1ce1b1['push'](_0x1ce1b1['shift']());}}}(a15_0x8281,0x90d92));import{useEffect,useState}from'react';function a15_0x4b6b(_0x36f959,_0x1b164c){_0x36f959=_0x36f959-0xc2;const _0x828193=a15_0x8281();let _0x4b6bce=_0x828193[_0x36f959];return _0x4b6bce;}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x5a01eb,_0x5cc821]=useState([]),[_0x3c6fb3,_0x116748]=useState(!![]),[_0x3b34eb,_0x1faf02]=useState('');return useEffect(()=>{const _0x30d15a=a15_0x4b6b;_0x116748(!![]),_0x1faf02(''),getOnlineMenuList()[_0x30d15a(0xc2)](_0x5cc821)['catch'](_0x134f12=>{const _0x1c516d=_0x30d15a;_0x1faf02(_0x134f12[_0x1c516d(0xc3)]||_0x1c516d(0xca));})['finally'](()=>_0x116748(![]));},[]),{'menuList':_0x5a01eb,'loading':_0x3c6fb3,'error':_0x3b34eb};}
1
+ (function(_0x27191a,_0x1801f3){const _0x402a44=a15_0x401f,_0x4fcc76=_0x27191a();while(!![]){try{const _0x7cc450=parseInt(_0x402a44(0x1e7))/0x1*(-parseInt(_0x402a44(0x1f0))/0x2)+-parseInt(_0x402a44(0x1eb))/0x3+-parseInt(_0x402a44(0x1ef))/0x4*(-parseInt(_0x402a44(0x1ee))/0x5)+-parseInt(_0x402a44(0x1f3))/0x6*(-parseInt(_0x402a44(0x1f2))/0x7)+-parseInt(_0x402a44(0x1e9))/0x8+parseInt(_0x402a44(0x1ea))/0x9+parseInt(_0x402a44(0x1e8))/0xa;if(_0x7cc450===_0x1801f3)break;else _0x4fcc76['push'](_0x4fcc76['shift']());}catch(_0x1d8e3c){_0x4fcc76['push'](_0x4fcc76['shift']());}}}(a15_0x59fc,0x4de2e));function a15_0x401f(_0x1d9fbf,_0x25d13c){_0x1d9fbf=_0x1d9fbf-0x1e6;const _0x59fcfd=a15_0x59fc();let _0x401fbd=_0x59fcfd[_0x1d9fbf];return _0x401fbd;}import{useEffect,useState}from'react';function a15_0x59fc(){const _0x3cb125=['13740YsAVMF','finally','328405AXwKid','54kIHjwK','message','76yNwQjm','3767480QgWXMH','213832eVsTdK','2286036CciEuU','1251366oqHySQ','catch','获取菜单列表失败','1160030GwwYGC','4NPaNBG'];a15_0x59fc=function(){return _0x3cb125;};return a15_0x59fc();}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x57adde,_0x1ac3b7]=useState([]),[_0x39e36d,_0x3e454d]=useState(!![]),[_0x4c61f2,_0x1a4f09]=useState('');return useEffect(()=>{const _0x26a118=a15_0x401f;_0x3e454d(!![]),_0x1a4f09(''),getOnlineMenuList()['then'](_0x1ac3b7)[_0x26a118(0x1ec)](_0x283706=>{const _0x1dcb85=_0x26a118;_0x1a4f09(_0x283706[_0x1dcb85(0x1e6)]||_0x1dcb85(0x1ed));})[_0x26a118(0x1f1)](()=>_0x3e454d(![]));},[]),{'menuList':_0x57adde,'loading':_0x39e36d,'error':_0x4c61f2};}
@@ -1 +1 @@
1
- (function(_0x52ea8a,_0x2d234d){const _0x2c8be2=a16_0x2b50,_0x3f7711=_0x52ea8a();while(!![]){try{const _0x2a3e97=parseInt(_0x2c8be2(0x1e0))/0x1+-parseInt(_0x2c8be2(0x1d9))/0x2*(-parseInt(_0x2c8be2(0x1dd))/0x3)+-parseInt(_0x2c8be2(0x1d8))/0x4+parseInt(_0x2c8be2(0x1df))/0x5+parseInt(_0x2c8be2(0x1da))/0x6+parseInt(_0x2c8be2(0x1dc))/0x7*(-parseInt(_0x2c8be2(0x1d7))/0x8)+parseInt(_0x2c8be2(0x1de))/0x9;if(_0x2a3e97===_0x2d234d)break;else _0x3f7711['push'](_0x3f7711['shift']());}catch(_0x61262a){_0x3f7711['push'](_0x3f7711['shift']());}}}(a16_0x1e0d,0xd1053));function a16_0x1e0d(){const _0x7607d1=['4jEqaJr','1341378GzjaRw','fill','2212pBzAcW','1490145CHytUY','8514936RgohQJ','689575QCMRKb','379952CZwXEh','join','7536WTCBoj','6108580lptVCb'];a16_0x1e0d=function(){return _0x7607d1;};return a16_0x1e0d();}export function getRemainingSpaces(_0x2a35e5,_0x283bd4){const _0x88e31d=a16_0x2b50,_0x4d9d92=getStringWidth(_0x283bd4);return Array(Math['max'](0x0,_0x2a35e5-_0x4d9d92))[_0x88e31d(0x1db)]('\x20')[_0x88e31d(0x1d6)]('');}function a16_0x2b50(_0x114011,_0x2e3d1e){_0x114011=_0x114011-0x1d6;const _0x1e0db1=a16_0x1e0d();let _0x2b5088=_0x1e0db1[_0x114011];return _0x2b5088;}export function getMaxWidth(_0xd28780,_0x565c12=0x2){let _0x1976a3='',_0x2cc6cf=0x0;for(const _0x3730d7 of _0xd28780){const _0x599073=getStringWidth(_0x3730d7);_0x599073>_0x2cc6cf&&(_0x2cc6cf=_0x599073,_0x1976a3=_0x3730d7);}return _0x1976a3+'\x20'['repeat'](_0x565c12);}export function getStringWidth(_0x454975){let _0x2f8c22=0x0;for(const _0x2ea74a of _0x454975){/[\u4e00-\u9fa5]/['test'](_0x2ea74a)?_0x2f8c22+=0x2:_0x2f8c22+=0x1;}return _0x2f8c22;}
1
+ function a16_0x1816(){const _0x30c933=['190827weKSoC','1598820lBqqKq','join','fill','max','158jctLvm','12ILFbIT','116644hQIayh','10124gJeyTE','80cOfjyT','repeat','96XjjbcY','679DOkEse','640415oStHaJ','test','120904lQmjFt','984TsjkFi'];a16_0x1816=function(){return _0x30c933;};return a16_0x1816();}(function(_0x5c789f,_0x53801d){const _0x37e38e=a16_0x35da,_0x1db064=_0x5c789f();while(!![]){try{const _0x2cfcf8=parseInt(_0x37e38e(0x14a))/0x1*(parseInt(_0x37e38e(0x143))/0x2)+-parseInt(_0x37e38e(0x144))/0x3*(-parseInt(_0x37e38e(0x146))/0x4)+-parseInt(_0x37e38e(0x14b))/0x5+-parseInt(_0x37e38e(0x13f))/0x6+parseInt(_0x37e38e(0x13c))/0x7*(-parseInt(_0x37e38e(0x149))/0x8)+-parseInt(_0x37e38e(0x13e))/0x9*(parseInt(_0x37e38e(0x147))/0xa)+parseInt(_0x37e38e(0x145))/0xb*(parseInt(_0x37e38e(0x13d))/0xc);if(_0x2cfcf8===_0x53801d)break;else _0x1db064['push'](_0x1db064['shift']());}catch(_0x2f62e4){_0x1db064['push'](_0x1db064['shift']());}}}(a16_0x1816,0x2783c));function a16_0x35da(_0x26eb5e,_0x17694d){_0x26eb5e=_0x26eb5e-0x13b;const _0x1816cc=a16_0x1816();let _0x35daf0=_0x1816cc[_0x26eb5e];return _0x35daf0;}export function getRemainingSpaces(_0x2c2b87,_0x17e248){const _0x5cb724=a16_0x35da,_0x41a56a=getStringWidth(_0x17e248);return Array(Math[_0x5cb724(0x142)](0x0,_0x2c2b87-_0x41a56a))[_0x5cb724(0x141)]('\x20')[_0x5cb724(0x140)]('');}export function getMaxWidth(_0x415438,_0x31fec2=0x2){const _0x2aaa0c=a16_0x35da;let _0x34a13e='',_0xe160c2=0x0;for(const _0x4585b1 of _0x415438){const _0x590ca6=getStringWidth(_0x4585b1);_0x590ca6>_0xe160c2&&(_0xe160c2=_0x590ca6,_0x34a13e=_0x4585b1);}return _0x34a13e+'\x20'[_0x2aaa0c(0x148)](_0x31fec2);}export function getStringWidth(_0x335019){const _0x198a08=a16_0x35da;let _0x42bbcd=0x0;for(const _0x410d8a of _0x335019){/[\u4e00-\u9fa5]/[_0x198a08(0x13b)](_0x410d8a)?_0x42bbcd+=0x2:_0x42bbcd+=0x1;}return _0x42bbcd;}
@@ -1 +1 @@
1
- function a17_0x5d71(_0x14bf22,_0x2debcf){_0x14bf22=_0x14bf22-0x73;const _0x84de4f=a17_0x84de();let _0x5d714a=_0x84de4f[_0x14bf22];return _0x5d714a;}(function(_0x32eea9,_0x8ecf72){const _0x3b4037=a17_0x5d71,_0xfc721d=_0x32eea9();while(!![]){try{const _0x5c2ab3=parseInt(_0x3b4037(0x79))/0x1*(-parseInt(_0x3b4037(0x78))/0x2)+parseInt(_0x3b4037(0x77))/0x3+parseInt(_0x3b4037(0x73))/0x4*(parseInt(_0x3b4037(0x75))/0x5)+-parseInt(_0x3b4037(0x74))/0x6+parseInt(_0x3b4037(0x7a))/0x7+parseInt(_0x3b4037(0x7c))/0x8+-parseInt(_0x3b4037(0x7d))/0x9;if(_0x5c2ab3===_0x8ecf72)break;else _0xfc721d['push'](_0xfc721d['shift']());}catch(_0x48f3c6){_0xfc721d['push'](_0xfc721d['shift']());}}}(a17_0x84de,0xdea14));export function isValidJsHttpsUrl(_0x35cce0){const _0x152bf3=a17_0x5d71;return/^https:\/\/.+\.js(\?.*)?$/[_0x152bf3(0x7b)](_0x35cce0[_0x152bf3(0x7e)]());}export function isValidCssHttpsUrl(_0x4a4514){const _0x456a18=a17_0x5d71;return/^https:\/\/.+\.css(\?.*)?$/[_0x456a18(0x7b)](_0x4a4514[_0x456a18(0x7e)]());}function a17_0x84de(){const _0x1c39f3=['test','1238336snEBAB','4751469LAeznB','trim','4432SwpSiV','7380366wsBVRg','7775PYNyJV','HEAD','581136NdXoPu','2ocQRWI','1206517oHKxGH','12634769FTqLjy'];a17_0x84de=function(){return _0x1c39f3;};return a17_0x84de();}export async function isUrlReachable(_0x1ea5d0){const _0x9d4a72=a17_0x5d71;try{const _0x27b5d1=await fetch(_0x1ea5d0,{'method':_0x9d4a72(0x76)});return _0x27b5d1['ok'];}catch{return![];}}
1
+ (function(_0x4bbefe,_0x5a9e19){const _0x2de7e4=a17_0x1082,_0x34e94b=_0x4bbefe();while(!![]){try{const _0xe5b99=parseInt(_0x2de7e4(0x125))/0x1+parseInt(_0x2de7e4(0x126))/0x2+parseInt(_0x2de7e4(0x11f))/0x3+parseInt(_0x2de7e4(0x121))/0x4+-parseInt(_0x2de7e4(0x11e))/0x5+parseInt(_0x2de7e4(0x11d))/0x6*(parseInt(_0x2de7e4(0x11c))/0x7)+parseInt(_0x2de7e4(0x122))/0x8*(-parseInt(_0x2de7e4(0x127))/0x9);if(_0xe5b99===_0x5a9e19)break;else _0x34e94b['push'](_0x34e94b['shift']());}catch(_0x4e40d9){_0x34e94b['push'](_0x34e94b['shift']());}}}(a17_0x8886,0x1da80));function a17_0x8886(){const _0x23d454=['414216Wcnqbt','HEAD','941140xKSogp','184IoZqwe','trim','test','86459OQVgWy','13404jisFwd','167274TnrTgz','833322ncxGra','12tMidwb','778300AsSTEP'];a17_0x8886=function(){return _0x23d454;};return a17_0x8886();}export function isValidJsHttpsUrl(_0xa1824c){const _0x7b6c6f=a17_0x1082;return/^https:\/\/.+\.js(\?.*)?$/[_0x7b6c6f(0x124)](_0xa1824c[_0x7b6c6f(0x123)]());}export function isValidCssHttpsUrl(_0x2e8604){const _0x31030c=a17_0x1082;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2e8604[_0x31030c(0x123)]());}function a17_0x1082(_0x2a2516,_0x3c2580){_0x2a2516=_0x2a2516-0x11c;const _0x8886cd=a17_0x8886();let _0x1082bf=_0x8886cd[_0x2a2516];return _0x1082bf;}export async function isUrlReachable(_0x4b2b9b){const _0x1c69de=a17_0x1082;try{const _0x6f5d74=await fetch(_0x4b2b9b,{'method':_0x1c69de(0x120)});return _0x6f5d74['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x533432,_0x2aee56){const _0x1987d5=a18_0x1890,_0x1b0921=_0x533432();while(!![]){try{const _0xded2c4=parseInt(_0x1987d5(0x1fa))/0x1*(parseInt(_0x1987d5(0x1f2))/0x2)+-parseInt(_0x1987d5(0x1eb))/0x3*(-parseInt(_0x1987d5(0x1f8))/0x4)+-parseInt(_0x1987d5(0x1f3))/0x5*(parseInt(_0x1987d5(0x1ed))/0x6)+parseInt(_0x1987d5(0x1e8))/0x7+parseInt(_0x1987d5(0x1ee))/0x8*(parseInt(_0x1987d5(0x1e6))/0x9)+-parseInt(_0x1987d5(0x1f6))/0xa*(parseInt(_0x1987d5(0x1f0))/0xb)+parseInt(_0x1987d5(0x1ec))/0xc*(-parseInt(_0x1987d5(0x1e9))/0xd);if(_0xded2c4===_0x2aee56)break;else _0x1b0921['push'](_0x1b0921['shift']());}catch(_0x450368){_0x1b0921['push'](_0x1b0921['shift']());}}}(a18_0x492d,0xde4ad));import{jsx as a18_0x51d52c,jsxs as a18_0x239b17}from'react/jsx-runtime';import{Text,Box}from'ink';function a18_0x492d(){const _0x167f20=['join','1glDZzZ','18CWmOah','待更新的菜单列表:','3436972ZsYpml','5219565ITmLHP','filter','3ZmHOXN','60RsCckZ','211836CPwfYo','5963472hwCAEU','flat','33RRlXSx','*\x20待更新的菜单&资源链接','2639932ffIgBq','115pYExrP','map','待更新的资源链接:','3141620gROKUo','length','5482912VQwDVW'];a18_0x492d=function(){return _0x167f20;};return a18_0x492d();}function a18_0x1890(_0x592f6c,_0x41cbb1){_0x592f6c=_0x592f6c-0x1e6;const _0x492d7e=a18_0x492d();let _0x1890fb=_0x492d7e[_0x592f6c];return _0x1890fb;}export function CurrentMenuCdnContent(_0x5d4330){const _0x3c1bec=a18_0x1890,{menuList:_0x4628b3}=_0x5d4330,_0x3468e1=_0x4628b3[_0x3c1bec(0x1ea)](_0x5a7e1c=>_0x5a7e1c['resources'][_0x3c1bec(0x1f7)]),_0x531a6b=Array['from'](new Set(_0x4628b3[_0x3c1bec(0x1f4)](_0x581877=>_0x581877['resources'])[_0x3c1bec(0x1ef)]()));return a18_0x239b17(Box,{'flexDirection':'column','children':[a18_0x51d52c(Text,{'color':'cyan','children':_0x3c1bec(0x1f1)}),a18_0x239b17(Box,{'marginTop':0x1,'flexDirection':'column','children':[a18_0x239b17(Text,{'bold':!![],'children':['\x20\x20',_0x3c1bec(0x1e7)]}),a18_0x239b17(Text,{'children':['\x20\x20',_0x3468e1[_0x3c1bec(0x1f4)](_0x8529b6=>_0x8529b6['label'])[_0x3c1bec(0x1f9)](',\x20')]})]}),a18_0x51d52c(Box,{'marginTop':0x1,'children':a18_0x239b17(Text,{'bold':!![],'children':['\x20\x20',_0x3c1bec(0x1f5)]})}),_0x531a6b['map'](_0x41b86c=>a18_0x51d52c(Box,{'children':a18_0x239b17(Text,{'children':['\x20\x20',_0x41b86c]})},_0x41b86c))]});}
1
+ function a18_0x5b05(){const _0x57769e=['flat','4372083iCKmBL','label','133KKyaoU','2531015qtrvjJ','1125574McbDjK','join','16598870OzaELh','2197512JqENgx','map','resources','48DBTtsc','from','cyan','*\x20待更新的菜单&资源链接','filter','60656djuiJR','column','230104MSuSLN','1AHMfNV'];a18_0x5b05=function(){return _0x57769e;};return a18_0x5b05();}(function(_0x18b521,_0x404317){const _0x2ad9ee=a18_0x1441,_0x1c5d5a=_0x18b521();while(!![]){try{const _0x5b301f=parseInt(_0x2ad9ee(0x1eb))/0x1*(parseInt(_0x2ad9ee(0x1dd))/0x2)+parseInt(_0x2ad9ee(0x1e3))/0x3*(parseInt(_0x2ad9ee(0x1e8))/0x4)+-parseInt(_0x2ad9ee(0x1dc))/0x5+-parseInt(_0x2ad9ee(0x1e0))/0x6+-parseInt(_0x2ad9ee(0x1db))/0x7*(parseInt(_0x2ad9ee(0x1ea))/0x8)+-parseInt(_0x2ad9ee(0x1ed))/0x9+parseInt(_0x2ad9ee(0x1df))/0xa;if(_0x5b301f===_0x404317)break;else _0x1c5d5a['push'](_0x1c5d5a['shift']());}catch(_0x1bdbdb){_0x1c5d5a['push'](_0x1c5d5a['shift']());}}}(a18_0x5b05,0x88daf));import{jsx as a18_0x4a084c,jsxs as a18_0x1e9059}from'react/jsx-runtime';import{Text,Box}from'ink';function a18_0x1441(_0x1d19e4,_0x178e7c){_0x1d19e4=_0x1d19e4-0x1db;const _0x5b057b=a18_0x5b05();let _0x1441f8=_0x5b057b[_0x1d19e4];return _0x1441f8;}export function CurrentMenuCdnContent(_0x86429c){const _0x11feac=a18_0x1441,{menuList:_0xbb5c01}=_0x86429c,_0x49aecc=_0xbb5c01[_0x11feac(0x1e7)](_0xf8023c=>_0xf8023c[_0x11feac(0x1e2)]['length']),_0x3f161e=Array[_0x11feac(0x1e4)](new Set(_0xbb5c01[_0x11feac(0x1e1)](_0x1e823d=>_0x1e823d[_0x11feac(0x1e2)])[_0x11feac(0x1ec)]()));return a18_0x1e9059(Box,{'flexDirection':'column','children':[a18_0x4a084c(Text,{'color':_0x11feac(0x1e5),'children':_0x11feac(0x1e6)}),a18_0x1e9059(Box,{'marginTop':0x1,'flexDirection':_0x11feac(0x1e9),'children':[a18_0x1e9059(Text,{'bold':!![],'children':['\x20\x20','待更新的菜单列表:']}),a18_0x1e9059(Text,{'children':['\x20\x20',_0x49aecc[_0x11feac(0x1e1)](_0x48658f=>_0x48658f[_0x11feac(0x1ee)])[_0x11feac(0x1de)](',\x20')]})]}),a18_0x4a084c(Box,{'marginTop':0x1,'children':a18_0x1e9059(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x3f161e[_0x11feac(0x1e1)](_0x2f4c29=>a18_0x4a084c(Box,{'children':a18_0x1e9059(Text,{'children':['\x20\x20',_0x2f4c29]})},_0x2f4c29))]});}
@@ -1 +1 @@
1
- (function(_0x19d3d1,_0x3e2642){const _0x1c09f0=a19_0x6746,_0x4115a2=_0x19d3d1();while(!![]){try{const _0x123db5=parseInt(_0x1c09f0(0x1e8))/0x1*(-parseInt(_0x1c09f0(0x1e4))/0x2)+parseInt(_0x1c09f0(0x1e9))/0x3*(parseInt(_0x1c09f0(0x1df))/0x4)+-parseInt(_0x1c09f0(0x1e5))/0x5+parseInt(_0x1c09f0(0x1e0))/0x6+-parseInt(_0x1c09f0(0x1e1))/0x7*(parseInt(_0x1c09f0(0x1ea))/0x8)+-parseInt(_0x1c09f0(0x1e2))/0x9*(parseInt(_0x1c09f0(0x1ee))/0xa)+parseInt(_0x1c09f0(0x1ed))/0xb;if(_0x123db5===_0x3e2642)break;else _0x4115a2['push'](_0x4115a2['shift']());}catch(_0x4ce816){_0x4115a2['push'](_0x4115a2['shift']());}}}(a19_0x173f,0xe2b15));import{jsx as a19_0x1e273e,jsxs as a19_0x29db34}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x173f(){const _0x4ce561=['41316clmhAR','9523626gzYRxm','2961497MBPRCi','63iRevKi','green','6XBFMua','383770gIbaMr','CSS\x20链接:\x20','column','604259lvWNyL','246IKiOKE','32bmqWke','JS\x20链接:\x20','cyan','40738588LZQtYF','2324870ZlHTZq'];a19_0x173f=function(){return _0x4ce561;};return a19_0x173f();}function a19_0x6746(_0x2d010d,_0x5c03a5){_0x2d010d=_0x2d010d-0x1df;const _0x173f46=a19_0x173f();let _0x674691=_0x173f46[_0x2d010d];return _0x674691;}export function InputCdnAsset(_0x35bcc7){const _0x44dd1e=a19_0x6746,{jsCdnUrl:_0x4ec8fa,cssCdnUrl:_0x931fc4}=_0x35bcc7;return a19_0x29db34(Box,{'flexDirection':_0x44dd1e(0x1e7),'marginTop':0x1,'children':[a19_0x1e273e(Text,{'color':_0x44dd1e(0x1ec),'children':'*\x20已输入的资源资源'}),a19_0x29db34(Box,{'children':[a19_0x29db34(Text,{'children':['\x20\x20',_0x44dd1e(0x1eb)]}),a19_0x1e273e(Text,{'color':_0x44dd1e(0x1e3),'children':_0x4ec8fa})]}),a19_0x29db34(Box,{'children':[a19_0x29db34(Text,{'children':['\x20\x20',_0x44dd1e(0x1e6)]}),a19_0x1e273e(Text,{'color':_0x44dd1e(0x1e3),'children':_0x931fc4})]})]});}
1
+ (function(_0x21d3dd,_0x28148b){const _0x22040b=a19_0x324a,_0x399efd=_0x21d3dd();while(!![]){try{const _0x3c22c6=parseInt(_0x22040b(0x1e3))/0x1+-parseInt(_0x22040b(0x1dc))/0x2*(parseInt(_0x22040b(0x1da))/0x3)+parseInt(_0x22040b(0x1db))/0x4+-parseInt(_0x22040b(0x1e6))/0x5*(-parseInt(_0x22040b(0x1dd))/0x6)+-parseInt(_0x22040b(0x1e0))/0x7*(parseInt(_0x22040b(0x1e5))/0x8)+-parseInt(_0x22040b(0x1e7))/0x9+parseInt(_0x22040b(0x1e4))/0xa;if(_0x3c22c6===_0x28148b)break;else _0x399efd['push'](_0x399efd['shift']());}catch(_0x56afb6){_0x399efd['push'](_0x399efd['shift']());}}}(a19_0x2a37,0x772a2));import{jsx as a19_0x4a84f6,jsxs as a19_0x57af65}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x324a(_0x2a7f99,_0xd8f549){_0x2a7f99=_0x2a7f99-0x1d9;const _0x2a37c2=a19_0x2a37();let _0x324aa2=_0x2a37c2[_0x2a7f99];return _0x324aa2;}function a19_0x2a37(){const _0x27b6ed=['46aIGONf','1968YaNQVW','column','green','35jgEYjc','JS\x20链接:\x20','CSS\x20链接:\x20','642601SDfzGZ','2923820LAqekr','438856PGwsHK','3555XSRzGP','5641416OFuXTH','cyan','15813pSojcR','1368996ZdDROg'];a19_0x2a37=function(){return _0x27b6ed;};return a19_0x2a37();}export function InputCdnAsset(_0x2c4af1){const _0x17f8b9=a19_0x324a,{jsCdnUrl:_0x2dfc78,cssCdnUrl:_0x2a156a}=_0x2c4af1;return a19_0x57af65(Box,{'flexDirection':_0x17f8b9(0x1de),'marginTop':0x1,'children':[a19_0x4a84f6(Text,{'color':_0x17f8b9(0x1d9),'children':'*\x20已输入的资源资源'}),a19_0x57af65(Box,{'children':[a19_0x57af65(Text,{'children':['\x20\x20',_0x17f8b9(0x1e1)]}),a19_0x4a84f6(Text,{'color':'green','children':_0x2dfc78})]}),a19_0x57af65(Box,{'children':[a19_0x57af65(Text,{'children':['\x20\x20',_0x17f8b9(0x1e2)]}),a19_0x4a84f6(Text,{'color':_0x17f8b9(0x1df),'children':_0x2a156a})]})]});}
@@ -1 +1 @@
1
- (function(_0x3c1213,_0x12f091){const _0x283d9c=a20_0x246c,_0x57e792=_0x3c1213();while(!![]){try{const _0x723b7b=-parseInt(_0x283d9c(0x169))/0x1*(parseInt(_0x283d9c(0x175))/0x2)+parseInt(_0x283d9c(0x191))/0x3+-parseInt(_0x283d9c(0x172))/0x4*(parseInt(_0x283d9c(0x174))/0x5)+parseInt(_0x283d9c(0x193))/0x6*(parseInt(_0x283d9c(0x173))/0x7)+-parseInt(_0x283d9c(0x16c))/0x8+parseInt(_0x283d9c(0x194))/0x9*(-parseInt(_0x283d9c(0x18d))/0xa)+-parseInt(_0x283d9c(0x17e))/0xb*(-parseInt(_0x283d9c(0x16a))/0xc);if(_0x723b7b===_0x12f091)break;else _0x57e792['push'](_0x57e792['shift']());}catch(_0x37c641){_0x57e792['push'](_0x57e792['shift']());}}}(a20_0x4e2d,0x8e753));import{jsx as a20_0x323aa1,jsxs as a20_0x28277c,Fragment as a20_0x453577}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a20_0x4520bb from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a20_0x246c(_0x1a596f,_0x4922fe){_0x1a596f=_0x1a596f-0x167;const _0x4e2d69=a20_0x4e2d();let _0x246cdb=_0x4e2d69[_0x1a596f];return _0x246cdb;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a20_0x323aa1(AppMenuUpdateCdn,{}));function a20_0x4e2d(){const _0x544db6=['gray','input-css','lovrabet\x20auth','!\x20未找到菜单资源链接','input-js','10qkgjaK','map','green','red','330447NCVZVH','JS\x20链接无法访问','1154472LnWLqE','6604308lazBJI','value','backspace','creating','√\x20更新成功','142zrbkuT','1011324jkcaEJ','trim','389960hgsNsJ','dots','\x20资源正在同步中...','length','\x20←\x20','all','45932eDHGBb','28JiNjzj','165TVPYGE','4432TCHxiL','leftArrow','\x20正在获取线上菜单资源链接...','path','updated','CSS\x20链接无法访问','upArrow','resources','CSS\x20链接:\x20','154EXYQqp','downArrow','slice','need-confirm','column','请输入有效的\x20CSS\x20https\x20链接','label','cancel','return','提示:使用\x20'];a20_0x4e2d=function(){return _0x544db6;};return a20_0x4e2d();}export function AppMenuUpdateCdn(){const _0x1cf917=a20_0x246c,{exit:_0x6b2e06}=useApp(),{loading:_0x21bd5d,menuList:_0x4f5235,error:_0x155f27}=useGetOnlineMenuList(),[_0x4f6077,_0x1bc964]=useState('ok'),[_0x5d75c4,_0x5e78de]=useState(_0x1cf917(0x18c)),[_0x215099,_0x5592ef]=useState(''),[_0x48d3ae,_0x1b0695]=useState(''),[_0x1e28ab,_0x90a324]=useState(''),[_0x193bfd,_0x3021da]=useState(''),_0x2c51d9=Array['from'](new Set(_0x4f5235[_0x1cf917(0x18e)](_0x2f1125=>_0x2f1125[_0x1cf917(0x17c)])['flat']()));useEffect(()=>{const _0x121bf3=_0x1cf917;_0x5d75c4===_0x121bf3(0x179)&&setTimeout(_0x6b2e06,0x32);},[_0x5d75c4]),useInput(async(_0x1660d1,_0x2b70e3)=>{const _0x4259ee=_0x1cf917;if(_0x5d75c4==='input-js'){if(_0x2b70e3['return']){const _0x305fc9=_0x1e28ab[_0x4259ee(0x16b)]();if(_0x305fc9==='')return;if(!isValidJsHttpsUrl(_0x305fc9)){_0x3021da('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x305fc9)){_0x3021da(_0x4259ee(0x192));return;}_0x5592ef(_0x305fc9),_0x90a324(''),_0x3021da(''),_0x5e78de(_0x4259ee(0x189));return;}if(_0x2b70e3[_0x4259ee(0x196)]||_0x2b70e3['delete']){_0x90a324(_0x558da3=>_0x558da3[_0x4259ee(0x180)](0x0,-0x1)),_0x3021da('');return;}_0x90a324(_0x5a5829=>_0x5a5829+_0x1660d1);return;}if(_0x5d75c4===_0x4259ee(0x189)){if(_0x2b70e3[_0x4259ee(0x186)]){const _0x4d5f5c=_0x1e28ab['trim']();if(_0x4d5f5c==='')return;if(!isValidCssHttpsUrl(_0x4d5f5c)){_0x3021da(_0x4259ee(0x183));return;}if(!await isUrlReachable(_0x4d5f5c)){_0x3021da(_0x4259ee(0x17a));return;}_0x1b0695(_0x4d5f5c),_0x90a324(''),_0x3021da(''),_0x5e78de('need-confirm');return;}if(_0x2b70e3['backspace']||_0x2b70e3['delete']){_0x90a324(_0x5b60b5=>_0x5b60b5[_0x4259ee(0x180)](0x0,-0x1)),_0x3021da('');return;}_0x90a324(_0x23758e=>_0x23758e+_0x1660d1);return;}if(_0x5d75c4===_0x4259ee(0x181)){(_0x2b70e3[_0x4259ee(0x17b)]||_0x2b70e3[_0x4259ee(0x17f)]||_0x2b70e3[_0x4259ee(0x176)]||_0x2b70e3['rightArrow'])&&_0x1bc964(_0x4bff2d=>_0x4bff2d==='ok'?_0x4259ee(0x185):'ok');if(_0x2b70e3[_0x4259ee(0x186)]){_0x5e78de(_0x4259ee(0x167));if(_0x4f6077==='ok')await Promise[_0x4259ee(0x171)](_0x4f5235[_0x4259ee(0x18e)](_0x3f9ac4=>{const _0x30bda8=_0x4259ee,_0x4761f1={'id':_0x3f9ac4['id'],'label':_0x3f9ac4[_0x30bda8(0x184)],'path':_0x3f9ac4[_0x30bda8(0x178)],'resources':[_0x215099,_0x48d3ae]};if(_0x3f9ac4[_0x30bda8(0x17c)][_0x30bda8(0x16f)]===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0x4761f1);})),await new Promise(_0x597c8a=>setTimeout(_0x597c8a,0x3e8)),_0x5e78de('updated');else _0x4f6077===_0x4259ee(0x185)&&_0x6b2e06();}}});if(_0x21bd5d)return a20_0x28277c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x323aa1(Text,{}),a20_0x323aa1(a20_0x4520bb,{'type':_0x1cf917(0x16d)}),a20_0x323aa1(Text,{'children':_0x1cf917(0x177)})]});if(_0x155f27)return a20_0x28277c(Box,{'flexDirection':_0x1cf917(0x182),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x28277c(Text,{'color':_0x1cf917(0x190),'children':['✗\x20',_0x155f27]}),a20_0x28277c(Box,{'marginTop':0x1,'children':[a20_0x323aa1(Text,{'color':_0x1cf917(0x188),'children':_0x1cf917(0x187)}),a20_0x323aa1(Text,{'color':'cyan','children':_0x1cf917(0x18a)}),a20_0x323aa1(Text,{'color':'gray','children':'\x20命令重新登录'})]})]});if(_0x2c51d9[_0x1cf917(0x16f)]===0x0)return a20_0x323aa1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a20_0x323aa1(Text,{'color':'yellow','children':_0x1cf917(0x18b)})});if(_0x5d75c4===_0x1cf917(0x181))return a20_0x28277c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x323aa1(CurrentMenuCdnContent,{'menuList':_0x4f5235}),a20_0x323aa1(InputCdnAsset,{'jsCdnUrl':_0x215099,'cssCdnUrl':_0x48d3ae}),a20_0x323aa1(Box,{'marginTop':0x1,'flexDirection':_0x1cf917(0x182),'children':[{'label':'继续更新','value':'ok'},{'label':'取消更新','value':'cancel'}][_0x1cf917(0x18e)](_0x163d82=>a20_0x28277c(Text,{'color':_0x4f6077===_0x163d82[_0x1cf917(0x195)]?'yellow':undefined,'children':[_0x4f6077===_0x163d82['value']?'>\x20':'\x20\x20',_0x163d82[_0x1cf917(0x184)]]},_0x163d82[_0x1cf917(0x195)]))})]});if(_0x5d75c4===_0x1cf917(0x167))return a20_0x28277c(Box,{'flexDirection':_0x1cf917(0x182),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x323aa1(CurrentMenuCdnContent,{'menuList':_0x4f5235}),a20_0x323aa1(InputCdnAsset,{'jsCdnUrl':_0x215099,'cssCdnUrl':_0x48d3ae}),a20_0x28277c(Box,{'marginTop':0x1,'children':[a20_0x323aa1(a20_0x4520bb,{'type':'dots'}),a20_0x323aa1(Text,{'children':_0x1cf917(0x16e)})]})]});if(_0x5d75c4==='updated')return a20_0x28277c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x323aa1(CurrentMenuCdnContent,{'menuList':_0x4f5235}),a20_0x323aa1(InputCdnAsset,{'jsCdnUrl':_0x215099,'cssCdnUrl':_0x48d3ae}),a20_0x323aa1(Box,{'marginTop':0x1,'children':a20_0x323aa1(Text,{'color':_0x1cf917(0x18f),'children':_0x1cf917(0x168)})})]});return a20_0x28277c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a20_0x323aa1(CurrentMenuCdnContent,{'menuList':_0x4f5235}),a20_0x28277c(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x323aa1(Text,{'color':'cyan','children':'*\x20请输入新的资源链接'}),_0x215099?a20_0x28277c(Box,{'children':[a20_0x28277c(Text,{'color':_0x1cf917(0x188),'children':['\x20\x20','JS\x20链接:\x20']}),a20_0x323aa1(Text,{'color':'green','children':_0x215099})]}):_0x5d75c4===_0x1cf917(0x18c)&&a20_0x28277c(a20_0x453577,{'children':[a20_0x28277c(Box,{'children':[a20_0x28277c(Text,{'children':['\x20\x20','JS\x20链接:\x20']}),a20_0x323aa1(Text,{'color':_0x1cf917(0x18f),'children':_0x1e28ab}),_0x193bfd&&a20_0x28277c(Text,{'color':_0x1cf917(0x190),'children':['\x20←\x20',_0x193bfd]})]}),!_0x193bfd&&a20_0x323aa1(Box,{'children':a20_0x28277c(Text,{'color':_0x1cf917(0x188),'children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0x48d3ae?a20_0x28277c(Box,{'children':[a20_0x28277c(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a20_0x323aa1(Text,{'color':_0x1cf917(0x18f),'children':_0x48d3ae})]}):_0x5d75c4===_0x1cf917(0x189)&&a20_0x28277c(a20_0x453577,{'children':[a20_0x28277c(Box,{'children':[a20_0x28277c(Text,{'children':['\x20\x20',_0x1cf917(0x17d)]}),a20_0x323aa1(Text,{'color':_0x1cf917(0x18f),'children':_0x1e28ab}),_0x193bfd&&a20_0x28277c(Text,{'color':_0x1cf917(0x190),'children':[_0x1cf917(0x170),_0x193bfd]})]}),!_0x193bfd&&a20_0x323aa1(Box,{'children':a20_0x28277c(Text,{'color':_0x1cf917(0x188),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
1
+ (function(_0x325c0b,_0x20cc69){const _0x139884=a20_0x15ed,_0x256f1d=_0x325c0b();while(!![]){try{const _0x118789=-parseInt(_0x139884(0x154))/0x1*(parseInt(_0x139884(0x133))/0x2)+-parseInt(_0x139884(0x131))/0x3*(parseInt(_0x139884(0x153))/0x4)+-parseInt(_0x139884(0x150))/0x5+parseInt(_0x139884(0x148))/0x6+-parseInt(_0x139884(0x12d))/0x7+-parseInt(_0x139884(0x15c))/0x8*(-parseInt(_0x139884(0x14f))/0x9)+-parseInt(_0x139884(0x134))/0xa*(-parseInt(_0x139884(0x141))/0xb);if(_0x118789===_0x20cc69)break;else _0x256f1d['push'](_0x256f1d['shift']());}catch(_0x4dd725){_0x256f1d['push'](_0x256f1d['shift']());}}}(a20_0x478e,0x58e12));import{jsx as a20_0x2fa488,jsxs as a20_0x17c9e2,Fragment as a20_0x34766e}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a20_0x478e(){const _0x364015=['resolve','slice','取消更新','CSS\x20链接无法访问','11007kYbjvI','3010365ZCtsbR','backspace','label','4xJsyGc','316QYmIjn','!\x20未找到菜单资源链接','from','path','return','resources','all','map','1528RRbGvH','delete','need-confirm','cyan','\x20正在获取线上菜单资源链接...','gray','输入项目的\x20JS\x20资源链接(https://...)','5009851kYdcnp','lovrabet\x20auth','\x20命令重新登录','column','1995846BQIPYS','green','4462zDjjrX','7430Jcehtz','*\x20请输入新的资源链接','dots','length','请输入有效的\x20JS\x20https\x20链接','CSS\x20链接:\x20','downArrow','yellow','\x20资源正在同步中...','input-css','trim','creating','red','39787uxfRGk','cancel','JS\x20链接:\x20','rightArrow','input-js','继续更新','JS\x20链接无法访问','786420ahcCfZ','updated','请输入有效的\x20CSS\x20https\x20链接'];a20_0x478e=function(){return _0x364015;};return a20_0x478e();}import{useEffect,useState}from'react';import a20_0xb9cda1 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a20_0x15ed(_0xa90e45,_0x1e2728){_0xa90e45=_0xa90e45-0x12b;const _0x478e5f=a20_0x478e();let _0x15edcb=_0x478e5f[_0xa90e45];return _0x15edcb;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a20_0x2fa488(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x31ca52=a20_0x15ed,{exit:_0x44fecb}=useApp(),{loading:_0x13da5b,menuList:_0x524d04,error:_0x24ae75}=useGetOnlineMenuList(),[_0xed545,_0x2687ae]=useState('ok'),[_0xf6a1d7,_0x45528c]=useState('input-js'),[_0x27610a,_0x2fc960]=useState(''),[_0x224446,_0x3b5c88]=useState(''),[_0x3c3208,_0x341770]=useState(''),[_0x488c54,_0x97b872]=useState(''),_0x5973a4=Array[_0x31ca52(0x156)](new Set(_0x524d04[_0x31ca52(0x15b)](_0x185266=>_0x185266[_0x31ca52(0x159)])['flat']()));useEffect(()=>{_0xf6a1d7==='updated'&&setTimeout(_0x44fecb,0x32);},[_0xf6a1d7]),useInput(async(_0x3db708,_0x5427b5)=>{const _0x3e7f09=_0x31ca52;if(_0xf6a1d7===_0x3e7f09(0x145)){if(_0x5427b5[_0x3e7f09(0x158)]){const _0x5bd3ea=_0x3c3208[_0x3e7f09(0x13e)]();if(_0x5bd3ea==='')return;if(!isValidJsHttpsUrl(_0x5bd3ea)){_0x97b872(_0x3e7f09(0x138));return;}if(!await isUrlReachable(_0x5bd3ea)){_0x97b872(_0x3e7f09(0x147));return;}_0x2fc960(_0x5bd3ea),_0x341770(''),_0x97b872(''),_0x45528c(_0x3e7f09(0x13d));return;}if(_0x5427b5[_0x3e7f09(0x151)]||_0x5427b5[_0x3e7f09(0x15d)]){_0x341770(_0x47c8d9=>_0x47c8d9[_0x3e7f09(0x14c)](0x0,-0x1)),_0x97b872('');return;}_0x341770(_0x3fd11d=>_0x3fd11d+_0x3db708);return;}if(_0xf6a1d7==='input-css'){if(_0x5427b5[_0x3e7f09(0x158)]){const _0x1c3b94=_0x3c3208[_0x3e7f09(0x13e)]();if(_0x1c3b94==='')return;if(!isValidCssHttpsUrl(_0x1c3b94)){_0x97b872(_0x3e7f09(0x14a));return;}if(!await isUrlReachable(_0x1c3b94)){_0x97b872(_0x3e7f09(0x14e));return;}_0x3b5c88(_0x1c3b94),_0x341770(''),_0x97b872(''),_0x45528c(_0x3e7f09(0x15e));return;}if(_0x5427b5[_0x3e7f09(0x151)]||_0x5427b5[_0x3e7f09(0x15d)]){_0x341770(_0x4d6728=>_0x4d6728[_0x3e7f09(0x14c)](0x0,-0x1)),_0x97b872('');return;}_0x341770(_0x437f26=>_0x437f26+_0x3db708);return;}if(_0xf6a1d7==='need-confirm'){(_0x5427b5['upArrow']||_0x5427b5[_0x3e7f09(0x13a)]||_0x5427b5['leftArrow']||_0x5427b5[_0x3e7f09(0x144)])&&_0x2687ae(_0x1c3dee=>_0x1c3dee==='ok'?'cancel':'ok');if(_0x5427b5[_0x3e7f09(0x158)]){_0x45528c('creating');if(_0xed545==='ok')await Promise[_0x3e7f09(0x15a)](_0x524d04[_0x3e7f09(0x15b)](_0x1bdd8a=>{const _0x26e79c=_0x3e7f09,_0x3f42f7={'id':_0x1bdd8a['id'],'label':_0x1bdd8a[_0x26e79c(0x152)],'path':_0x1bdd8a[_0x26e79c(0x157)],'resources':[_0x27610a,_0x224446]};if(_0x1bdd8a[_0x26e79c(0x159)]['length']===0x0)return Promise[_0x26e79c(0x14b)]();return updateMenuCdnUrl(_0x3f42f7);})),await new Promise(_0x572921=>setTimeout(_0x572921,0x3e8)),_0x45528c(_0x3e7f09(0x149));else _0xed545===_0x3e7f09(0x142)&&_0x44fecb();}}});if(_0x13da5b)return a20_0x17c9e2(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x2fa488(Text,{}),a20_0x2fa488(a20_0xb9cda1,{'type':_0x31ca52(0x136)}),a20_0x2fa488(Text,{'children':_0x31ca52(0x160)})]});if(_0x24ae75)return a20_0x17c9e2(Box,{'flexDirection':_0x31ca52(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x17c9e2(Text,{'color':_0x31ca52(0x140),'children':['✗\x20',_0x24ae75]}),a20_0x17c9e2(Box,{'marginTop':0x1,'children':[a20_0x2fa488(Text,{'color':_0x31ca52(0x12b),'children':'提示:使用\x20'}),a20_0x2fa488(Text,{'color':_0x31ca52(0x15f),'children':_0x31ca52(0x12e)}),a20_0x2fa488(Text,{'color':_0x31ca52(0x12b),'children':_0x31ca52(0x12f)})]})]});if(_0x5973a4[_0x31ca52(0x137)]===0x0)return a20_0x2fa488(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a20_0x2fa488(Text,{'color':_0x31ca52(0x13b),'children':_0x31ca52(0x155)})});if(_0xf6a1d7==='need-confirm')return a20_0x17c9e2(Box,{'flexDirection':_0x31ca52(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x2fa488(CurrentMenuCdnContent,{'menuList':_0x524d04}),a20_0x2fa488(InputCdnAsset,{'jsCdnUrl':_0x27610a,'cssCdnUrl':_0x224446}),a20_0x2fa488(Box,{'marginTop':0x1,'flexDirection':'column','children':[{'label':_0x31ca52(0x146),'value':'ok'},{'label':_0x31ca52(0x14d),'value':_0x31ca52(0x142)}][_0x31ca52(0x15b)](_0x116975=>a20_0x17c9e2(Text,{'color':_0xed545===_0x116975['value']?'yellow':undefined,'children':[_0xed545===_0x116975['value']?'>\x20':'\x20\x20',_0x116975[_0x31ca52(0x152)]]},_0x116975['value']))})]});if(_0xf6a1d7===_0x31ca52(0x13f))return a20_0x17c9e2(Box,{'flexDirection':_0x31ca52(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x2fa488(CurrentMenuCdnContent,{'menuList':_0x524d04}),a20_0x2fa488(InputCdnAsset,{'jsCdnUrl':_0x27610a,'cssCdnUrl':_0x224446}),a20_0x17c9e2(Box,{'marginTop':0x1,'children':[a20_0x2fa488(a20_0xb9cda1,{'type':'dots'}),a20_0x2fa488(Text,{'children':_0x31ca52(0x13c)})]})]});if(_0xf6a1d7===_0x31ca52(0x149))return a20_0x17c9e2(Box,{'flexDirection':_0x31ca52(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x2fa488(CurrentMenuCdnContent,{'menuList':_0x524d04}),a20_0x2fa488(InputCdnAsset,{'jsCdnUrl':_0x27610a,'cssCdnUrl':_0x224446}),a20_0x2fa488(Box,{'marginTop':0x1,'children':a20_0x2fa488(Text,{'color':_0x31ca52(0x132),'children':'√\x20更新成功'})})]});return a20_0x17c9e2(Box,{'flexDirection':_0x31ca52(0x130),'marginTop':0x1,'marginBottom':0x1,'children':[a20_0x2fa488(CurrentMenuCdnContent,{'menuList':_0x524d04}),a20_0x17c9e2(Box,{'marginTop':0x1,'flexDirection':_0x31ca52(0x130),'children':[a20_0x2fa488(Text,{'color':'cyan','children':_0x31ca52(0x135)}),_0x27610a?a20_0x17c9e2(Box,{'children':[a20_0x17c9e2(Text,{'color':_0x31ca52(0x12b),'children':['\x20\x20',_0x31ca52(0x143)]}),a20_0x2fa488(Text,{'color':_0x31ca52(0x132),'children':_0x27610a})]}):_0xf6a1d7===_0x31ca52(0x145)&&a20_0x17c9e2(a20_0x34766e,{'children':[a20_0x17c9e2(Box,{'children':[a20_0x17c9e2(Text,{'children':['\x20\x20',_0x31ca52(0x143)]}),a20_0x2fa488(Text,{'color':_0x31ca52(0x132),'children':_0x3c3208}),_0x488c54&&a20_0x17c9e2(Text,{'color':'red','children':['\x20←\x20',_0x488c54]})]}),!_0x488c54&&a20_0x2fa488(Box,{'children':a20_0x17c9e2(Text,{'color':_0x31ca52(0x12b),'children':['\x20\x20',_0x31ca52(0x12c)]})})]}),_0x224446?a20_0x17c9e2(Box,{'children':[a20_0x17c9e2(Text,{'children':['\x20\x20',_0x31ca52(0x139)]}),a20_0x2fa488(Text,{'color':_0x31ca52(0x132),'children':_0x224446})]}):_0xf6a1d7===_0x31ca52(0x13d)&&a20_0x17c9e2(a20_0x34766e,{'children':[a20_0x17c9e2(Box,{'children':[a20_0x17c9e2(Text,{'children':['\x20\x20',_0x31ca52(0x139)]}),a20_0x2fa488(Text,{'color':_0x31ca52(0x132),'children':_0x3c3208}),_0x488c54&&a20_0x17c9e2(Text,{'color':'red','children':['\x20←\x20',_0x488c54]})]}),!_0x488c54&&a20_0x2fa488(Box,{'children':a20_0x17c9e2(Text,{'color':_0x31ca52(0x12b),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
@@ -1 +1 @@
1
- const a22_0x4a61e0=a22_0x51c8;(function(_0x66e1ac,_0x1062f1){const _0x3611c4=a22_0x51c8,_0x38c0b5=_0x66e1ac();while(!![]){try{const _0x28e46d=-parseInt(_0x3611c4(0x9b))/0x1*(parseInt(_0x3611c4(0x98))/0x2)+parseInt(_0x3611c4(0xa9))/0x3*(parseInt(_0x3611c4(0x96))/0x4)+parseInt(_0x3611c4(0xb4))/0x5*(parseInt(_0x3611c4(0xa4))/0x6)+parseInt(_0x3611c4(0xb2))/0x7+parseInt(_0x3611c4(0x9d))/0x8+-parseInt(_0x3611c4(0xaa))/0x9*(-parseInt(_0x3611c4(0x9c))/0xa)+-parseInt(_0x3611c4(0x94))/0xb;if(_0x28e46d===_0x1062f1)break;else _0x38c0b5['push'](_0x38c0b5['shift']());}catch(_0x32baf3){_0x38c0b5['push'](_0x38c0b5['shift']());}}}(a22_0x35b8,0xc082b));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a22_0x51c8(_0x15a6a2,_0x559fc2){_0x15a6a2=_0x15a6a2-0x8f;const _0x35b8fb=a22_0x35b8();let _0x51c8c4=_0x35b8fb[_0x15a6a2];return _0x51c8c4;}function a22_0x35b8(){const _0x36b236=['import','error','!\x20请使用以下方式之一:','update-menu-cdn-url','14287823xYyggN','创建菜单失败,HTTP状态码:\x20','7708NnZPaM','errorMsg','4530nIXUAv','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','data','445GRGXxx','40wHEXyt','9665184jtphYa','log','info','status','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','stringify','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','114YzUjcI','resources','errorCode','POST','/smartapi/menu/update','843OlANOo','815355TvPKup','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','未知错误','json','success','更新菜单资源失败:\x20','SdkDemo1','path','4151861kYaAfk','appcode','102685JAhSWJ','label','未提供应用AppCode,且配置中也没有默认值'];a22_0x35b8=function(){return _0x36b236;};return a22_0x35b8();}const config=readConfig(),logLabel=a22_0x4a61e0(0x93);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a22_0x4a61e0(0xb0),'path':'sdk-demo','resources':[a22_0x4a61e0(0xa1),a22_0x4a61e0(0xa3)]});export async function updateMenuCdnUrl(_0x2b531a){const _0x5151a4=a22_0x4a61e0,_0x3e0404=config?.[_0x5151a4(0xb3)];if(!_0x3e0404){const _0x395bb9=_0x5151a4(0x8f);logger[_0x5151a4(0x91)](logLabel,_0x395bb9),console[_0x5151a4(0x91)]('×\x20'+_0x395bb9),console[_0x5151a4(0x9e)](_0x5151a4(0x92)),console[_0x5151a4(0x9e)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x5151a4(0xab));return;}logger[_0x5151a4(0x9f)](logLabel,'正在更新菜单资源链接:\x20'+_0x2b531a[_0x5151a4(0xb5)]+'\x20('+_0x2b531a[_0x5151a4(0xb1)]+')');const _0x7115cf={'id':_0x2b531a['id'],'appCode':_0x3e0404,'extend':{'loadScriptMode':_0x5151a4(0x90),'resources':_0x2b531a[_0x5151a4(0xa5)]?JSON[_0x5151a4(0xa2)](_0x2b531a[_0x5151a4(0xa5)]):undefined}},_0x3af99a=await fetch(getApiDomain()+_0x5151a4(0xa8),{'method':_0x5151a4(0xa7),'body':JSON['stringify'](_0x7115cf),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x3af99a['ok']){if(_0x3af99a[_0x5151a4(0xa0)]===0x191){const _0x22025f=_0x5151a4(0x99);logger[_0x5151a4(0x91)](logLabel,_0x22025f,{'status':_0x3af99a[_0x5151a4(0xa0)],'menu':_0x2b531a[_0x5151a4(0xb5)]});throw new Error(_0x22025f);}const _0x293c63=_0x5151a4(0x95)+_0x3af99a['status'];logger[_0x5151a4(0x91)](logLabel,_0x293c63,{'menu':_0x2b531a[_0x5151a4(0xb5)]});throw new Error(_0x293c63);}const _0x4952f5=await _0x3af99a[_0x5151a4(0xad)]();if(!_0x4952f5[_0x5151a4(0xae)]){const _0xd31e32=_0x5151a4(0xaf)+(_0x4952f5[_0x5151a4(0x97)]||_0x5151a4(0xac));logger[_0x5151a4(0x91)](logLabel,_0xd31e32,{'errorCode':_0x4952f5[_0x5151a4(0xa6)],'errorMsg':_0x4952f5[_0x5151a4(0x97)],'menu':_0x2b531a['label']});throw new Error(_0xd31e32);}logger[_0x5151a4(0x9f)](logLabel,'菜单资源同步成功:\x20'+_0x2b531a[_0x5151a4(0xb5)],_0x4952f5[_0x5151a4(0x9a)]);}
1
+ const a22_0x714be3=a22_0x276e;(function(_0x6e3147,_0x33d620){const _0x498d85=a22_0x276e,_0x4c72af=_0x6e3147();while(!![]){try{const _0x28d6cc=-parseInt(_0x498d85(0xe4))/0x1+parseInt(_0x498d85(0xf0))/0x2*(-parseInt(_0x498d85(0xea))/0x3)+-parseInt(_0x498d85(0xee))/0x4*(parseInt(_0x498d85(0xf2))/0x5)+-parseInt(_0x498d85(0xe3))/0x6*(parseInt(_0x498d85(0xd9))/0x7)+-parseInt(_0x498d85(0xd5))/0x8*(parseInt(_0x498d85(0xd6))/0x9)+parseInt(_0x498d85(0xcb))/0xa*(-parseInt(_0x498d85(0xd2))/0xb)+parseInt(_0x498d85(0xeb))/0xc;if(_0x28d6cc===_0x33d620)break;else _0x4c72af['push'](_0x4c72af['shift']());}catch(_0x4e7bec){_0x4c72af['push'](_0x4c72af['shift']());}}}(a22_0x341c,0x384b9));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a22_0x276e(_0x31f422,_0x5b352c){_0x31f422=_0x31f422-0xca;const _0x341c7f=a22_0x341c();let _0x276e1b=_0x341c7f[_0x31f422];return _0x276e1b;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a22_0x714be3(0xcf);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a22_0x714be3(0xe7),'path':a22_0x714be3(0xd1),'resources':[a22_0x714be3(0xda),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});function a22_0x341c(){const _0x55e54e=['path','data','resources','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','更新菜单资源失败:\x20','851226wiVeFH','307576mTxaAi','label','log','SdkDemo1','success','stringify','307482iPvDLe','27056472XSyyXY','POST','status','289412HFZURx','菜单资源同步成功:\x20','6VdvlwC','application/json','10BykGoV','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','10rOTamh','import','errorMsg','info','update-menu-cdn-url','!\x20请使用以下方式之一:','sdk-demo','4830859HwWHwC','json','errorCode','58120ipwann','495SlAund','未知错误','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','21bFdWov','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','未提供应用AppCode,且配置中也没有默认值','error','/smartapi/menu/update'];a22_0x341c=function(){return _0x55e54e;};return a22_0x341c();}export async function updateMenuCdnUrl(_0x282dd7){const _0x31af40=a22_0x714be3,_0x2c4fb2=config?.['appcode'];if(!_0x2c4fb2){const _0x5d73f6=_0x31af40(0xdb);logger[_0x31af40(0xdc)](logLabel,_0x5d73f6),console[_0x31af40(0xdc)]('×\x20'+_0x5d73f6),console[_0x31af40(0xe6)](_0x31af40(0xd0)),console[_0x31af40(0xe6)](_0x31af40(0xd8)),console['log'](_0x31af40(0xe1));return;}logger[_0x31af40(0xce)](logLabel,'正在更新菜单资源链接:\x20'+_0x282dd7[_0x31af40(0xe5)]+'\x20('+_0x282dd7[_0x31af40(0xde)]+')');const _0x5a7a5f={'id':_0x282dd7['id'],'appCode':_0x2c4fb2,'extend':{'loadScriptMode':_0x31af40(0xcc),'resources':_0x282dd7[_0x31af40(0xe0)]?JSON[_0x31af40(0xe9)](_0x282dd7[_0x31af40(0xe0)]):undefined}},_0x14cfca=await fetch(getApiDomain()+_0x31af40(0xdd),{'method':_0x31af40(0xec),'body':JSON[_0x31af40(0xe9)](_0x5a7a5f),'headers':{'Content-Type':_0x31af40(0xf1),'Cookie':getCookie()}});if(!_0x14cfca['ok']){if(_0x14cfca['status']===0x191){const _0x5cfa0d=_0x31af40(0xca);logger[_0x31af40(0xdc)](logLabel,_0x5cfa0d,{'status':_0x14cfca[_0x31af40(0xed)],'menu':_0x282dd7[_0x31af40(0xe5)]});throw new Error(_0x5cfa0d);}const _0x5d676e='创建菜单失败,HTTP状态码:\x20'+_0x14cfca['status'];logger['error'](logLabel,_0x5d676e,{'menu':_0x282dd7[_0x31af40(0xe5)]});throw new Error(_0x5d676e);}const _0x4df991=await _0x14cfca[_0x31af40(0xd3)]();if(!_0x4df991[_0x31af40(0xe8)]){const _0x4adb94=_0x31af40(0xe2)+(_0x4df991['errorMsg']||_0x31af40(0xd7));logger['error'](logLabel,_0x4adb94,{'errorCode':_0x4df991[_0x31af40(0xd4)],'errorMsg':_0x4df991[_0x31af40(0xcd)],'menu':_0x282dd7['label']});throw new Error(_0x4adb94);}logger[_0x31af40(0xce)](logLabel,_0x31af40(0xef)+_0x282dd7[_0x31af40(0xe5)],_0x4df991[_0x31af40(0xdf)]);}
@@ -1 +1 @@
1
- (function(_0xe1a180,_0x2b8e9){const _0x13151a=a23_0x2a64,_0x1a06b8=_0xe1a180();while(!![]){try{const _0x2c1630=-parseInt(_0x13151a(0xff))/0x1+parseInt(_0x13151a(0x100))/0x2+-parseInt(_0x13151a(0x105))/0x3+parseInt(_0x13151a(0x106))/0x4+parseInt(_0x13151a(0xf9))/0x5*(-parseInt(_0x13151a(0x101))/0x6)+-parseInt(_0x13151a(0x10b))/0x7+parseInt(_0x13151a(0x109))/0x8;if(_0x2c1630===_0x2b8e9)break;else _0x1a06b8['push'](_0x1a06b8['shift']());}catch(_0x9f41c7){_0x1a06b8['push'](_0x1a06b8['shift']());}}}(a23_0x2ab7,0x5d7ab));import{jsx as a23_0x31db44,jsxs as a23_0x24aa13}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a23_0x2ab7(){const _0x2e932e=['gray','dots','正在登录...\x20','390128ADxhgH','371858ozYjLV','391212iuKgcK','then','按\x20“q”\x20退出。','请前往浏览器完成登录。','187701MAXXIV','109768cNHNEz','column','√\x20当前为有效会话,无需重新登录。','14782672ZpiTZk','*\x20登录成功!','4015193KcrmiI','50oavoVQ','finally','log'];a23_0x2ab7=function(){return _0x2e932e;};return a23_0x2ab7();}function a23_0x2a64(_0x1fc746,_0x588e5f){_0x1fc746=_0x1fc746-0xf9;const _0x2ab7d0=a23_0x2ab7();let _0x2a6465=_0x2ab7d0[_0x1fc746];return _0x2a6465;}import a23_0x45d3e9 from'ink-spinner';export function AuthServer(){const _0x5881f0=a23_0x2a64,{exit:_0x32ff1f}=useApp(),[_0x3df225,_0xcf1edb]=useState(![]),[_0x5852d3,_0x36856f]=useState(!![]),[_0x230b3b,_0x29189b]=useState(![]),[_0x3275b5,_0x28401b]=useState(![]);useEffect(()=>{const _0x2647ef=a23_0x2a64;getIsSessionValid()[_0x2647ef(0x102)](_0xcf1edb)[_0x2647ef(0xfa)](()=>_0x36856f(![]));},[]),useEffect(()=>{const _0xf9b42b=a23_0x2a64;!_0x5852d3&&_0x3df225&&(console[_0xf9b42b(0xfb)](_0xf9b42b(0x108)),_0x32ff1f());},[_0x5852d3,_0x3df225,_0x32ff1f]),useEffect(()=>{const _0x4eb996=a23_0x2a64;_0x3275b5&&(console[_0x4eb996(0xfb)](_0x4eb996(0x10a)),_0x32ff1f());},[_0x3275b5,_0x32ff1f]),useInput((_0x3bbe9c,_0x344e15)=>{_0x344e15['return']&&(_0x29189b(!![]),authServer({'silent':!![]})['then'](_0x2f1b77=>{_0x28401b(_0x2f1b77);})),_0x3bbe9c==='q'&&_0x32ff1f();});if(_0x5852d3)return null;if(_0x3df225||_0x3275b5)return null;return a23_0x31db44(Box,{'flexDirection':_0x5881f0(0x107),'marginTop':0x1,'marginBottom':0x1,'children':_0x230b3b?a23_0x24aa13(Box,{'children':[a23_0x31db44(Box,{'width':'1'}),a23_0x24aa13(Text,{'color':'green','children':[a23_0x31db44(a23_0x45d3e9,{'type':_0x5881f0(0xfd)}),'\x20\x20']}),a23_0x31db44(Text,{'children':_0x5881f0(0xfe)}),a23_0x31db44(Text,{'color':'gray','children':_0x5881f0(0x104)})]}):a23_0x24aa13(Box,{'children':[a23_0x31db44(Box,{'width':'1'}),a23_0x31db44(Text,{'children':'*\x20按回车开始登录。'}),a23_0x31db44(Text,{'color':_0x5881f0(0xfc),'children':_0x5881f0(0x103)})]})});}
1
+ function a23_0x3380(){const _0x1a9621=['810614mPwhEB','finally','then','gray','按\x20“q”\x20退出。','请前往浏览器完成登录。','log','return','945093uJyuXU','column','green','√\x20当前为有效会话,无需重新登录。','362zDQBTI','*\x20登录成功!','正在登录...\x20','dots','*\x20按回车开始登录。','1489636eMEgIn','601cKLkiA','1727934EmxcDP','4204744ahAURe','1886810WUkNtG'];a23_0x3380=function(){return _0x1a9621;};return a23_0x3380();}(function(_0x12b60d,_0x116200){const _0x4456c5=a23_0x10c8,_0x1aa37e=_0x12b60d();while(!![]){try{const _0x537002=-parseInt(_0x4456c5(0x11e))/0x1*(parseInt(_0x4456c5(0x118))/0x2)+-parseInt(_0x4456c5(0x12a))/0x3+parseInt(_0x4456c5(0x11d))/0x4+parseInt(_0x4456c5(0x121))/0x5+parseInt(_0x4456c5(0x11f))/0x6+parseInt(_0x4456c5(0x122))/0x7+-parseInt(_0x4456c5(0x120))/0x8;if(_0x537002===_0x116200)break;else _0x1aa37e['push'](_0x1aa37e['shift']());}catch(_0x15472d){_0x1aa37e['push'](_0x1aa37e['shift']());}}}(a23_0x3380,0x31d7d));import{jsx as a23_0x39dcfd,jsxs as a23_0x2f9856}from'react/jsx-runtime';function a23_0x10c8(_0x478da6,_0x9f728c){_0x478da6=_0x478da6-0x117;const _0x3380db=a23_0x3380();let _0x10c818=_0x3380db[_0x478da6];return _0x10c818;}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_0x1ee4ff from'ink-spinner';export function AuthServer(){const _0x338a24=a23_0x10c8,{exit:_0xc69dba}=useApp(),[_0x545e5c,_0x507a64]=useState(![]),[_0x1d7e21,_0x7aff27]=useState(!![]),[_0x5d977b,_0x1a5f9e]=useState(![]),[_0x47cbf4,_0x736d51]=useState(![]);useEffect(()=>{const _0x1429df=a23_0x10c8;getIsSessionValid()[_0x1429df(0x124)](_0x507a64)[_0x1429df(0x123)](()=>_0x7aff27(![]));},[]),useEffect(()=>{const _0x3396f0=a23_0x10c8;!_0x1d7e21&&_0x545e5c&&(console[_0x3396f0(0x128)](_0x3396f0(0x117)),_0xc69dba());},[_0x1d7e21,_0x545e5c,_0xc69dba]),useEffect(()=>{const _0x4cf341=a23_0x10c8;_0x47cbf4&&(console['log'](_0x4cf341(0x119)),_0xc69dba());},[_0x47cbf4,_0xc69dba]),useInput((_0x454d1a,_0x403c1e)=>{const _0x53a509=a23_0x10c8;_0x403c1e[_0x53a509(0x129)]&&(_0x1a5f9e(!![]),authServer({'silent':!![]})['then'](_0x37d334=>{_0x736d51(_0x37d334);})),_0x454d1a==='q'&&_0xc69dba();});if(_0x1d7e21)return null;if(_0x545e5c||_0x47cbf4)return null;return a23_0x39dcfd(Box,{'flexDirection':_0x338a24(0x12b),'marginTop':0x1,'marginBottom':0x1,'children':_0x5d977b?a23_0x2f9856(Box,{'children':[a23_0x39dcfd(Box,{'width':'1'}),a23_0x2f9856(Text,{'color':_0x338a24(0x12c),'children':[a23_0x39dcfd(a23_0x1ee4ff,{'type':_0x338a24(0x11b)}),'\x20\x20']}),a23_0x39dcfd(Text,{'children':_0x338a24(0x11a)}),a23_0x39dcfd(Text,{'color':_0x338a24(0x125),'children':_0x338a24(0x127)})]}):a23_0x2f9856(Box,{'children':[a23_0x39dcfd(Box,{'width':'1'}),a23_0x39dcfd(Text,{'children':_0x338a24(0x11c)}),a23_0x39dcfd(Text,{'color':'gray','children':_0x338a24(0x126)})]})});}
@@ -1 +1 @@
1
- const a24_0x5102b0=a24_0x349e;(function(_0x134d23,_0x24460d){const _0x160a22=a24_0x349e,_0x55ca97=_0x134d23();while(!![]){try{const _0x5afaf0=parseInt(_0x160a22(0x11f))/0x1+-parseInt(_0x160a22(0x121))/0x2+-parseInt(_0x160a22(0x136))/0x3*(parseInt(_0x160a22(0x123))/0x4)+parseInt(_0x160a22(0x122))/0x5+-parseInt(_0x160a22(0x11b))/0x6+-parseInt(_0x160a22(0x12d))/0x7*(-parseInt(_0x160a22(0x13f))/0x8)+parseInt(_0x160a22(0x117))/0x9;if(_0x5afaf0===_0x24460d)break;else _0x55ca97['push'](_0x55ca97['shift']());}catch(_0x25c441){_0x55ca97['push'](_0x55ca97['shift']());}}}(a24_0x2ee9,0xa2eff));import{writeFileSync}from'node:fs';import a24_0xc10d88 from'node:https';import{getUserDomain}from'../constant/domain.js';function a24_0x349e(_0x18cf47,_0x23ed61){_0x18cf47=_0x18cf47-0x116;const _0x2ee985=a24_0x2ee9();let _0x349e03=_0x2ee985[_0x18cf47];return _0x349e03;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x3c1fae){const _0x2f93ff=a24_0x349e,_0x90635d=_0x3c1fae?.['silent']||![];if(await getIsSessionValid())return!![];const _0x74a299=await(await fetch(_0x2f93ff(0x135)))[_0x2f93ff(0x129)]();return new Promise(async(_0x5bf13c,_0x585580)=>{const _0x1e92aa=_0x2f93ff;let _0xdedd83=0x0;const _0x3cf8ca=a24_0xc10d88[_0x1e92aa(0x137)](_0x74a299,async(_0x3c903b,_0x3eca78)=>{const _0x3978ba=_0x1e92aa,_0x20d3c1=getUserDomain(),_0x4044b0=_0x3c903b[_0x3978ba(0x139)][_0x3978ba(0x12e)]||'',_0x129a0b=await fetch(_0x20d3c1+_0x3978ba(0x12c),{'headers':{'cookie':_0x4044b0}})[_0x3978ba(0x11c)](_0x3c6eba=>_0x3c6eba[_0x3978ba(0x129)]()),_0x7777ad=_0x129a0b&&_0x129a0b[_0x3978ba(0x120)]&&_0x129a0b[_0x3978ba(0x13c)];if(_0x7777ad){writeFileSync(cookieFile,_0x4044b0,_0x3978ba(0x131)),_0x5bf13c(!![]);const _0x105eb5=_0x3978ba(0x128);_0x3eca78[_0x3978ba(0x140)](0xc8,{'Content-Type':_0x3978ba(0x138)}),_0x3eca78[_0x3978ba(0x13b)](_0x105eb5),_0x3cf8ca['close']();}else{const _0x3090d9=''+encodeURIComponent(_0x3978ba(0x12a)+_0xdedd83);_0x3eca78[_0x3978ba(0x140)](0x12e,{'location':_0x20d3c1+_0x3978ba(0x142)+_0x3090d9}),_0x3eca78['end']();return;}});_0x3cf8ca[_0x1e92aa(0x118)](0x0,'127.0.0.1',()=>{const _0xcce8be=_0x1e92aa,_0x1bfd43=_0x3cf8ca[_0xcce8be(0x134)]();_0xdedd83=typeof _0x1bfd43===_0xcce8be(0x132)&&_0x1bfd43?_0x1bfd43[_0xcce8be(0x126)]:Number(_0x1bfd43);const _0x1ea5c4=_0xcce8be(0x12a)+_0xdedd83;!_0x90635d&&(console['log'](_0xcce8be(0x12f)),console[_0xcce8be(0x12b)](_0xcce8be(0x119),_0x1ea5c4),console[_0xcce8be(0x12b)](_0xcce8be(0x11e)),console[_0xcce8be(0x12b)](''),console[_0xcce8be(0x12b)](_0xcce8be(0x125)),console[_0xcce8be(0x12b)]('')),openInBrowser(_0x1ea5c4)[_0xcce8be(0x11c)](_0x4d6f73=>{const _0x5ae4ff=_0xcce8be;!_0x90635d&&(_0x4d6f73?console['log'](_0x5ae4ff(0x11a)):(console[_0x5ae4ff(0x12b)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x5ae4ff(0x12b)]('🔗\x20请手动复制登录地址到浏览器:',_0x1ea5c4)),console['log'](''));})[_0xcce8be(0x116)](()=>{const _0x3f70b2=_0xcce8be;!_0x90635d&&(console[_0x3f70b2(0x12b)](_0x3f70b2(0x141)),console[_0x3f70b2(0x12b)](_0x3f70b2(0x13d),_0x1ea5c4),console[_0x3f70b2(0x12b)](''));});}),_0x3cf8ca['on'](_0x1e92aa(0x127),_0x2f6669=>{const _0x4e77c3=_0x1e92aa;!_0x90635d&&console[_0x4e77c3(0x127)]('Auth\x20server\x20error:',_0x2f6669),_0x585580(_0x2f6669);});});}function openInBrowser(_0x50a3f4){return new Promise(_0x50969f=>{const _0x513032=a24_0x349e,_0x227668=process[_0x513032(0x133)];let _0x3e391b;if(_0x227668===_0x513032(0x13e))_0x3e391b=_0x513032(0x130)+_0x50a3f4+'\x22';else _0x227668===_0x513032(0x11d)?_0x3e391b=_0x513032(0x13a)+_0x50a3f4+'\x22':_0x3e391b=_0x513032(0x124)+_0x50a3f4+'\x22';exec(_0x3e391b,_0xa42ae8=>{_0xa42ae8?_0x50969f(![]):_0x50969f(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a24_0x5102b0(0x12b)]('isAuth',isAuth);}function a24_0x2ee9(){const _0x8806c0=['json','https://dev.lovrabet.com:','log','/api/auth/get-session','1547VGLgTC','cookie','🔐\x20正在启动登录服务...','start\x20\x22\x22\x20\x22','utf-8','object','platform','address','https://g.yuntooai.com/cert/lovrabet-dev.json','107442WwCFEt','createServer','text/html;\x20charset=utf-8','headers','open\x20\x22','end','user','🔗\x20请手动复制登录地址到浏览器:','win32','464KuXiiz','writeHead','⚠️\x20\x20无法自动打开浏览器','/sign-in?redirect=','catch','8697195LAZXOU','listen','📍\x20登录地址:','✅\x20浏览器已自动打开,请在浏览器中完成登录','1314684YXPcDw','then','darwin','🌐\x20正在尝试自动打开浏览器...','755888gkyFYk','session','1899136poVrWt','4444600Dukftf','88qIIPgp','xdg-open\x20\x22','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','port','error','<!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>'];a24_0x2ee9=function(){return _0x8806c0;};return a24_0x2ee9();}
1
+ const a24_0x146fe1=a24_0x5964;function a24_0x2232(){const _0x1d4f2d=['680828MDDUNG','5556260XbOUCM','21nmnQKq','11465775IKSPDf','session','Auth\x20server\x20error:','/sign-in?redirect=','win32','cookie','end','silent','177948AovnYa','⚠️\x20\x20无法自动打开浏览器','catch','6vNLvPD','writeHead','close','port','error','text/html;\x20charset=utf-8','https://dev.lovrabet.com:','log','5277340llGDay','/api/auth/get-session','🔐\x20正在启动登录服务...','createServer','open\x20\x22','1779753LdHEnL','json','address','isAuth','listen','127.0.0.1','xdg-open\x20\x22','object','1075936FwlONr','then','start\x20\x22\x22\x20\x22','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'];a24_0x2232=function(){return _0x1d4f2d;};return a24_0x2232();}function a24_0x5964(_0x4af463,_0x55550a){_0x4af463=_0x4af463-0xd3;const _0x223223=a24_0x2232();let _0x5964ff=_0x223223[_0x4af463];return _0x5964ff;}(function(_0x880775,_0x4d5400){const _0x59c61b=a24_0x5964,_0x5483b2=_0x880775();while(!![]){try{const _0x39e96c=parseInt(_0x59c61b(0xe1))/0x1+parseInt(_0x59c61b(0xec))/0x2+-parseInt(_0x59c61b(0xd5))/0x3+parseInt(_0x59c61b(0xf7))/0x4+-parseInt(_0x59c61b(0xe2))/0x5*(-parseInt(_0x59c61b(0xef))/0x6)+-parseInt(_0x59c61b(0xe3))/0x7*(parseInt(_0x59c61b(0xdd))/0x8)+-parseInt(_0x59c61b(0xe4))/0x9;if(_0x39e96c===_0x4d5400)break;else _0x5483b2['push'](_0x5483b2['shift']());}catch(_0x24f024){_0x5483b2['push'](_0x5483b2['shift']());}}}(a24_0x2232,0xe2f97));import{writeFileSync}from'node:fs';import a24_0x613ad6 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x129583){const _0x30791f=a24_0x5964,_0x4ef43c=_0x129583?.[_0x30791f(0xeb)]||![];if(await getIsSessionValid())return!![];const _0x27ed8f=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))['json']();return new Promise(async(_0x207631,_0x54ef88)=>{const _0x24f4e9=_0x30791f;let _0x4eee2a=0x0;const _0x14f4c6=a24_0x613ad6[_0x24f4e9(0xd3)](_0x27ed8f,async(_0xd021a7,_0x580b8f)=>{const _0x49c118=_0x24f4e9,_0x17b5b3=getUserDomain(),_0x2480c9=_0xd021a7['headers'][_0x49c118(0xe9)]||'',_0x2769c7=await fetch(_0x17b5b3+_0x49c118(0xf8),{'headers':{'cookie':_0x2480c9}})[_0x49c118(0xde)](_0x9f7818=>_0x9f7818[_0x49c118(0xd6)]()),_0x72acd0=_0x2769c7&&_0x2769c7[_0x49c118(0xe5)]&&_0x2769c7['user'];if(_0x72acd0){writeFileSync(cookieFile,_0x2480c9,'utf-8'),_0x207631(!![]);const _0x3fea7c='<!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>';_0x580b8f[_0x49c118(0xf0)](0xc8,{'Content-Type':_0x49c118(0xf4)}),_0x580b8f[_0x49c118(0xea)](_0x3fea7c),_0x14f4c6[_0x49c118(0xf1)]();}else{const _0x401a8b=''+encodeURIComponent(_0x49c118(0xf5)+_0x4eee2a);_0x580b8f[_0x49c118(0xf0)](0x12e,{'location':_0x17b5b3+_0x49c118(0xe7)+_0x401a8b}),_0x580b8f['end']();return;}});_0x14f4c6[_0x24f4e9(0xd9)](0x0,_0x24f4e9(0xda),()=>{const _0x337ca8=_0x24f4e9,_0x457ad0=_0x14f4c6[_0x337ca8(0xd7)]();_0x4eee2a=typeof _0x457ad0===_0x337ca8(0xdc)&&_0x457ad0?_0x457ad0[_0x337ca8(0xf2)]:Number(_0x457ad0);const _0x1e6c04='https://dev.lovrabet.com:'+_0x4eee2a;!_0x4ef43c&&(console[_0x337ca8(0xf6)](_0x337ca8(0xf9)),console[_0x337ca8(0xf6)]('📍\x20登录地址:',_0x1e6c04),console[_0x337ca8(0xf6)]('🌐\x20正在尝试自动打开浏览器...'),console[_0x337ca8(0xf6)](''),console[_0x337ca8(0xf6)](_0x337ca8(0xe0)),console[_0x337ca8(0xf6)]('')),openInBrowser(_0x1e6c04)[_0x337ca8(0xde)](_0xb552=>{const _0x5bcd07=_0x337ca8;!_0x4ef43c&&(_0xb552?console[_0x5bcd07(0xf6)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console['log'](_0x5bcd07(0xed)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0x1e6c04)),console[_0x5bcd07(0xf6)](''));})[_0x337ca8(0xee)](()=>{const _0x5cdbea=_0x337ca8;!_0x4ef43c&&(console['log'](_0x5cdbea(0xed)),console[_0x5cdbea(0xf6)]('🔗\x20请手动复制登录地址到浏览器:',_0x1e6c04),console['log'](''));});}),_0x14f4c6['on']('error',_0x1f95ee=>{const _0x39fc13=_0x24f4e9;!_0x4ef43c&&console[_0x39fc13(0xf3)](_0x39fc13(0xe6),_0x1f95ee),_0x54ef88(_0x1f95ee);});});}function openInBrowser(_0x1021b0){return new Promise(_0x1a9969=>{const _0x44bad9=a24_0x5964,_0x5e5ada=process['platform'];let _0x35a987;if(_0x5e5ada===_0x44bad9(0xe8))_0x35a987=_0x44bad9(0xdf)+_0x1021b0+'\x22';else _0x5e5ada==='darwin'?_0x35a987=_0x44bad9(0xd4)+_0x1021b0+'\x22':_0x35a987=_0x44bad9(0xdb)+_0x1021b0+'\x22';exec(_0x35a987,_0x17e6ad=>{_0x17e6ad?_0x1a9969(![]):_0x1a9969(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a24_0x146fe1(0xd8),isAuth);}
@@ -1 +1 @@
1
- const a25_0x121c34=a25_0x38c7;(function(_0x1b505b,_0x317552){const _0x2ce073=a25_0x38c7,_0x4cd1d7=_0x1b505b();while(!![]){try{const _0x978fad=-parseInt(_0x2ce073(0x1f0))/0x1*(parseInt(_0x2ce073(0x1f5))/0x2)+-parseInt(_0x2ce073(0x1f2))/0x3+parseInt(_0x2ce073(0x1eb))/0x4+-parseInt(_0x2ce073(0x1f4))/0x5+-parseInt(_0x2ce073(0x1f1))/0x6*(-parseInt(_0x2ce073(0x1ed))/0x7)+-parseInt(_0x2ce073(0x1ee))/0x8*(-parseInt(_0x2ce073(0x1ec))/0x9)+parseInt(_0x2ce073(0x1f3))/0xa*(parseInt(_0x2ce073(0x1ea))/0xb);if(_0x978fad===_0x317552)break;else _0x4cd1d7['push'](_0x4cd1d7['shift']());}catch(_0x5d57a3){_0x4cd1d7['push'](_0x4cd1d7['shift']());}}}(a25_0x30c1,0xef4f8));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a25_0x30c1(){const _0x38d416=['1353nJUqSA','205364PtUnNO','333ODySVj','266dvcXdq','190504zIGzow','/.lovrabet','7eCusXm','1626qkAckF','320898XECpvf','159910JfNeQV','8065760ETguuT','59794aeoRfA'];a25_0x30c1=function(){return _0x38d416;};return a25_0x30c1();}function a25_0x38c7(_0x3d97ce,_0x535a6e){_0x3d97ce=_0x3d97ce-0x1ea;const _0x30c17c=a25_0x30c1();let _0x38c7c0=_0x30c17c[_0x3d97ce];return _0x38c7c0;}export const configDir=homedir()+a25_0x121c34(0x1ef);export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
1
+ const a25_0x1e8eff=a25_0x3f74;(function(_0x18c59f,_0x7492c2){const _0x3ad5c6=a25_0x3f74,_0x16a177=_0x18c59f();while(!![]){try{const _0x284504=parseInt(_0x3ad5c6(0xb1))/0x1+parseInt(_0x3ad5c6(0xb5))/0x2*(-parseInt(_0x3ad5c6(0xb0))/0x3)+parseInt(_0x3ad5c6(0xb6))/0x4*(parseInt(_0x3ad5c6(0xae))/0x5)+parseInt(_0x3ad5c6(0xb3))/0x6+-parseInt(_0x3ad5c6(0xb2))/0x7*(parseInt(_0x3ad5c6(0xaf))/0x8)+-parseInt(_0x3ad5c6(0xb7))/0x9+parseInt(_0x3ad5c6(0xad))/0xa*(-parseInt(_0x3ad5c6(0xb4))/0xb);if(_0x284504===_0x7492c2)break;else _0x16a177['push'](_0x16a177['shift']());}catch(_0x3fcac0){_0x16a177['push'](_0x16a177['shift']());}}}(a25_0x4015,0x5fb94));import{mkdirSync}from'node:fs';function a25_0x3f74(_0x341928,_0xa68fa8){_0x341928=_0x341928-0xad;const _0x40158c=a25_0x4015();let _0x3f7417=_0x40158c[_0x341928];return _0x3f7417;}import{homedir}from'node:os';function a25_0x4015(){const _0x3d37f6=['2390976mNOhTz','/.lovrabet','10OYdKxD','3828115cFggzK','9448cUChhQ','3UcIXwt','372746XKieGE','42vDUcpq','552456lftTBf','3272764HJCyMh','536174XnoJGi','4goTxim'];a25_0x4015=function(){return _0x3d37f6;};return a25_0x4015();}export const configDir=homedir()+a25_0x1e8eff(0xb8);export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a26_0x1f91(){var _0x52d7ab=['4069152qBpxlz','39097zmEGfV','4389688VKdmbD','76ZPDkla','853353LmdEkz','101240HJaxZc','8YzKsMt','5036124kyPyFq','9416603DDMaQP','250ygaZFc'];a26_0x1f91=function(){return _0x52d7ab;};return a26_0x1f91();}(function(_0x1ade7c,_0x587ed7){var _0x5769da=a26_0x25dc,_0x38cf10=_0x1ade7c();while(!![]){try{var _0x19c435=-parseInt(_0x5769da(0x11d))/0x1*(-parseInt(_0x5769da(0x118))/0x2)+-parseInt(_0x5769da(0x11c))/0x3+-parseInt(_0x5769da(0x11f))/0x4*(parseInt(_0x5769da(0x121))/0x5)+parseInt(_0x5769da(0x119))/0x6+-parseInt(_0x5769da(0x11a))/0x7+parseInt(_0x5769da(0x11e))/0x8+parseInt(_0x5769da(0x120))/0x9*(parseInt(_0x5769da(0x11b))/0xa);if(_0x19c435===_0x587ed7)break;else _0x38cf10['push'](_0x38cf10['shift']());}catch(_0x34a16b){_0x38cf10['push'](_0x38cf10['shift']());}}}(a26_0x1f91,0xca489));function a26_0x25dc(_0x501206,_0x5c9dd2){_0x501206=_0x501206-0x118;var _0x1f915b=a26_0x1f91();var _0x25dca5=_0x1f915b[_0x501206];return _0x25dca5;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
1
+ function a26_0x3631(){var _0x5dadcf=['735535agWvaL','2015805cXecrS','603060SVcvcd','36WUisrQ','843IwkNRr','332264fiMZzx','2443SIcQiL','8cQjQfD','124dYNbJP','utf-8','67495xwHKRO','3696gFIOME'];a26_0x3631=function(){return _0x5dadcf;};return a26_0x3631();}function a26_0x4fd4(_0x58d82e,_0x7cca95){_0x58d82e=_0x58d82e-0x86;var _0x363130=a26_0x3631();var _0x4fd44d=_0x363130[_0x58d82e];return _0x4fd44d;}(function(_0x1c3c44,_0x27fa77){var _0xd0b56a=a26_0x4fd4,_0x2f994c=_0x1c3c44();while(!![]){try{var _0x5ddc60=parseInt(_0xd0b56a(0x87))/0x1+parseInt(_0xd0b56a(0x91))/0x2*(-parseInt(_0xd0b56a(0x8d))/0x3)+-parseInt(_0xd0b56a(0x90))/0x4*(-parseInt(_0xd0b56a(0x89))/0x5)+parseInt(_0xd0b56a(0x88))/0x6*(parseInt(_0xd0b56a(0x8f))/0x7)+parseInt(_0xd0b56a(0x8e))/0x8*(-parseInt(_0xd0b56a(0x8c))/0x9)+-parseInt(_0xd0b56a(0x8b))/0xa+-parseInt(_0xd0b56a(0x8a))/0xb;if(_0x5ddc60===_0x27fa77)break;else _0x2f994c['push'](_0x2f994c['shift']());}catch(_0x9ee1ab){_0x2f994c['push'](_0x2f994c['shift']());}}}(a26_0x3631,0x2484a));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x5a7f1e=a26_0x4fd4;try{return readFileSync(cookieFile,_0x5a7f1e(0x86));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x411f53,_0x3ba205){const _0x370164=a27_0x1c8b,_0x5c9ac4=_0x411f53();while(!![]){try{const _0x5e4abc=parseInt(_0x370164(0x104))/0x1*(parseInt(_0x370164(0x108))/0x2)+parseInt(_0x370164(0x10d))/0x3*(-parseInt(_0x370164(0x107))/0x4)+parseInt(_0x370164(0x105))/0x5+-parseInt(_0x370164(0x106))/0x6*(-parseInt(_0x370164(0x109))/0x7)+parseInt(_0x370164(0x10e))/0x8+-parseInt(_0x370164(0x103))/0x9+-parseInt(_0x370164(0x10f))/0xa;if(_0x5e4abc===_0x3ba205)break;else _0x5c9ac4['push'](_0x5c9ac4['shift']());}catch(_0x4630b2){_0x5c9ac4['push'](_0x5c9ac4['shift']());}}}(a27_0x2e1a,0x5c52d));function a27_0x2e1a(){const _0xda7525=['utf-8','/api/auth/get-session','3606930vArFnF','731HpxQZf','3151705HmbjjM','12akXhbu','8PmEbYz','1312qKeHWV','531398MbLYiH','user','session','json','530034gBIGsu','2089432TZDENq','3906010wEaWek'];a27_0x2e1a=function(){return _0xda7525;};return a27_0x2e1a();}import{existsSync,readFileSync}from'node:fs';function a27_0x1c8b(_0x4eb1a5,_0x54e35c){_0x4eb1a5=_0x4eb1a5-0x102;const _0x2e1a23=a27_0x2e1a();let _0x1c8ba7=_0x2e1a23[_0x4eb1a5];return _0x1c8ba7;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x4e72fb=a27_0x1c8b;try{if(!existsSync(cookieFile))return![];const _0x50b223=readFileSync(cookieFile,_0x4e72fb(0x110)),_0x1f0518=await fetch(getUserDomain()+_0x4e72fb(0x102),{'headers':{'cookie':_0x50b223}})['then'](_0x326854=>_0x326854[_0x4e72fb(0x10c)]());return _0x1f0518&&_0x1f0518[_0x4e72fb(0x10b)]&&_0x1f0518[_0x4e72fb(0x10a)];}catch{}return![];}
1
+ function a27_0x1594(){const _0x301aec=['40974bhEcFo','then','2906570rjcAHS','4oFiUjT','6nuykax','session','user','403722DxHkBx','16wqEGrj','213631RlAPuK','252EgfMus','/api/auth/get-session','6642580svMXuh','4169837vCnbho','8vvabnr','json','1791864gGXsOC'];a27_0x1594=function(){return _0x301aec;};return a27_0x1594();}(function(_0x2ece99,_0xd12b2f){const _0x3a480b=a27_0x4bd7,_0x5a5d6a=_0x2ece99();while(!![]){try{const _0x23cabb=parseInt(_0x3a480b(0x8c))/0x1*(-parseInt(_0x3a480b(0x8f))/0x2)+-parseInt(_0x3a480b(0x8e))/0x3+-parseInt(_0x3a480b(0x92))/0x4*(parseInt(_0x3a480b(0x91))/0x5)+-parseInt(_0x3a480b(0x93))/0x6*(-parseInt(_0x3a480b(0x8b))/0x7)+parseInt(_0x3a480b(0x97))/0x8*(parseInt(_0x3a480b(0x96))/0x9)+parseInt(_0x3a480b(0x8a))/0xa+parseInt(_0x3a480b(0x98))/0xb*(parseInt(_0x3a480b(0x99))/0xc);if(_0x23cabb===_0xd12b2f)break;else _0x5a5d6a['push'](_0x5a5d6a['shift']());}catch(_0x287c4c){_0x5a5d6a['push'](_0x5a5d6a['shift']());}}}(a27_0x1594,0x65520));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a27_0x4bd7(_0x2b3652,_0x3accb6){_0x2b3652=_0x2b3652-0x89;const _0x159496=a27_0x1594();let _0x4bd768=_0x159496[_0x2b3652];return _0x4bd768;}export async function getIsSessionValid(){const _0x55ce52=a27_0x4bd7;try{if(!existsSync(cookieFile))return![];const _0x4c1e1b=readFileSync(cookieFile,'utf-8'),_0x4c2696=await fetch(getUserDomain()+_0x55ce52(0x89),{'headers':{'cookie':_0x4c1e1b}})[_0x55ce52(0x90)](_0x30dc9f=>_0x30dc9f[_0x55ce52(0x8d)]());return _0x4c2696&&_0x4c2696[_0x55ce52(0x94)]&&_0x4c2696[_0x55ce52(0x95)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x57d1f5,_0x1f860f){var _0x4f06a4=a28_0x4562,_0x2b8abf=_0x57d1f5();while(!![]){try{var _0x41d4c2=parseInt(_0x4f06a4(0x1d2))/0x1+-parseInt(_0x4f06a4(0x1d8))/0x2+parseInt(_0x4f06a4(0x1d7))/0x3*(-parseInt(_0x4f06a4(0x1d5))/0x4)+-parseInt(_0x4f06a4(0x1d9))/0x5+-parseInt(_0x4f06a4(0x1d6))/0x6+-parseInt(_0x4f06a4(0x1db))/0x7*(-parseInt(_0x4f06a4(0x1d1))/0x8)+parseInt(_0x4f06a4(0x1d0))/0x9*(parseInt(_0x4f06a4(0x1da))/0xa);if(_0x41d4c2===_0x1f860f)break;else _0x2b8abf['push'](_0x2b8abf['shift']());}catch(_0x330fc8){_0x2b8abf['push'](_0x2b8abf['shift']());}}}(a28_0x3687,0x5efa6));function a28_0x4562(_0x1910b6,_0xfff372){_0x1910b6=_0x1910b6-0x1cf;var _0x368736=a28_0x3687();var _0x4562dc=_0x368736[_0x1910b6];return _0x4562dc;}function a28_0x3687(){var _0x257e9b=['log','!\x20当前未登录','4ibEjnG','3068004DPUyka','1795959tanhYB','473090aMSzod','380480gkpBTI','1090lGlEIv','7VltTmB','✓\x20已退出登录','53442MJQRBx','3295224EtAkQT','752513NiUUZY'];a28_0x3687=function(){return _0x257e9b;};return a28_0x3687();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x50463c=a28_0x4562;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x50463c(0x1d3)](_0x50463c(0x1cf))):console['log'](_0x50463c(0x1d4));}
1
+ function a28_0x3c11(_0x4c0649,_0x5efa0a){_0x4c0649=_0x4c0649-0x117;var _0x47eb33=a28_0x47eb();var _0x3c1138=_0x47eb33[_0x4c0649];return _0x3c1138;}(function(_0x8364c,_0x450481){var _0x5d82db=a28_0x3c11,_0x3eb70b=_0x8364c();while(!![]){try{var _0x3fa614=parseInt(_0x5d82db(0x11b))/0x1+parseInt(_0x5d82db(0x11c))/0x2*(parseInt(_0x5d82db(0x118))/0x3)+-parseInt(_0x5d82db(0x11a))/0x4+parseInt(_0x5d82db(0x122))/0x5+-parseInt(_0x5d82db(0x123))/0x6+-parseInt(_0x5d82db(0x121))/0x7*(-parseInt(_0x5d82db(0x11e))/0x8)+parseInt(_0x5d82db(0x11d))/0x9*(-parseInt(_0x5d82db(0x120))/0xa);if(_0x3fa614===_0x450481)break;else _0x3eb70b['push'](_0x3eb70b['shift']());}catch(_0x9cfd1a){_0x3eb70b['push'](_0x3eb70b['shift']());}}}(a28_0x47eb,0x5e16e));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a28_0x47eb(){var _0x305106=['207506KQdUbJ','5750289WHlhvt','4656mhXUtN','log','10XXRDbo','609BgOMhj','2306535bGrPFi','955008PHMFNb','!\x20当前未登录','21owgvpH','✓\x20已退出登录','749076KWJVzW','132536UUflaK'];a28_0x47eb=function(){return _0x305106;};return a28_0x47eb();}export function logout(){var _0x1d3bea=a28_0x3c11;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1d3bea(0x11f)](_0x1d3bea(0x119))):console[_0x1d3bea(0x11f)](_0x1d3bea(0x117));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a29_0x1f82(){const _0xd9f2c0=['logout','boolean','1004904CMPNSE','cwd','334534bXYMWq','start','flags','string','setLogPath','logs','10304KMlzOm','create','73122oHlGtS','env','执行初始化配置命令','build','api','config','all','执行更新菜单\x20CDN\x20资源命令','1197927GdQibM','info','1392qvOJOZ','lovrabet\x20','mcp','执行预览命令','update','\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','setRawCommand','auth','appcode','4996640jAmyLL','add','preview','739340AVLrjt','\x20(监听模式)','argv','trim','exit','slice','page','error','input','init'];a29_0x1f82=function(){return _0xd9f2c0;};return a29_0x1f82();}const a29_0x369ace=a29_0x5328;(function(_0x422191,_0x1c42c5){const _0x1acd9b=a29_0x5328,_0x388b2d=_0x422191();while(!![]){try{const _0x40c472=-parseInt(_0x1acd9b(0x1bb))/0x1+-parseInt(_0x1acd9b(0x197))/0x2+parseInt(_0x1acd9b(0x19f))/0x3+-parseInt(_0x1acd9b(0x1b9))/0x4+parseInt(_0x1acd9b(0x1ad))/0x5+parseInt(_0x1acd9b(0x1a1))/0x6*(-parseInt(_0x1acd9b(0x195))/0x7)+parseInt(_0x1acd9b(0x1aa))/0x8;if(_0x40c472===_0x1c42c5)break;else _0x388b2d['push'](_0x388b2d['shift']());}catch(_0x1efa97){_0x388b2d['push'](_0x388b2d['shift']());}}}(a29_0x1f82,0x32c3c));import{jsx as a29_0x537b49}from'react/jsx-runtime';import a29_0x7dee17 from'meow';function a29_0x5328(_0x4cc63e,_0x50a86d){_0x4cc63e=_0x4cc63e-0x191;const _0x1f8241=a29_0x1f82();let _0x53286d=_0x1f8241[_0x4cc63e];return _0x53286d;}import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x7dee17(a29_0x369ace(0x1a6),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a29_0x369ace(0x1b8)},'env':{'type':a29_0x369ace(0x192)},'watch':{'type':'boolean'},'help':{'type':a29_0x369ace(0x1b8)},'appcode':{'type':a29_0x369ace(0x192)},'output':{'type':'string'},'params':{'type':a29_0x369ace(0x192)},'datasetcode':{'type':a29_0x369ace(0x192)}},'autoVersion':!![]});await run();async function run(){const _0x59eb5a=a29_0x369ace,_0x1f7297=cli['input'][0x0],_0x15e74d=cli[_0x59eb5a(0x1b5)][0x1],_0x4f5d33=cli[_0x59eb5a(0x1b5)][0x2],_0x2ab877=(_0x59eb5a(0x1a2)+process[_0x59eb5a(0x1af)][_0x59eb5a(0x1b2)](0x2)['join']('\x20'))[_0x59eb5a(0x1b0)]();logger[_0x59eb5a(0x1a7)](_0x2ab877);switch(_0x1f7297){case _0x59eb5a(0x1b6):{const _0xf593bc=cli['flags'][_0x59eb5a(0x1a9)],_0x5cccc5=cli[_0x59eb5a(0x191)][_0x59eb5a(0x198)];logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger['info'](_0x59eb5a(0x1b6),_0x59eb5a(0x199)),render(a29_0x537b49(Init,{'appcode':_0xf593bc,'env':_0x5cccc5}));break;}case _0x59eb5a(0x196):{const _0x518e65=cli[_0x59eb5a(0x1b5)][0x1]?.['trim'](),_0x4c93cf=cli['flags'][_0x59eb5a(0x198)];render(a29_0x537b49(CreateApp,{'projectCode':_0x518e65,'env':_0x4c93cf}));break;}case _0x59eb5a(0x1ab):{cli[_0x59eb5a(0x1b5)][0x1]===_0x59eb5a(0x1b3)&&(logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('add-page','执行添加页面命令'),render(a29_0x537b49(AddPage,{})));break;}case _0x59eb5a(0x1bc):{try{logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1bc),'执行启动命令'),await runStart();}catch(_0xbca29e){console['error'](_0xbca29e),process['exit'](0x1);}break;}case _0x59eb5a(0x19a):{try{logger[_0x59eb5a(0x193)](process['cwd']()),logger[_0x59eb5a(0x1a0)]('build','执行构建命令'),await runBuild();}catch(_0x33dd39){console[_0x59eb5a(0x1b4)](_0x33dd39),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x1ac):{const _0x2f5f54=cli[_0x59eb5a(0x191)]['watch'];logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1ac),_0x59eb5a(0x1a4)+(_0x2f5f54?_0x59eb5a(0x1ae):''));if(_0x2f5f54)try{await Promise[_0x59eb5a(0x19d)]([runBuildWatch(),runPreview()]);}catch(_0x1cb2e0){console['error'](_0x1cb2e0),process['exit'](0x1);}else try{await runPreview();}catch(_0x14c8e6){console[_0x59eb5a(0x1b4)](_0x14c8e6),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x19c):{render(a29_0x537b49(Config,{'cli':cli}));break;}case _0x59eb5a(0x19b):{await apiCli(cli);break;}case _0x59eb5a(0x1a8):{render(a29_0x537b49(AuthServer,{}));break;}case'menu':{if(_0x15e74d===_0x59eb5a(0x1a5)){logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('menu-update-cdn',_0x59eb5a(0x19e)),render(a29_0x537b49(AppMenuUpdateCdn,{}));break;}else render(a29_0x537b49(AppMenuSyncUI,{}));break;}case _0x59eb5a(0x1b7):{logout();break;}case _0x59eb5a(0x1a3):{const _0x3cd24c=cli['input'][0x1];await mcpCommand(_0x3cd24c);break;}case _0x59eb5a(0x194):{cli[_0x59eb5a(0x191)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x537b49(Help,{}));break;}}
2
+ const a29_0x17fc9e=a29_0x1912;(function(_0x275fd1,_0x4f1876){const _0x372ee9=a29_0x1912,_0x5168ff=_0x275fd1();while(!![]){try{const _0x457ae9=-parseInt(_0x372ee9(0x117))/0x1+-parseInt(_0x372ee9(0x11e))/0x2*(parseInt(_0x372ee9(0x118))/0x3)+-parseInt(_0x372ee9(0x104))/0x4*(-parseInt(_0x372ee9(0x10d))/0x5)+-parseInt(_0x372ee9(0x112))/0x6+parseInt(_0x372ee9(0x100))/0x7+-parseInt(_0x372ee9(0x107))/0x8+parseInt(_0x372ee9(0x124))/0x9;if(_0x457ae9===_0x4f1876)break;else _0x5168ff['push'](_0x5168ff['shift']());}catch(_0x46761e){_0x5168ff['push'](_0x5168ff['shift']());}}}(a29_0x525e,0x8e326));import{jsx as a29_0x290965}from'react/jsx-runtime';import a29_0x43db14 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';function a29_0x525e(){const _0x45b4ae=['start','setRawCommand','52315UwlGiQ','create','auth','all','flags','1049520uDcvOx','add','string','trim','page','115039LpPBxm','11781HKbDLQ','config','menu-update-cdn','setLogPath','exit','slice','232RCcxgk','mcp','lovrabet\x20','cwd','info','build','14627367xCbHTz','argv','join','appcode','error','执行更新菜单\x20CDN\x20资源命令','执行添加页面命令','4215918HGDSqY','logout','boolean','\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\x20install\x20<ide>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装\x20MCP\x20配置\x20(cursor/claude)\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20显示技能包帮助信息\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装技能包到项目\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\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','20NtsKjS','input','menu','7615384wQDoBz','执行初始化配置命令','add-page','env'];a29_0x525e=function(){return _0x45b4ae;};return a29_0x525e();}function a29_0x1912(_0xce06d,_0x17f35b){_0xce06d=_0xce06d-0x100;const _0x525e52=a29_0x525e();let _0x191221=_0x525e52[_0xce06d];return _0x191221;}import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';const cli=a29_0x43db14(a29_0x17fc9e(0x103),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x17fc9e(0x114)},'clear':{'type':a29_0x17fc9e(0x102)},'env':{'type':a29_0x17fc9e(0x114)},'watch':{'type':'boolean'},'help':{'type':a29_0x17fc9e(0x102)},'appcode':{'type':'string'},'output':{'type':'string'},'params':{'type':a29_0x17fc9e(0x114)},'datasetcode':{'type':a29_0x17fc9e(0x114)}},'autoVersion':!![]});await run();async function run(){const _0x293e31=a29_0x17fc9e,_0x284703=cli[_0x293e31(0x105)][0x0],_0x4d73e=cli['input'][0x1],_0x5479b9=cli[_0x293e31(0x105)][0x2],_0xa1623b=(_0x293e31(0x120)+process[_0x293e31(0x125)][_0x293e31(0x11d)](0x2)[_0x293e31(0x126)]('\x20'))[_0x293e31(0x115)]();logger[_0x293e31(0x10c)](_0xa1623b);switch(_0x284703){case'init':{const _0x1d3104=cli[_0x293e31(0x111)][_0x293e31(0x127)],_0xc18323=cli[_0x293e31(0x111)][_0x293e31(0x10a)];logger[_0x293e31(0x11b)](process[_0x293e31(0x121)]()),logger['info']('init',_0x293e31(0x108)),render(a29_0x290965(Init,{'appcode':_0x1d3104,'env':_0xc18323}));break;}case _0x293e31(0x10e):{const _0x21dee4=cli[_0x293e31(0x105)][0x1]?.['trim'](),_0x4bf989=cli[_0x293e31(0x111)][_0x293e31(0x10a)];render(a29_0x290965(CreateApp,{'projectCode':_0x21dee4,'env':_0x4bf989}));break;}case _0x293e31(0x113):{cli[_0x293e31(0x105)][0x1]===_0x293e31(0x116)&&(logger['setLogPath'](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x109),_0x293e31(0x12a)),render(a29_0x290965(AddPage,{})));break;}case _0x293e31(0x10b):{try{logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x10b),'执行启动命令'),await runStart();}catch(_0x3703d6){console['error'](_0x3703d6),process[_0x293e31(0x11c)](0x1);}break;}case _0x293e31(0x123):{try{logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x123),'执行构建命令'),await runBuild();}catch(_0x260788){console['error'](_0x260788),process[_0x293e31(0x11c)](0x1);}break;}case'preview':{const _0x49c4fa=cli[_0x293e31(0x111)]['watch'];logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)]('preview','执行预览命令'+(_0x49c4fa?'\x20(监听模式)':''));if(_0x49c4fa)try{await Promise[_0x293e31(0x110)]([runBuildWatch(),runPreview()]);}catch(_0x893689){console[_0x293e31(0x128)](_0x893689),process[_0x293e31(0x11c)](0x1);}else try{await runPreview();}catch(_0x5658b5){console['error'](_0x5658b5),process[_0x293e31(0x11c)](0x1);}break;}case _0x293e31(0x119):{render(a29_0x290965(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x293e31(0x10f):{render(a29_0x290965(AuthServer,{}));break;}case _0x293e31(0x106):{if(_0x4d73e==='update'){logger[_0x293e31(0x11b)](process[_0x293e31(0x121)]()),logger[_0x293e31(0x122)](_0x293e31(0x11a),_0x293e31(0x129)),render(a29_0x290965(AppMenuUpdateCdn,{}));break;}else render(a29_0x290965(AppMenuSyncUI,{}));break;}case _0x293e31(0x101):{logout();break;}case _0x293e31(0x11f):{const _0x21cd74=cli[_0x293e31(0x105)][0x1],_0x197b00=cli[_0x293e31(0x105)][_0x293e31(0x11d)](0x2);await mcpCommand(_0x21cd74,_0x197b00,cli['flags']);break;}case'skill':{const _0x31efd8=cli[_0x293e31(0x105)][0x1],_0x5d8d16=cli[_0x293e31(0x105)]['slice'](0x2);await skillsCommand(_0x31efd8,_0x5d8d16,cli[_0x293e31(0x111)]);break;}case'logs':{cli[_0x293e31(0x111)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x290965(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0xa47d15,_0x533341){const _0x37eb74=a30_0x3fb2,_0x1818d9=_0xa47d15();while(!![]){try{const _0x5870da=-parseInt(_0x37eb74(0x1be))/0x1*(-parseInt(_0x37eb74(0x1c0))/0x2)+-parseInt(_0x37eb74(0x1af))/0x3*(parseInt(_0x37eb74(0x1b1))/0x4)+parseInt(_0x37eb74(0x1bd))/0x5*(parseInt(_0x37eb74(0x1b2))/0x6)+-parseInt(_0x37eb74(0x1c2))/0x7+parseInt(_0x37eb74(0x1b8))/0x8+-parseInt(_0x37eb74(0x1c1))/0x9*(parseInt(_0x37eb74(0x1bb))/0xa)+parseInt(_0x37eb74(0x1b7))/0xb;if(_0x5870da===_0x533341)break;else _0x1818d9['push'](_0x1818d9['shift']());}catch(_0x1ee31a){_0x1818d9['push'](_0x1818d9['shift']());}}}(a30_0x1e72,0x87cf2));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a30_0x1e72(){const _0xd26f08=['260MymiSd','vite','44615qzRvQq','89tuOUQV','npm\x20run\x20build\x20exited\x20with\x20code\x20','23858HxPRtM','115344XvLNel','2435377lrSnyk','870LHlOKK','node_modules','14152sZUsHp','90ZLCCif','env','PATH','cwd','error','6018958HZcEGm','4165736wflCLF','close','.bin'];a30_0x1e72=function(){return _0xd26f08;};return a30_0x1e72();}function a30_0x3fb2(_0x1eec03,_0x273a49){_0x1eec03=_0x1eec03-0x1af;const _0x1e7254=a30_0x1e72();let _0x3fb21a=_0x1e7254[_0x1eec03];return _0x3fb21a;}export function runBuildWatch(){return new Promise((_0x855810,_0x2ba4a5)=>{const _0x3beb54=a30_0x3fb2,_0x15081d=spawn(_0x3beb54(0x1bc),['build','--watch'],{'stdio':'inherit','shell':!![],'env':{...process[_0x3beb54(0x1b3)],'PATH':''+join(process[_0x3beb54(0x1b5)](),_0x3beb54(0x1b0),_0x3beb54(0x1ba))+delimiter+process['env'][_0x3beb54(0x1b4)]}});_0x15081d['on'](_0x3beb54(0x1b9),_0x333952=>{const _0x4427a5=_0x3beb54;if(_0x333952===0x0||_0x333952===null)_0x855810();else _0x2ba4a5(new Error(_0x4427a5(0x1bf)+_0x333952));}),_0x15081d['on'](_0x3beb54(0x1b6),_0x2ba4a5);});}
1
+ function a30_0x21bd(_0x2dea71,_0x5885cb){_0x2dea71=_0x2dea71-0x1db;const _0x5be469=a30_0x5be4();let _0x21bd0d=_0x5be469[_0x2dea71];return _0x21bd0d;}(function(_0x60c9b9,_0x3dd650){const _0x2e88b4=a30_0x21bd,_0x15cc64=_0x60c9b9();while(!![]){try{const _0x14113c=parseInt(_0x2e88b4(0x1e5))/0x1+-parseInt(_0x2e88b4(0x1e7))/0x2+parseInt(_0x2e88b4(0x1de))/0x3+-parseInt(_0x2e88b4(0x1e3))/0x4*(-parseInt(_0x2e88b4(0x1e6))/0x5)+-parseInt(_0x2e88b4(0x1e4))/0x6*(parseInt(_0x2e88b4(0x1e1))/0x7)+parseInt(_0x2e88b4(0x1e9))/0x8+-parseInt(_0x2e88b4(0x1e8))/0x9*(-parseInt(_0x2e88b4(0x1dd))/0xa);if(_0x14113c===_0x3dd650)break;else _0x15cc64['push'](_0x15cc64['shift']());}catch(_0x17e461){_0x15cc64['push'](_0x15cc64['shift']());}}}(a30_0x5be4,0xb5df5));function a30_0x5be4(){const _0x5e3b98=['10210sxDKcf','2450402yqCmGp','900333rPYXoj','9031808eKclEm','env','cwd','build','40kXbKFb','1347285jYZQcA','.bin','inherit','6385547dryHEk','PATH','68ASvRwv','6tNGwFw','869438QqCwwe'];a30_0x5be4=function(){return _0x5e3b98;};return a30_0x5be4();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x3c39b2,_0x452ba7)=>{const _0x39514a=a30_0x21bd,_0x11cd74=spawn('vite',[_0x39514a(0x1dc),'--watch'],{'stdio':_0x39514a(0x1e0),'shell':!![],'env':{...process[_0x39514a(0x1ea)],'PATH':''+join(process[_0x39514a(0x1db)](),'node_modules',_0x39514a(0x1df))+delimiter+process[_0x39514a(0x1ea)][_0x39514a(0x1e2)]}});_0x11cd74['on']('close',_0x671f29=>{if(_0x671f29===0x0||_0x671f29===null)_0x3c39b2();else _0x452ba7(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x671f29));}),_0x11cd74['on']('error',_0x452ba7);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5f2dcd,_0x5a3bc4){const _0x5a4731=a31_0x2a6f,_0x4c0f57=_0x5f2dcd();while(!![]){try{const _0x2db443=parseInt(_0x5a4731(0xb1))/0x1+parseInt(_0x5a4731(0xae))/0x2+parseInt(_0x5a4731(0x96))/0x3*(-parseInt(_0x5a4731(0x98))/0x4)+-parseInt(_0x5a4731(0xb2))/0x5*(parseInt(_0x5a4731(0xa7))/0x6)+-parseInt(_0x5a4731(0x95))/0x7*(parseInt(_0x5a4731(0x93))/0x8)+-parseInt(_0x5a4731(0x97))/0x9*(-parseInt(_0x5a4731(0x9b))/0xa)+-parseInt(_0x5a4731(0x9c))/0xb;if(_0x2db443===_0x5a3bc4)break;else _0x4c0f57['push'](_0x4c0f57['shift']());}catch(_0x3dde76){_0x4c0f57['push'](_0x4c0f57['shift']());}}}(a31_0x1495,0xc5a85));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x1495(){const _0xd47cdc=['1458666kCdcak','995ysifxe','toString','env','125144wcPsJZ','now','7dDVIgc','2699847OYjSXK','5399289SgHDWQ','4kmbhrm','stderr','项目构建出错','20TZcvIs','12206150BmKwmP','success','npm','close','cwd','run','build','info','项目构建成功','.bin','error','28818DNrDol','npm\x20run\x20build','trim','pipe','inherit','PATH','node_modules','2264272MfvQkK','data','npm\x20run\x20build\x20exited\x20with\x20code\x20'];a31_0x1495=function(){return _0xd47cdc;};return a31_0x1495();}function a31_0x2a6f(_0x397c7b,_0x13bee9){_0x397c7b=_0x397c7b-0x92;const _0x1495bb=a31_0x1495();let _0x2a6f27=_0x1495bb[_0x397c7b];return _0x2a6f27;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3a8c9f,_0x3b575b)=>{const _0x545e24=a31_0x2a6f,_0x20edc2=Date[_0x545e24(0x94)]();logger[_0x545e24(0xa3)](_0x545e24(0xa2),'开始构建项目',{'command':_0x545e24(0xa8)});let _0x59dad0='';const _0xc59baf=spawn(_0x545e24(0x9e),[_0x545e24(0xa1),_0x545e24(0xa2)],{'stdio':[_0x545e24(0xab),_0x545e24(0xab),_0x545e24(0xaa)],'shell':!![],'env':{...process[_0x545e24(0x92)],'PATH':''+join(process['cwd'](),_0x545e24(0xad),_0x545e24(0xa5))+delimiter+process[_0x545e24(0x92)][_0x545e24(0xac)]}});_0xc59baf[_0x545e24(0x99)]?.['on'](_0x545e24(0xaf),_0x54f353=>{const _0x3ee2ff=_0x545e24;_0x59dad0+=_0x54f353[_0x3ee2ff(0xb3)]();}),_0xc59baf['on'](_0x545e24(0x9f),_0x2b6910=>{const _0x236163=_0x545e24,_0x1e19b6=Date[_0x236163(0x94)]()-_0x20edc2;if(_0x2b6910===0x0||_0x2b6910===null)logger[_0x236163(0x9d)](_0x236163(0xa2),_0x236163(0xa4),_0x1e19b6),_0x3a8c9f();else{const _0x2845c5={'exitCode':_0x2b6910,'duration':_0x1e19b6,'command':_0x236163(0xa8),'cwd':process[_0x236163(0xa0)]()};_0x59dad0['trim']()&&(_0x2845c5[_0x236163(0x99)]=_0x59dad0['trim']()),logger[_0x236163(0xa6)](_0x236163(0xa2),'项目构建失败',_0x2845c5),_0x3b575b(new Error(_0x236163(0xb0)+_0x2b6910));}}),_0xc59baf['on'](_0x545e24(0xa6),_0x3777c0=>{const _0x2c3810=_0x545e24,_0x9798a8=Date['now']()-_0x20edc2;logger[_0x2c3810(0xa6)](_0x2c3810(0xa2),_0x2c3810(0x9a),{'error':_0x3777c0['message'],'duration':_0x9798a8,'stderr':_0x59dad0[_0x2c3810(0xa9)]()||undefined}),_0x3b575b(_0x3777c0);});});}
1
+ (function(_0x68236,_0x4f974b){const _0x47efb6=a31_0x192e,_0x3549ef=_0x68236();while(!![]){try{const _0x389043=parseInt(_0x47efb6(0x17e))/0x1*(parseInt(_0x47efb6(0x17c))/0x2)+-parseInt(_0x47efb6(0x17d))/0x3+parseInt(_0x47efb6(0x182))/0x4+parseInt(_0x47efb6(0x192))/0x5*(-parseInt(_0x47efb6(0x198))/0x6)+-parseInt(_0x47efb6(0x181))/0x7+parseInt(_0x47efb6(0x17f))/0x8*(parseInt(_0x47efb6(0x18c))/0x9)+parseInt(_0x47efb6(0x186))/0xa*(-parseInt(_0x47efb6(0x189))/0xb);if(_0x389043===_0x4f974b)break;else _0x3549ef['push'](_0x3549ef['shift']());}catch(_0x58ece8){_0x3549ef['push'](_0x3549ef['shift']());}}}(a31_0x328d,0xb72fd));function a31_0x328d(){const _0x1d2d91=['.bin','success','4308111hBMdHu','build','env','npm\x20run\x20build\x20exited\x20with\x20code\x20','error','项目构建失败','85jUbLeK','项目构建出错','node_modules','npm','run','开始构建项目','35292WVcjRN','cwd','inherit','message','2jKQmuE','26388vUzYDD','530569gGWxgn','24JCvTHg','toString','6201937PyaaUD','372604ICNSPO','now','npm\x20run\x20build','trim','149830ZfvMZf','stderr','data','231zNZSdT'];a31_0x328d=function(){return _0x1d2d91;};return a31_0x328d();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a31_0x192e(_0x1385cc,_0x4088b0){_0x1385cc=_0x1385cc-0x17a;const _0x328d1b=a31_0x328d();let _0x192eae=_0x328d1b[_0x1385cc];return _0x192eae;}export function runBuild(){return new Promise((_0x55ccdd,_0x1ba5e6)=>{const _0x14a984=a31_0x192e,_0x362997=Date['now']();logger['info'](_0x14a984(0x18d),_0x14a984(0x197),{'command':'npm\x20run\x20build'});let _0x161c7e='';const _0x46d0b5=spawn(_0x14a984(0x195),[_0x14a984(0x196),'build'],{'stdio':[_0x14a984(0x17a),_0x14a984(0x17a),'pipe'],'shell':!![],'env':{...process[_0x14a984(0x18e)],'PATH':''+join(process[_0x14a984(0x199)](),_0x14a984(0x194),_0x14a984(0x18a))+delimiter+process[_0x14a984(0x18e)]['PATH']}});_0x46d0b5[_0x14a984(0x187)]?.['on'](_0x14a984(0x188),_0x5e93a4=>{const _0x5ef660=_0x14a984;_0x161c7e+=_0x5e93a4[_0x5ef660(0x180)]();}),_0x46d0b5['on']('close',_0x51c4d3=>{const _0x59886a=_0x14a984,_0x32cbed=Date[_0x59886a(0x183)]()-_0x362997;if(_0x51c4d3===0x0||_0x51c4d3===null)logger[_0x59886a(0x18b)](_0x59886a(0x18d),'项目构建成功',_0x32cbed),_0x55ccdd();else{const _0x550709={'exitCode':_0x51c4d3,'duration':_0x32cbed,'command':_0x59886a(0x184),'cwd':process[_0x59886a(0x199)]()};_0x161c7e['trim']()&&(_0x550709['stderr']=_0x161c7e['trim']()),logger[_0x59886a(0x190)]('build',_0x59886a(0x191),_0x550709),_0x1ba5e6(new Error(_0x59886a(0x18f)+_0x51c4d3));}}),_0x46d0b5['on'](_0x14a984(0x190),_0xc45062=>{const _0x2591a4=_0x14a984,_0x593d73=Date[_0x2591a4(0x183)]()-_0x362997;logger['error'](_0x2591a4(0x18d),_0x2591a4(0x193),{'error':_0xc45062[_0x2591a4(0x17b)],'duration':_0x593d73,'stderr':_0x161c7e[_0x2591a4(0x185)]()||undefined}),_0x1ba5e6(_0xc45062);});});}