@lovrabet/cli 1.1.22 → 1.1.23
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.
- package/lib/add-page/input-page-router.js +1 -1
- package/lib/add-page/main.js +1 -1
- package/lib/add-page/select-page-template.js +1 -1
- package/lib/api/api-doc-ui.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/app-menu/app-menu-sync-ui.js +1 -1
- package/lib/app-menu/create-menu.js +1 -1
- package/lib/app-menu/get-local-pages.js +1 -1
- package/lib/app-menu/get-online-menu-list.js +1 -1
- package/lib/app-menu/valid-url.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +181 -115
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x18fa(){const _0x1b5f12=['info','创建菜单成功:','application/json','log','1599885LTeUAH','path','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','includes','4997508vcTmMX','未知错误','正在创建菜单:\x20','label','errorCode','创建菜单失败:\x20','stringify','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','76617QQoYoC','20FWAAGZ','length','16CXLIzc','!\x20请使用以下方式之一:','import','POST','appcode','3836bYJOdw','procode','菜单创建成功:\x20','批量创建菜单完成,共\x20','create-menu','json','status','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','resources','8hpivXc','create-menus','error','all','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','创建菜单失败,HTTP状态码:\x20','30GIkEOU','/smartapi/menu/create','8cobWFX','203413vYGQnC','errorMsg','success','446875IWfaya','1231483yxTxCR'];a11_0x18fa=function(){return _0x1b5f12;};return a11_0x18fa();}(function(_0x16bc6c,_0x59b786){const _0xdb4010=a11_0x2320,_0x3f2ac1=_0x16bc6c();while(!![]){try{const _0x19ffd7=parseInt(_0xdb4010(0x102))/0x1*(parseInt(_0xdb4010(0x120))/0x2)+parseInt(_0xdb4010(0x118))/0x3*(parseInt(_0xdb4010(0x11b))/0x4)+-parseInt(_0xdb4010(0x106))/0x5+-parseInt(_0xdb4010(0x100))/0x6*(-parseInt(_0xdb4010(0x103))/0x7)+parseInt(_0xdb4010(0x129))/0x8*(parseInt(_0xdb4010(0x10c))/0x9)+parseInt(_0xdb4010(0x119))/0xa*(parseInt(_0xdb4010(0x107))/0xb)+-parseInt(_0xdb4010(0x110))/0xc;if(_0x19ffd7===_0x59b786)break;else _0x3f2ac1['push'](_0x3f2ac1['shift']());}catch(_0x34ebc3){_0x3f2ac1['push'](_0x3f2ac1['shift']());}}}(a11_0x18fa,0x26ba8));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_0x2320(_0x27bf15,_0x37e39c){const _0x18faea=a11_0x18fa();return a11_0x2320=function(_0x232057,_0x519aa2){_0x232057=_0x232057-0xfe;let _0x57b990=_0x18faea[_0x232057];return _0x57b990;},a11_0x2320(_0x27bf15,_0x37e39c);}const config=readConfig();export async function createMenu(_0x182f58){const _0x327a8a=a11_0x2320,_0x3104ac=config?.[_0x327a8a(0x11f)];if(!_0x3104ac){const _0x47198e='未提供应用AppCode,且配置中也没有默认值';logger[_0x327a8a(0x12b)](_0x327a8a(0x124),_0x47198e),console[_0x327a8a(0x12b)]('×\x20'+_0x47198e),console['log'](_0x327a8a(0x11c)),console[_0x327a8a(0x10b)](_0x327a8a(0x117)),console[_0x327a8a(0x10b)](_0x327a8a(0x10e));return;}logger[_0x327a8a(0x108)](_0x327a8a(0x124),_0x327a8a(0x112)+_0x182f58[_0x327a8a(0x113)]+'\x20('+_0x182f58[_0x327a8a(0x10d)]+')');const _0x20a42e={'appCode':_0x3104ac,'type':_0x327a8a(0x121),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x182f58[_0x327a8a(0x128)]?JSON['stringify'](_0x182f58[_0x327a8a(0x128)]):undefined},..._0x182f58},_0x3e0d25=await fetch(getApiDomain()+_0x327a8a(0x101),{'method':_0x327a8a(0x11e),'body':JSON['stringify'](_0x20a42e),'headers':{'Content-Type':_0x327a8a(0x10a),'Cookie':getCookie()}});if(!_0x3e0d25['ok']){if(_0x3e0d25[_0x327a8a(0x126)]===0x191){const _0x4a999e=_0x327a8a(0x127);logger['error'](_0x327a8a(0x124),_0x4a999e,{'status':_0x3e0d25[_0x327a8a(0x126)],'menu':_0x182f58['label']});throw new Error(_0x4a999e);}const _0x11f91e=_0x327a8a(0xff)+_0x3e0d25['status'];logger[_0x327a8a(0x12b)](_0x327a8a(0x124),_0x11f91e,{'menu':_0x182f58[_0x327a8a(0x113)]});throw new Error(_0x11f91e);}const _0x764da1=await _0x3e0d25[_0x327a8a(0x125)]();if(!_0x764da1[_0x327a8a(0x105)]){const _0x39e678=_0x327a8a(0x115)+(_0x764da1[_0x327a8a(0x104)]||_0x327a8a(0x111));logger[_0x327a8a(0x12b)]('create-menu',_0x39e678,{'errorCode':_0x764da1[_0x327a8a(0x114)],'errorMsg':_0x764da1[_0x327a8a(0x104)],'menu':_0x182f58[_0x327a8a(0x113)]});throw new Error(_0x39e678);}logger['info'](_0x327a8a(0x124),_0x327a8a(0x122)+_0x182f58[_0x327a8a(0x113)],_0x764da1['data']),console[_0x327a8a(0x10b)](_0x327a8a(0x109),_0x764da1['data']);}async function _createMenu(_0x7d8602,_0x50f7e0){const _0x1179e4=a11_0x2320,_0x26dfa0=config?.[_0x1179e4(0x11f)];if(!_0x26dfa0){const _0x552b72='未提供应用AppCode,且配置中也没有默认值';logger[_0x1179e4(0x12b)](_0x1179e4(0x124),_0x552b72),console[_0x1179e4(0x12b)]('×\x20'+_0x552b72),console[_0x1179e4(0x10b)](_0x1179e4(0x11c)),console[_0x1179e4(0x10b)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x1179e4(0x10e));return;}const _0x25c6ac={'appCode':_0x26dfa0,'type':_0x1179e4(0x121),'sort':0x0,'extend':{'loadScriptMode':_0x1179e4(0x11d),'resources':_0x50f7e0?JSON[_0x1179e4(0x116)](_0x50f7e0):undefined},'label':_0x7d8602[_0x1179e4(0x113)],'path':_0x7d8602[_0x1179e4(0x10d)]},_0x1dd5fb=await fetch(getApiDomain()+_0x1179e4(0x101),{'method':_0x1179e4(0x11e),'body':JSON[_0x1179e4(0x116)](_0x25c6ac),'headers':{'Content-Type':_0x1179e4(0x10a),'Cookie':getCookie()}});if(!_0x1dd5fb['ok']){if(_0x1dd5fb[_0x1179e4(0x126)]===0x191){const _0x4dec33=_0x1179e4(0x127);logger[_0x1179e4(0x12b)](_0x1179e4(0x124),_0x4dec33,{'status':_0x1dd5fb[_0x1179e4(0x126)],'menu':_0x7d8602[_0x1179e4(0x113)]});throw new Error(_0x4dec33);}const _0x1ba9eb='创建菜单失败,HTTP状态码:\x20'+_0x1dd5fb[_0x1179e4(0x126)];logger[_0x1179e4(0x12b)](_0x1179e4(0x124),_0x1ba9eb,{'menu':_0x7d8602[_0x1179e4(0x113)]});throw new Error(_0x1ba9eb);}const _0x22fdd0=await _0x1dd5fb[_0x1179e4(0x125)]();if(!_0x22fdd0[_0x1179e4(0x105)]){if(_0x22fdd0[_0x1179e4(0x114)]==='0011'||_0x22fdd0[_0x1179e4(0x104)]?.[_0x1179e4(0x10f)]('登录')){const _0x3258fa=_0x1179e4(0xfe);logger[_0x1179e4(0x12b)](_0x1179e4(0x124),_0x3258fa,{'errorCode':_0x22fdd0[_0x1179e4(0x114)],'errorMsg':_0x22fdd0['errorMsg'],'menu':_0x7d8602[_0x1179e4(0x113)]});throw new Error(_0x3258fa);}const _0x9478d8=_0x1179e4(0x115)+(_0x22fdd0[_0x1179e4(0x104)]||_0x1179e4(0x111));logger[_0x1179e4(0x12b)]('create-menu',_0x9478d8,{'errorCode':_0x22fdd0[_0x1179e4(0x114)],'errorMsg':_0x22fdd0[_0x1179e4(0x104)],'menu':_0x7d8602[_0x1179e4(0x113)]});throw new Error(_0x9478d8);}logger[_0x1179e4(0x108)](_0x1179e4(0x124),'菜单创建成功:\x20'+_0x7d8602['label']);}export async function createMenus(_0x14bd09,_0x2e7319){const _0x1a6e4d=a11_0x2320;logger[_0x1a6e4d(0x108)]('create-menus','开始批量创建菜单,共\x20'+_0x14bd09[_0x1a6e4d(0x11a)]+'\x20个'),await Promise[_0x1a6e4d(0x12c)](_0x14bd09['map'](async _0x59db42=>{await _createMenu(_0x59db42,_0x2e7319);})),logger[_0x1a6e4d(0x108)](_0x1a6e4d(0x12a),_0x1a6e4d(0x123)+_0x14bd09['length']+'\x20个');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0xe086d3=a12_0x369c;function a12_0x1495(){const _0x2a7b3c=['8FDgvuQ','.tsx','80ybyzSg','filter','30uTecJm','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','endsWith','4316bbkjJh','index.tsx','2828vpNBrP','src/pages','4313691kfNXji','utf-8','trim','3411981RpIqQf','replace','905iLpnWz','3216130YTULVF','2620555LZQseA','16361521JBxjTf'];a12_0x1495=function(){return _0x2a7b3c;};return a12_0x1495();}(function(_0x587213,_0x34cc15){const _0x4533bc=a12_0x369c,_0x2405cb=_0x587213();while(!![]){try{const _0x25a26f=-parseInt(_0x4533bc(0xa4))/0x1*(parseInt(_0x4533bc(0x9c))/0x2)+parseInt(_0x4533bc(0xa9))/0x3+-parseInt(_0x4533bc(0xa2))/0x4*(-parseInt(_0x4533bc(0xab))/0x5)+-parseInt(_0x4533bc(0x9e))/0x6*(parseInt(_0x4533bc(0x98))/0x7)+-parseInt(_0x4533bc(0x9a))/0x8*(-parseInt(_0x4533bc(0xa6))/0x9)+-parseInt(_0x4533bc(0xac))/0xa+parseInt(_0x4533bc(0x99))/0xb;if(_0x25a26f===_0x34cc15)break;else _0x2405cb['push'](_0x2405cb['shift']());}catch(_0x3b41d3){_0x2405cb['push'](_0x2405cb['shift']());}}}(a12_0x1495,0xf260a));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a12_0x369c(_0x5f2b4d,_0x1dddf3){const _0x14953b=a12_0x1495();return a12_0x369c=function(_0x369cf9,_0x51ed26){_0x369cf9=_0x369cf9-0x98;let _0xb2b6d2=_0x14953b[_0x369cf9];return _0xb2b6d2;},a12_0x369c(_0x5f2b4d,_0x1dddf3);}const pagesDir=resolve(process['cwd'](),a12_0xe086d3(0xa5));export function extractTitleFromComment(_0x4d2518){const _0x5b429a=a12_0xe086d3;try{const _0x46d4e0=readFileSync(_0x4d2518,_0x5b429a(0xa7)),_0x326285=_0x46d4e0['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x326285&&_0x326285[0x1]){const _0x1948d8=_0x326285[0x1],_0x3dd35f=_0x1948d8[_0x5b429a(0xa0)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3dd35f&&_0x3dd35f[0x1])return _0x3dd35f[0x1][_0x5b429a(0xa8)]();}let _0x30058a=null;const _0x3983e0=_0x46d4e0['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3983e0&&_0x3983e0[0x1]&&(_0x30058a=_0x3983e0[0x1]);if(!_0x30058a){const _0xee2608=_0x46d4e0['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xee2608&&_0xee2608[0x1]&&(_0x30058a=_0xee2608[0x1]);}if(_0x30058a){const _0x125ff0=new RegExp('\x5cb'+_0x30058a+_0x5b429a(0x9f)),_0x1f70d9=_0x46d4e0[_0x5b429a(0xa0)](_0x125ff0);if(_0x1f70d9&&_0x1f70d9[0x1])return _0x1f70d9[0x1];return _0x30058a;}return null;}catch(_0x56eee2){return null;}}export function getLocalPages(_0x3e442e=pagesDir,_0x2a3e29=pagesDir){const _0x3b37cb=a12_0xe086d3;let _0x58372f=[];const _0x4060f8=readdirSync(_0x3e442e);return _0x4060f8['forEach'](_0x3b8a42=>{const _0x233893=a12_0x369c,_0x4ec973=join(_0x3e442e,_0x3b8a42),_0x3bdc5d=statSync(_0x4ec973);if(_0x3bdc5d&&_0x3bdc5d['isDirectory']())_0x58372f=_0x58372f['concat'](getLocalPages(_0x4ec973,_0x2a3e29));else{if(_0x3b8a42[_0x233893(0xa1)](_0x233893(0x9b))){let _0x339430=relative(_0x2a3e29,_0x4ec973);_0x339430[_0x233893(0xa1)](_0x233893(0xa3))?_0x339430=_0x339430[_0x233893(0xaa)](/index\.tsx$/,''):_0x339430=_0x339430[_0x233893(0xaa)](/\.tsx$/,'');_0x339430[_0x233893(0xa1)]('/')&&(_0x339430=_0x339430['slice'](0x0,-0x1));const _0x4a7961=extractTitleFromComment(_0x4ec973),_0x2c7289=_0x4a7961||_0x339430;_0x58372f['push']({'path':_0x339430,'label':_0x2c7289});}}}),_0x58372f[_0x3b37cb(0x9d)](_0x29aa56=>_0x29aa56['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7157ae,_0x55a461){const _0x38848c=a13_0x34e7,_0x424c46=_0x7157ae();while(!![]){try{const _0x472cd4=parseInt(_0x38848c(0x8a))/0x1+parseInt(_0x38848c(0x92))/0x2*(-parseInt(_0x38848c(0x94))/0x3)+-parseInt(_0x38848c(0x76))/0x4+parseInt(_0x38848c(0x7a))/0x5*(parseInt(_0x38848c(0x75))/0x6)+-parseInt(_0x38848c(0x87))/0x7+-parseInt(_0x38848c(0x85))/0x8+parseInt(_0x38848c(0x99))/0x9;if(_0x472cd4===_0x55a461)break;else _0x424c46['push'](_0x424c46['shift']());}catch(_0xb13d7b){_0x424c46['push'](_0x424c46['shift']());}}}(a13_0x1ca4,0xcac31));import{useEffect,useState}from'react';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();function a13_0x34e7(_0x29e5d2,_0x5c45bb){const _0x1ca472=a13_0x1ca4();return a13_0x34e7=function(_0x34e747,_0x1f9c17){_0x34e747=_0x34e747-0x75;let _0x592eed=_0x1ca472[_0x34e747];return _0x592eed;},a13_0x34e7(_0x29e5d2,_0x5c45bb);}function a13_0x1ca4(){const _0x5d642f=['path','get-online-menu-list','5259455kbqMRS','info','服务端返回空菜单列表','获取菜单列表失败,HTTP状态码:\x20','finally','application/json','errorMsg','GET','catch','then','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','9406072aDDePc','status','3752168moeaiH','log','获取菜单列表失败','1400754maqBer','json','map','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','error','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','success','获取菜单列表失败:\x20','1390bwPFEx','appcode','4683QQrtcy','data','message','length','label','17256465QXbDah','errorCode','6DeTPhl','2971356PZTYDN','正在获取线上菜单列表...\x20(appCode:\x20'];a13_0x1ca4=function(){return _0x5d642f;};return a13_0x1ca4();}export async function getOnlineMenuList(){const _0x29e693=a13_0x34e7,_0xee8949=config?.[_0x29e693(0x93)];if(!_0xee8949){const _0x23ad63='未提供应用AppCode,且配置中也没有默认值';return logger[_0x29e693(0x8e)](_0x29e693(0x79),_0x23ad63),console['error']('×\x20'+_0x23ad63),console[_0x29e693(0x88)]('!\x20请使用以下方式之一:'),console[_0x29e693(0x88)](_0x29e693(0x8f)),console[_0x29e693(0x88)](_0x29e693(0x84)),[];}logger[_0x29e693(0x7b)](_0x29e693(0x79),_0x29e693(0x77)+_0xee8949+')');const _0x560615=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0xee8949,{'method':_0x29e693(0x81),'headers':{'Content-Type':_0x29e693(0x7f),'Cookie':getCookie()}});if(!_0x560615['ok']){if(_0x560615[_0x29e693(0x86)]===0x191){const _0x2647fb=_0x29e693(0x8d);logger[_0x29e693(0x8e)](_0x29e693(0x79),_0x2647fb,{'status':_0x560615[_0x29e693(0x86)]});throw new Error(_0x2647fb);}const _0x5d86f1=_0x29e693(0x7d)+_0x560615[_0x29e693(0x86)];logger[_0x29e693(0x8e)](_0x29e693(0x79),_0x5d86f1);throw new Error(_0x5d86f1);}const _0x2bea9b=await _0x560615[_0x29e693(0x8b)]();if(!_0x2bea9b[_0x29e693(0x90)]){const _0x5a8921=_0x29e693(0x91)+(_0x2bea9b[_0x29e693(0x80)]||'未知错误');logger[_0x29e693(0x8e)]('get-online-menu-list',_0x5a8921,{'errorCode':_0x2bea9b[_0x29e693(0x9a)],'errorMsg':_0x2bea9b['errorMsg']});throw new Error(_0x5a8921);}if(!_0x2bea9b[_0x29e693(0x95)])return logger['info'](_0x29e693(0x79),_0x29e693(0x7c)),[];return logger['info']('get-online-menu-list','成功获取\x20'+_0x2bea9b['data'][_0x29e693(0x97)]+'\x20个线上菜单'),_0x2bea9b[_0x29e693(0x95)][_0x29e693(0x8c)](_0xb47b79=>({'path':_0xb47b79[_0x29e693(0x78)],'label':_0xb47b79[_0x29e693(0x98)]}));}export function useGetOnlineMenuList(){const [_0x3a1ca5,_0x364635]=useState([]),[_0x1c1d9c,_0x61ab93]=useState(!![]),[_0xa8d7ae,_0x3fa5c1]=useState('');return useEffect(()=>{const _0x223797=a13_0x34e7;_0x61ab93(!![]),_0x3fa5c1(''),getOnlineMenuList()[_0x223797(0x83)](_0x364635)[_0x223797(0x82)](_0x323493=>{const _0x4968aa=_0x223797;_0x3fa5c1(_0x323493[_0x4968aa(0x96)]||_0x4968aa(0x89));})[_0x223797(0x7e)](()=>_0x61ab93(![]));},[]),{'menuList':_0x3a1ca5,'loading':_0x1c1d9c,'error':_0xa8d7ae};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56457a,_0x273aee){const _0x346b95=a15_0x26cf,_0x3f67e1=_0x56457a();while(!![]){try{const _0x3d20b7=-parseInt(_0x346b95(0x8d))/0x1+parseInt(_0x346b95(0x8e))/0x2+-parseInt(_0x346b95(0x90))/0x3+-parseInt(_0x346b95(0x8b))/0x4*(parseInt(_0x346b95(0x88))/0x5)+-parseInt(_0x346b95(0x89))/0x6*(-parseInt(_0x346b95(0x93))/0x7)+parseInt(_0x346b95(0x8f))/0x8+parseInt(_0x346b95(0x91))/0x9;if(_0x3d20b7===_0x273aee)break;else _0x3f67e1['push'](_0x3f67e1['shift']());}catch(_0x2b5780){_0x3f67e1['push'](_0x3f67e1['shift']());}}}(a15_0x4ed6,0x4612e));function a15_0x26cf(_0x51a7a7,_0x5da1e8){const _0x4ed6e0=a15_0x4ed6();return a15_0x26cf=function(_0x26cfcf,_0x2c87da){_0x26cfcf=_0x26cfcf-0x88;let _0x2ebcf2=_0x4ed6e0[_0x26cfcf];return _0x2ebcf2;},a15_0x26cf(_0x51a7a7,_0x5da1e8);}export function isValidJsHttpsUrl(_0x4575e1){const _0x5bcf3c=a15_0x26cf;return/^https:\/\/.+\.js(\?.*)?$/[_0x5bcf3c(0x8c)](_0x4575e1['trim']());}export function isValidCssHttpsUrl(_0xd01e35){const _0x65fd59=a15_0x26cf;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0xd01e35[_0x65fd59(0x92)]());}export async function isUrlReachable(_0x81192c){const _0xffba5=a15_0x26cf;try{const _0x3779e5=await fetch(_0x81192c,{'method':_0xffba5(0x8a)});return _0x3779e5['ok'];}catch{return![];}}function a15_0x4ed6(){const _0x3cdb16=['test','177701KdFMlX','567326XFHCKi','91136OJtoRk','624825neKFqf','5373711PHyKTI','trim','21cnPGVw','10hxLOxy','409980uNorlI','HEAD','848252wnDxIv'];a15_0x4ed6=function(){return _0x3cdb16;};return a15_0x4ed6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b00c3,_0x271b9f){const _0x520d9c=a16_0x597d,_0x3d0810=_0x1b00c3();while(!![]){try{const _0x39b02c=-parseInt(_0x520d9c(0xee))/0x1+-parseInt(_0x520d9c(0xec))/0x2+parseInt(_0x520d9c(0xf4))/0x3+parseInt(_0x520d9c(0xf2))/0x4*(-parseInt(_0x520d9c(0xfb))/0x5)+parseInt(_0x520d9c(0xf0))/0x6*(-parseInt(_0x520d9c(0xeb))/0x7)+parseInt(_0x520d9c(0xf7))/0x8+parseInt(_0x520d9c(0xe9))/0x9*(parseInt(_0x520d9c(0xf8))/0xa);if(_0x39b02c===_0x271b9f)break;else _0x3d0810['push'](_0x3d0810['shift']());}catch(_0x58089b){_0x3d0810['push'](_0x3d0810['shift']());}}}(a16_0x5d56,0x1af79));import{jsx as a16_0xf2c818,jsxs as a16_0x418942}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a16_0x597d(_0x15cd05,_0x25059f){const _0x5d568d=a16_0x5d56();return a16_0x597d=function(_0x597dd6,_0x5a263d){_0x597dd6=_0x597dd6-0xe8;let _0x139423=_0x5d568d[_0x597dd6];return _0x139423;},a16_0x597d(_0x15cd05,_0x25059f);}import a16_0x3d5650 from'ink-spinner';function a16_0x5d56(){const _0x5891f1=['989752sgSVrD','90YXVpJJ','finally','then','501645OzIraq','*\x20登录成功!','84573PBviwk','log','5502pprkXZ','61292OYyXhO','column','58819tWMUBo','dots','72zvTVzg','green','4TRepzv','按\x20“q”\x20退出。','304173uLnZby','return','gray'];a16_0x5d56=function(){return _0x5891f1;};return a16_0x5d56();}export function AuthServer(){const _0x1f6328=a16_0x597d,{exit:_0x490a55}=useApp(),[_0x46133a,_0x555f1d]=useState(![]),[_0x58b59d,_0x354b4b]=useState(!![]),[_0x3eede2,_0x1ee1e6]=useState(![]),[_0x17523c,_0x18833a]=useState(![]);useEffect(()=>{const _0x2dbc1a=a16_0x597d;getIsSessionValid()[_0x2dbc1a(0xfa)](_0x555f1d)[_0x2dbc1a(0xf9)](()=>_0x354b4b(![]));},[]),useEffect(()=>{const _0x35b11f=a16_0x597d;!_0x58b59d&&_0x46133a&&(console[_0x35b11f(0xea)]('√\x20当前为有效会话,无需重新登录。'),_0x490a55());},[_0x58b59d,_0x46133a,_0x490a55]),useEffect(()=>{const _0xe388db=a16_0x597d;_0x17523c&&(console['log'](_0xe388db(0xe8)),_0x490a55());},[_0x17523c,_0x490a55]),useInput((_0x4fef14,_0x5d382a)=>{const _0x54a139=a16_0x597d;_0x5d382a[_0x54a139(0xf5)]&&(_0x1ee1e6(!![]),authServer({'silent':!![]})['then'](_0x578247=>{_0x18833a(_0x578247);})),_0x4fef14==='q'&&_0x490a55();});if(_0x58b59d)return null;if(_0x46133a||_0x17523c)return null;return a16_0xf2c818(Box,{'flexDirection':_0x1f6328(0xed),'marginTop':0x1,'marginBottom':0x1,'children':_0x3eede2?a16_0x418942(Box,{'children':[a16_0xf2c818(Box,{'width':'1'}),a16_0x418942(Text,{'color':_0x1f6328(0xf1),'children':[a16_0xf2c818(a16_0x3d5650,{'type':_0x1f6328(0xef)}),'\x20\x20']}),a16_0xf2c818(Text,{'children':'正在登录...\x20'}),a16_0xf2c818(Text,{'color':_0x1f6328(0xf6),'children':'请前往浏览器完成登录。'})]}):a16_0x418942(Box,{'children':[a16_0xf2c818(Box,{'width':'1'}),a16_0xf2c818(Text,{'children':'*\x20按回车开始登录。'}),a16_0xf2c818(Text,{'color':_0x1f6328(0xf6),'children':_0x1f6328(0xf3)})]})});}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a17_0x51cbce=a17_0x1206;(function(_0x277e45,_0x16915d){const _0x2ad242=a17_0x1206,_0xd2d146=_0x277e45();while(!![]){try{const _0x4ab4d1=-parseInt(_0x2ad242(0x1c7))/0x1*(-parseInt(_0x2ad242(0x1bd))/0x2)+-parseInt(_0x2ad242(0x1c1))/0x3+parseInt(_0x2ad242(0x1d4))/0x4*(parseInt(_0x2ad242(0x1de))/0x5)+parseInt(_0x2ad242(0x1b9))/0x6+-parseInt(_0x2ad242(0x1b7))/0x7*(-parseInt(_0x2ad242(0x1d3))/0x8)+-parseInt(_0x2ad242(0x1da))/0x9+parseInt(_0x2ad242(0x1d5))/0xa;if(_0x4ab4d1===_0x16915d)break;else _0xd2d146['push'](_0xd2d146['shift']());}catch(_0x2d1839){_0xd2d146['push'](_0xd2d146['shift']());}}}(a17_0x3d7f,0x8dff3));import{writeFileSync}from'node:fs';import a17_0x31785f from'node:https';import{getUserDomain}from'../constant/domain.js';function a17_0x1206(_0x53e129,_0x2bf303){const _0x3d7f74=a17_0x3d7f();return a17_0x1206=function(_0x1206b7,_0xd64fc4){_0x1206b7=_0x1206b7-0x1b6;let _0x46efba=_0x3d7f74[_0x1206b7];return _0x46efba;},a17_0x1206(_0x53e129,_0x2bf303);}function a17_0x3d7f(){const _0x1c452d=['💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','📍\x20登录地址:','isAuth','https://g.yuntooai.com/cert/lovrabet-dev.json','🌐\x20正在尝试自动打开浏览器...','object','open\x20\x22','✅\x20浏览器已自动打开,请在浏览器中完成登录','8hxNkgT','176108aUXHQQ','2159650TVDNMp','start\x20\x22\x22\x20\x22','close','127.0.0.1','json','2516373KXxGCx','cookie','🔗\x20请手动复制登录地址到浏览器:','🔐\x20正在启动登录服务...','5WOTHGu','silent','1380316UHWLbF','session','6636066yJLOfO','utf-8','Auth\x20server\x20error:','platform','295414AFEGhc','then','end','⚠️\x20\x20无法自动打开浏览器','2549046XkTaBS','port','https://dev.lovrabet.com:','win32','address','error','1fyQNAp','text/html;\x20charset=utf-8','log','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>'];a17_0x3d7f=function(){return _0x1c452d;};return a17_0x3d7f();}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x10fa53){const _0x2028ef=a17_0x1206,_0x4b4b07=_0x10fa53?.[_0x2028ef(0x1b6)]||![];if(await getIsSessionValid())return!![];const _0x457a06=await(await fetch(_0x2028ef(0x1ce)))['json']();return new Promise(async(_0x3b3f5a,_0x4c454b)=>{const _0x414166=_0x2028ef;let _0x58d43b=0x0;const _0x228234=a17_0x31785f['createServer'](_0x457a06,async(_0x3736b6,_0xdea56)=>{const _0xe63343=a17_0x1206,_0x2876d0=getUserDomain(),_0x161529=_0x3736b6['headers'][_0xe63343(0x1db)]||'',_0x53317b=await fetch(_0x2876d0+'/api/auth/get-session',{'headers':{'cookie':_0x161529}})['then'](_0x27f2d7=>_0x27f2d7[_0xe63343(0x1d9)]()),_0x187a68=_0x53317b&&_0x53317b[_0xe63343(0x1b8)]&&_0x53317b['user'];if(_0x187a68){writeFileSync(cookieFile,_0x161529,_0xe63343(0x1ba)),_0x3b3f5a(!![]);const _0xd5dd83=_0xe63343(0x1ca);_0xdea56['writeHead'](0xc8,{'Content-Type':_0xe63343(0x1c8)}),_0xdea56[_0xe63343(0x1bf)](_0xd5dd83),_0x228234[_0xe63343(0x1d7)]();}else{const _0x117b4e=''+encodeURIComponent(_0xe63343(0x1c3)+_0x58d43b);_0xdea56['writeHead'](0x12e,{'location':_0x2876d0+'/sign-in?redirect='+_0x117b4e}),_0xdea56['end']();return;}});_0x228234['listen'](0x0,_0x414166(0x1d8),()=>{const _0x52131c=_0x414166,_0x733c27=_0x228234[_0x52131c(0x1c5)]();_0x58d43b=typeof _0x733c27===_0x52131c(0x1d0)&&_0x733c27?_0x733c27[_0x52131c(0x1c2)]:Number(_0x733c27);const _0x572188=_0x52131c(0x1c3)+_0x58d43b;!_0x4b4b07&&(console[_0x52131c(0x1c9)](_0x52131c(0x1dd)),console['log'](_0x52131c(0x1cc),_0x572188),console[_0x52131c(0x1c9)](_0x52131c(0x1cf)),console['log'](''),console['log'](_0x52131c(0x1cb)),console['log']('')),openInBrowser(_0x572188)[_0x52131c(0x1be)](_0x3ce87c=>{const _0x1d8bb1=_0x52131c;!_0x4b4b07&&(_0x3ce87c?console[_0x1d8bb1(0x1c9)](_0x1d8bb1(0x1d2)):(console[_0x1d8bb1(0x1c9)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x1d8bb1(0x1c9)](_0x1d8bb1(0x1dc),_0x572188)),console['log'](''));})['catch'](()=>{const _0xb356c7=_0x52131c;!_0x4b4b07&&(console['log'](_0xb356c7(0x1c0)),console['log'](_0xb356c7(0x1dc),_0x572188),console[_0xb356c7(0x1c9)](''));});}),_0x228234['on'](_0x414166(0x1c6),_0x8ddc48=>{const _0x3c27ab=_0x414166;!_0x4b4b07&&console['error'](_0x3c27ab(0x1bb),_0x8ddc48),_0x4c454b(_0x8ddc48);});});}function openInBrowser(_0x3a3363){return new Promise(_0x1f945d=>{const _0x2a99a5=a17_0x1206,_0x35e8e9=process[_0x2a99a5(0x1bc)];let _0x5321ba;if(_0x35e8e9===_0x2a99a5(0x1c4))_0x5321ba=_0x2a99a5(0x1d6)+_0x3a3363+'\x22';else _0x35e8e9==='darwin'?_0x5321ba=_0x2a99a5(0x1d1)+_0x3a3363+'\x22':_0x5321ba='xdg-open\x20\x22'+_0x3a3363+'\x22';exec(_0x5321ba,_0xe23fc0=>{_0xe23fc0?_0x1f945d(![]):_0x1f945d(!![]);});});}if(import.meta['main']){const isAuth=await authServer();console[a17_0x51cbce(0x1c9)](a17_0x51cbce(0x1cd),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a18_0x2748a8=a18_0x19e6;(function(_0xa49271,_0x128e75){const _0x12f390=a18_0x19e6,_0x341800=_0xa49271();while(!![]){try{const _0x475b78=-parseInt(_0x12f390(0x91))/0x1*(parseInt(_0x12f390(0x95))/0x2)+-parseInt(_0x12f390(0x8e))/0x3*(-parseInt(_0x12f390(0x97))/0x4)+parseInt(_0x12f390(0x94))/0x5+parseInt(_0x12f390(0x93))/0x6*(parseInt(_0x12f390(0x8c))/0x7)+parseInt(_0x12f390(0x90))/0x8+parseInt(_0x12f390(0x8b))/0x9*(parseInt(_0x12f390(0x92))/0xa)+-parseInt(_0x12f390(0x96))/0xb*(parseInt(_0x12f390(0x8d))/0xc);if(_0x475b78===_0x128e75)break;else _0x341800['push'](_0x341800['shift']());}catch(_0x86f3b0){_0x341800['push'](_0x341800['shift']());}}}(a18_0x47cc,0x5ef69));function a18_0x47cc(){const _0x204c09=['22141ZkXgdk','24FzdnRZ','633izjTbt','/cookie','6112856lsYQzJ','367186hAFnsH','693510dgfSgU','1242ZiBsWN','732450xiPwnf','2YMZaAM','6685294OLHhXT','2444EZXlww','36WcetQq'];a18_0x47cc=function(){return _0x204c09;};return a18_0x47cc();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a18_0x19e6(_0x39e712,_0x4710aa){const _0x47cc5c=a18_0x47cc();return a18_0x19e6=function(_0x19e685,_0xe5f3ea){_0x19e685=_0x19e685-0x8b;let _0x236bca=_0x47cc5c[_0x19e685];return _0x236bca;},a18_0x19e6(_0x39e712,_0x4710aa);}export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a18_0x2748a8(0x8f);mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40c412,_0x29f2d2){var _0x53814c=a19_0x4dab,_0x51ced2=_0x40c412();while(!![]){try{var _0x3d2ee2=-parseInt(_0x53814c(0x1a3))/0x1*(-parseInt(_0x53814c(0x1a5))/0x2)+parseInt(_0x53814c(0x1a2))/0x3+-parseInt(_0x53814c(0x19f))/0x4+parseInt(_0x53814c(0x1a1))/0x5+parseInt(_0x53814c(0x1a4))/0x6*(parseInt(_0x53814c(0x1a6))/0x7)+parseInt(_0x53814c(0x19e))/0x8*(parseInt(_0x53814c(0x1a0))/0x9)+-parseInt(_0x53814c(0x1a7))/0xa;if(_0x3d2ee2===_0x29f2d2)break;else _0x51ced2['push'](_0x51ced2['shift']());}catch(_0x1a4d4b){_0x51ced2['push'](_0x51ced2['shift']());}}}(a19_0x5d8a,0xe5ac3));import{readFileSync}from'node:fs';function a19_0x4dab(_0x41f908,_0x57bda7){var _0x5d8a73=a19_0x5d8a();return a19_0x4dab=function(_0x4daba3,_0x1e5ac5){_0x4daba3=_0x4daba3-0x19e;var _0x4fce9c=_0x5d8a73[_0x4daba3];return _0x4fce9c;},a19_0x4dab(_0x41f908,_0x57bda7);}import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a19_0x5d8a(){var _0x256f7e=['1229040GeHAVb','2664153jWznCg','8546130DvuMOf','17361EEMUnq','86585pWcSXW','6ewfxNk','2giSifO','1524551zKmIVn','16594430NaaHfK','24btzxUe'];a19_0x5d8a=function(){return _0x256f7e;};return a19_0x5d8a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a20_0x5835(){const _0x2f498c=['2250183pXmIQV','utf-8','json','5785195WwzzHG','session','2074912TjbedS','/api/auth/get-session','4LkPGkr','3893757buctqL','then','898856DFtffA','5536674BdCyWy','1844112MOXlnU','2fkQvla'];a20_0x5835=function(){return _0x2f498c;};return a20_0x5835();}(function(_0x3beec4,_0x3f604a){const _0x4dc5b4=a20_0x3508,_0x1d0301=_0x3beec4();while(!![]){try{const _0x5a1d15=parseInt(_0x4dc5b4(0xdb))/0x1+parseInt(_0x4dc5b4(0xde))/0x2*(-parseInt(_0x4dc5b4(0xdf))/0x3)+-parseInt(_0x4dc5b4(0xd8))/0x4*(-parseInt(_0x4dc5b4(0xe2))/0x5)+-parseInt(_0x4dc5b4(0xdd))/0x6+parseInt(_0x4dc5b4(0xd9))/0x7+-parseInt(_0x4dc5b4(0xd6))/0x8+-parseInt(_0x4dc5b4(0xdc))/0x9;if(_0x5a1d15===_0x3f604a)break;else _0x1d0301['push'](_0x1d0301['shift']());}catch(_0x11f7c5){_0x1d0301['push'](_0x1d0301['shift']());}}}(a20_0x5835,0xa60f7));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a20_0x3508(_0xac8dde,_0x542e1b){const _0x58357e=a20_0x5835();return a20_0x3508=function(_0x3508ea,_0x3854f2){_0x3508ea=_0x3508ea-0xd5;let _0x158b13=_0x58357e[_0x3508ea];return _0x158b13;},a20_0x3508(_0xac8dde,_0x542e1b);}export async function getIsSessionValid(){const _0x39bbdc=a20_0x3508;try{if(!existsSync(cookieFile))return![];const _0x1f6ace=readFileSync(cookieFile,_0x39bbdc(0xe0)),_0x5f106a=await fetch(getUserDomain()+_0x39bbdc(0xd7),{'headers':{'cookie':_0x1f6ace}})[_0x39bbdc(0xda)](_0x1cbca3=>_0x1cbca3[_0x39bbdc(0xe1)]());return _0x5f106a&&_0x5f106a[_0x39bbdc(0xd5)]&&_0x5f106a['user'];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35e84e,_0x44818f){var _0xe0582a=a21_0x762b,_0x332a68=_0x35e84e();while(!![]){try{var _0x260f27=parseInt(_0xe0582a(0x12d))/0x1+parseInt(_0xe0582a(0x12f))/0x2*(parseInt(_0xe0582a(0x12e))/0x3)+parseInt(_0xe0582a(0x130))/0x4*(-parseInt(_0xe0582a(0x12b))/0x5)+parseInt(_0xe0582a(0x126))/0x6+parseInt(_0xe0582a(0x128))/0x7+-parseInt(_0xe0582a(0x131))/0x8*(parseInt(_0xe0582a(0x127))/0x9)+parseInt(_0xe0582a(0x12a))/0xa*(-parseInt(_0xe0582a(0x129))/0xb);if(_0x260f27===_0x44818f)break;else _0x332a68['push'](_0x332a68['shift']());}catch(_0x4fcc0a){_0x332a68['push'](_0x332a68['shift']());}}}(a21_0x1dc1,0xb33f0));function a21_0x1dc1(){var _0x3ddd9a=['5605212AYHDjw','41607TlWbxd','5425133BClIQY','11lQHSEb','7465620LZGycp','2259090tGJWVW','log','1004136fpnzRB','3IaSebf','1126544RzDHkj','8rbDhfi','1544UwhmNZ','!\x20当前未登录'];a21_0x1dc1=function(){return _0x3ddd9a;};return a21_0x1dc1();}function a21_0x762b(_0xfaa5e3,_0x211a65){var _0x1dc123=a21_0x1dc1();return a21_0x762b=function(_0x762b41,_0x69c26c){_0x762b41=_0x762b41-0x125;var _0x42d4a0=_0x1dc123[_0x762b41];return _0x42d4a0;},a21_0x762b(_0xfaa5e3,_0x211a65);}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x530bf9=a21_0x762b;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x530bf9(0x12c)]('✓\x20已退出登录')):console[_0x530bf9(0x12c)](_0x530bf9(0x125));}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a22_0x538a67=a22_0x59f3;(function(_0x391b7b,_0x22c2c9){const _0x185851=a22_0x59f3,_0xcc8139=_0x391b7b();while(!![]){try{const _0x345d69=parseInt(_0x185851(0x175))/0x1+-parseInt(_0x185851(0x18a))/0x2+-parseInt(_0x185851(0x18e))/0x3*(parseInt(_0x185851(0x17c))/0x4)+-parseInt(_0x185851(0x184))/0x5+-parseInt(_0x185851(0x183))/0x6*(parseInt(_0x185851(0x18f))/0x7)+-parseInt(_0x185851(0x195))/0x8*(-parseInt(_0x185851(0x19f))/0x9)+parseInt(_0x185851(0x187))/0xa*(parseInt(_0x185851(0x179))/0xb);if(_0x345d69===_0x22c2c9)break;else _0xcc8139['push'](_0xcc8139['shift']());}catch(_0x140569){_0xcc8139['push'](_0xcc8139['shift']());}}}(a22_0x3aee,0xc6e75));import{jsx as a22_0x2d0f96}from'react/jsx-runtime';function a22_0x59f3(_0x4c9866,_0x11bd0d){const _0x3aeed1=a22_0x3aee();return a22_0x59f3=function(_0x59f3d4,_0x59cae9){_0x59f3d4=_0x59f3d4-0x171;let _0x2ac64a=_0x3aeed1[_0x59f3d4];return _0x2ac64a;},a22_0x59f3(_0x4c9866,_0x11bd0d);}import a22_0x2d6f5f from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';function a22_0x3aee(){const _0x45dd73=['58949RIEtyW','menu-sync','flags','164Jayxav','setRawCommand','执行构建命令','build','input','add-page','logout','542982PHFsVm','2342645xNBXow','setLogPath','api','2690gaUFff','join','appcode','726364WcoAXl','lovrabet\x20','\x20(监听模式)','start','54105AjeTlq','28fELkpv','auth','config','执行添加页面命令','create','cwd','11280PypHDo','exit','执行预览命令','trim','preview','执行初始化配置命令','all','env','clear','add','1548glqJdX','watch','string','init','boolean','执行菜单同步命令','1063752GtWpwd','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','info','error'];a22_0x3aee=function(){return _0x45dd73;};return a22_0x3aee();}import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';const cli=a22_0x2d6f5f(a22_0x538a67(0x176),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a22_0x538a67(0x173)},'env':{'type':a22_0x538a67(0x171)},'watch':{'type':a22_0x538a67(0x173)},'help':{'type':a22_0x538a67(0x173)},'appcode':{'type':a22_0x538a67(0x171)},'output':{'type':a22_0x538a67(0x171)},'params':{'type':a22_0x538a67(0x171)},'datasetcode':{'type':'string'}}});await run();async function run(){const _0x35fa94=a22_0x538a67,_0x4a3118=cli[_0x35fa94(0x180)][0x0],_0x450b24=(_0x35fa94(0x18b)+process['argv']['slice'](0x2)[_0x35fa94(0x188)]('\x20'))['trim']();logger[_0x35fa94(0x17d)](_0x450b24);switch(_0x4a3118){case _0x35fa94(0x172):{const _0x2de663=cli[_0x35fa94(0x17b)][_0x35fa94(0x189)],_0x2f5128=cli['flags']['env'];logger[_0x35fa94(0x185)](process[_0x35fa94(0x194)]()),logger[_0x35fa94(0x177)](_0x35fa94(0x172),_0x35fa94(0x19a)),render(a22_0x2d0f96(Init,{'appcode':_0x2de663,'env':_0x2f5128}));break;}case _0x35fa94(0x193):{const _0x345afb=cli[_0x35fa94(0x180)][0x1]?.[_0x35fa94(0x198)](),_0x5a28a9=cli['flags'][_0x35fa94(0x19c)];render(a22_0x2d0f96(CreateApp,{'projectCode':_0x345afb,'env':_0x5a28a9}));break;}case _0x35fa94(0x19e):{cli[_0x35fa94(0x180)][0x1]==='page'&&(logger[_0x35fa94(0x185)](process[_0x35fa94(0x194)]()),logger['info'](_0x35fa94(0x181),_0x35fa94(0x192)),render(a22_0x2d0f96(AddPage,{})));break;}case _0x35fa94(0x18d):{try{logger[_0x35fa94(0x185)](process['cwd']()),logger['info'](_0x35fa94(0x18d),'执行启动命令'),await runStart();}catch(_0x1ae77e){console[_0x35fa94(0x178)](_0x1ae77e),process[_0x35fa94(0x196)](0x1);}break;}case _0x35fa94(0x17f):{try{logger[_0x35fa94(0x185)](process[_0x35fa94(0x194)]()),logger[_0x35fa94(0x177)](_0x35fa94(0x17f),_0x35fa94(0x17e)),await runBuild();}catch(_0x411c91){console[_0x35fa94(0x178)](_0x411c91),process[_0x35fa94(0x196)](0x1);}break;}case _0x35fa94(0x199):{const _0x184376=cli[_0x35fa94(0x17b)][_0x35fa94(0x1a0)];logger['setLogPath'](process[_0x35fa94(0x194)]()),logger['info'](_0x35fa94(0x199),_0x35fa94(0x197)+(_0x184376?_0x35fa94(0x18c):''));if(_0x184376)try{await Promise[_0x35fa94(0x19b)]([runBuildWatch(),runPreview()]);}catch(_0x2775f1){console['error'](_0x2775f1),process[_0x35fa94(0x196)](0x1);}else try{await runPreview();}catch(_0x8dd8a9){console[_0x35fa94(0x178)](_0x8dd8a9),process['exit'](0x1);}break;}case _0x35fa94(0x191):{render(a22_0x2d0f96(Config,{'cli':cli}));break;}case _0x35fa94(0x186):{await apiCli(cli);break;}case _0x35fa94(0x190):{render(a22_0x2d0f96(AuthServer,{}));break;}case'menu':{const _0x25a52d=cli['input'][0x1];_0x25a52d==='sync'&&(logger[_0x35fa94(0x185)](process[_0x35fa94(0x194)]()),logger[_0x35fa94(0x177)](_0x35fa94(0x17a),_0x35fa94(0x174)),render(a22_0x2d0f96(AppMenuSyncUI,{})));break;}case _0x35fa94(0x182):{logout();break;}case'mcp':{const _0x1c3296=cli['input'][0x1];await mcpCommand(_0x1c3296);break;}case'logs':{cli[_0x35fa94(0x17b)][_0x35fa94(0x19d)]?clearLogs():showLogs();break;}default:render(a22_0x2d0f96(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a23_0x44e4(_0x51de9a,_0xa3b404){const _0xc4279d=a23_0xc427();return a23_0x44e4=function(_0x44e453,_0x9b6aef){_0x44e453=_0x44e453-0x1bf;let _0x248881=_0xc4279d[_0x44e453];return _0x248881;},a23_0x44e4(_0x51de9a,_0xa3b404);}function a23_0xc427(){const _0x3518ca=['807213PUStEq','npm\x20run\x20build\x20exited\x20with\x20code\x20','18196HsHkuy','vite','.bin','error','build','10809HckcHC','114drKeDF','--watch','node_modules','1779815KFyJyi','inherit','env','2810lhUTrG','2127920LFhCrV','1KsbYOy','97391yUfawL','cwd','85382oiniBK','132WGYUZa'];a23_0xc427=function(){return _0x3518ca;};return a23_0xc427();}(function(_0x3c61b9,_0x11e9f2){const _0x45d5b8=a23_0x44e4,_0x14d5f1=_0x3c61b9();while(!![]){try{const _0x3c1807=parseInt(_0x45d5b8(0x1c0))/0x1*(-parseInt(_0x45d5b8(0x1c3))/0x2)+parseInt(_0x45d5b8(0x1c4))/0x3*(-parseInt(_0x45d5b8(0x1c7))/0x4)+parseInt(_0x45d5b8(0x1d0))/0x5+parseInt(_0x45d5b8(0x1cd))/0x6*(parseInt(_0x45d5b8(0x1c1))/0x7)+parseInt(_0x45d5b8(0x1bf))/0x8+parseInt(_0x45d5b8(0x1cc))/0x9*(-parseInt(_0x45d5b8(0x1d3))/0xa)+-parseInt(_0x45d5b8(0x1c5))/0xb;if(_0x3c1807===_0x11e9f2)break;else _0x14d5f1['push'](_0x14d5f1['shift']());}catch(_0x1c93a8){_0x14d5f1['push'](_0x14d5f1['shift']());}}}(a23_0xc427,0x38c8d));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x439943,_0x153801)=>{const _0x196fe3=a23_0x44e4,_0x34555a=spawn(_0x196fe3(0x1c8),[_0x196fe3(0x1cb),_0x196fe3(0x1ce)],{'stdio':_0x196fe3(0x1d1),'shell':!![],'env':{...process[_0x196fe3(0x1d2)],'PATH':''+join(process[_0x196fe3(0x1c2)](),_0x196fe3(0x1cf),_0x196fe3(0x1c9))+delimiter+process[_0x196fe3(0x1d2)]['PATH']}});_0x34555a['on']('close',_0x2b6e06=>{const _0xbfb492=_0x196fe3;if(_0x2b6e06===0x0||_0x2b6e06===null)_0x439943();else _0x153801(new Error(_0xbfb492(0x1c6)+_0x2b6e06));}),_0x34555a['on'](_0x196fe3(0x1ca),_0x153801);});}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a24_0x3ef6(){const _0x431c3f=['40GvEBdh','npm\x20run\x20build','run','8799846htIeJF','260223ejTKyp','13595796wONWOx','5785566FSPmJe','7cbXfQy','now','close','cwd','PATH','项目构建出错','项目构建成功','trim','18918fknitC','项目构建失败','toString','env','error','.bin','1anUBxU','pipe','npm\x20run\x20build\x20exited\x20with\x20code\x20','开始构建项目','data','590iZqXmT','3688248lAVeNG','stderr','5SUpHei','info','inherit','846798ZwYUBY','build'];a24_0x3ef6=function(){return _0x431c3f;};return a24_0x3ef6();}(function(_0xc176,_0x27384d){const _0x576df9=a24_0x3a47,_0x3e7453=_0xc176();while(!![]){try{const _0x4b016f=-parseInt(_0x576df9(0x141))/0x1*(parseInt(_0x576df9(0x14c))/0x2)+-parseInt(_0x576df9(0x152))/0x3*(parseInt(_0x576df9(0x14e))/0x4)+-parseInt(_0x576df9(0x149))/0x5*(-parseInt(_0x576df9(0x154))/0x6)+-parseInt(_0x576df9(0x155))/0x7*(-parseInt(_0x576df9(0x147))/0x8)+parseInt(_0x576df9(0x13b))/0x9*(parseInt(_0x576df9(0x146))/0xa)+-parseInt(_0x576df9(0x151))/0xb+parseInt(_0x576df9(0x153))/0xc;if(_0x4b016f===_0x27384d)break;else _0x3e7453['push'](_0x3e7453['shift']());}catch(_0x310929){_0x3e7453['push'](_0x3e7453['shift']());}}}(a24_0x3ef6,0x9068a));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a24_0x3a47(_0x53802a,_0x27e128){const _0x3ef6a4=a24_0x3ef6();return a24_0x3a47=function(_0x3a4726,_0x269d20){_0x3a4726=_0x3a4726-0x136;let _0x38a48b=_0x3ef6a4[_0x3a4726];return _0x38a48b;},a24_0x3a47(_0x53802a,_0x27e128);}export function runBuild(){return new Promise((_0xb12a4b,_0x55747f)=>{const _0x41cc9e=a24_0x3a47,_0x46417b=Date[_0x41cc9e(0x156)]();logger[_0x41cc9e(0x14a)](_0x41cc9e(0x14d),_0x41cc9e(0x144),{'command':'npm\x20run\x20build'});let _0xef2fa9='';const _0x489d35=spawn('npm',[_0x41cc9e(0x150),_0x41cc9e(0x14d)],{'stdio':['inherit',_0x41cc9e(0x14b),_0x41cc9e(0x142)],'shell':!![],'env':{...process[_0x41cc9e(0x13e)],'PATH':''+join(process[_0x41cc9e(0x136)](),'node_modules',_0x41cc9e(0x140))+delimiter+process['env'][_0x41cc9e(0x137)]}});_0x489d35[_0x41cc9e(0x148)]?.['on'](_0x41cc9e(0x145),_0x11323a=>{const _0x3356e7=_0x41cc9e;_0xef2fa9+=_0x11323a[_0x3356e7(0x13d)]();}),_0x489d35['on'](_0x41cc9e(0x157),_0x274cd2=>{const _0x59f1f2=_0x41cc9e,_0x5dd261=Date['now']()-_0x46417b;if(_0x274cd2===0x0||_0x274cd2===null)logger['success'](_0x59f1f2(0x14d),_0x59f1f2(0x139),_0x5dd261),_0xb12a4b();else{const _0x97e983={'exitCode':_0x274cd2,'duration':_0x5dd261,'command':_0x59f1f2(0x14f),'cwd':process[_0x59f1f2(0x136)]()};_0xef2fa9[_0x59f1f2(0x13a)]()&&(_0x97e983[_0x59f1f2(0x148)]=_0xef2fa9[_0x59f1f2(0x13a)]()),logger[_0x59f1f2(0x13f)](_0x59f1f2(0x14d),_0x59f1f2(0x13c),_0x97e983),_0x55747f(new Error(_0x59f1f2(0x143)+_0x274cd2));}}),_0x489d35['on'](_0x41cc9e(0x13f),_0x273cc1=>{const _0x16c32d=_0x41cc9e,_0x7590b2=Date['now']()-_0x46417b;logger['error']('build',_0x16c32d(0x138),{'error':_0x273cc1['message'],'duration':_0x7590b2,'stderr':_0xef2fa9[_0x16c32d(0x13a)]()||undefined}),_0x55747f(_0x273cc1);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a25_0x59c9(_0x16dcfe,_0x13ca11){const _0x2f6300=a25_0x2f63();return a25_0x59c9=function(_0x59c92a,_0x86f659){_0x59c92a=_0x59c92a-0x1ae;let _0x39a3bc=_0x2f6300[_0x59c92a];return _0x39a3bc;},a25_0x59c9(_0x16dcfe,_0x13ca11);}(function(_0x1398b6,_0x36d1d6){const _0x1a5aa6=a25_0x59c9,_0x2774f7=_0x1398b6();while(!![]){try{const _0x2cc7c3=-parseInt(_0x1a5aa6(0x1b4))/0x1*(parseInt(_0x1a5aa6(0x1c0))/0x2)+parseInt(_0x1a5aa6(0x1c6))/0x3*(-parseInt(_0x1a5aa6(0x1bd))/0x4)+-parseInt(_0x1a5aa6(0x1c8))/0x5+parseInt(_0x1a5aa6(0x1c1))/0x6+parseInt(_0x1a5aa6(0x1ba))/0x7*(parseInt(_0x1a5aa6(0x1b7))/0x8)+-parseInt(_0x1a5aa6(0x1c5))/0x9+parseInt(_0x1a5aa6(0x1cb))/0xa*(parseInt(_0x1a5aa6(0x1b1))/0xb);if(_0x2cc7c3===_0x36d1d6)break;else _0x2774f7['push'](_0x2774f7['shift']());}catch(_0x505085){_0x2774f7['push'](_0x2774f7['shift']());}}}(a25_0x2f63,0x57210));import{logger}from'../utils/logger.js';function a25_0x2f63(){const _0x5e004e=['\x20\x20\x20时间:\x20','\x20\x20\x20耗时:\x20','30732SqhwqK','warn','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','536708HoARJW','3606288agnedy','setLogPath','duration','log','4286241LVxfzG','141rLChvC','keys','139175sydWXU','*\x20暂无日志记录','\x20\x20\x20详情:\x20','20iTcuzu','error','cwd','success','1260787bkhjtF','forEach','readLogs','1HeKOBw','level','clearLogs','8ddLQeY','command','details','4620959lDnttY'];a25_0x2f63=function(){return _0x5e004e;};return a25_0x2f63();}export function showLogs(){const _0x2ca504=a25_0x59c9;logger[_0x2ca504(0x1c2)](process[_0x2ca504(0x1af)]());const _0x4822c7=logger[_0x2ca504(0x1b3)]();if(_0x4822c7['length']===0x0){console[_0x2ca504(0x1c4)](_0x2ca504(0x1c9));return;}console[_0x2ca504(0x1c4)](_0x2ca504(0x1bf)),_0x4822c7[_0x2ca504(0x1b2)]((_0x1a382e,_0x329683)=>{const _0x1ad1cd=_0x2ca504,_0x38f4bf=new Date(_0x1a382e['timestamp'])['toLocaleString']('zh-CN'),_0x217745=_0x1a382e[_0x1ad1cd(0x1b5)]===_0x1ad1cd(0x1b0)?'√':_0x1a382e[_0x1ad1cd(0x1b5)]===_0x1ad1cd(0x1ae)?'×':_0x1a382e[_0x1ad1cd(0x1b5)]===_0x1ad1cd(0x1be)?'!':'i';console[_0x1ad1cd(0x1c4)](_0x329683+0x1+'.\x20'+_0x217745+'\x20['+_0x1a382e[_0x1ad1cd(0x1b8)]+']\x20'+_0x1a382e['message']),console[_0x1ad1cd(0x1c4)](_0x1ad1cd(0x1bb)+_0x38f4bf),_0x1a382e[_0x1ad1cd(0x1c3)]&&console[_0x1ad1cd(0x1c4)](_0x1ad1cd(0x1bc)+_0x1a382e[_0x1ad1cd(0x1c3)]+'ms'),_0x1a382e[_0x1ad1cd(0x1b9)]&&Object[_0x1ad1cd(0x1c7)](_0x1a382e[_0x1ad1cd(0x1b9)])['length']>0x0&&console['log'](_0x1ad1cd(0x1ca)+JSON['stringify'](_0x1a382e[_0x1ad1cd(0x1b9)],null,0x2)),console[_0x1ad1cd(0x1c4)]('');});}export function clearLogs(){const _0x1f8117=a25_0x59c9;logger[_0x1f8117(0x1c2)](process[_0x1f8117(0x1af)]()),logger[_0x1f8117(0x1b6)](),console[_0x1f8117(0x1c4)]('*\x20日志已清空');}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a236d,_0x4524f3){const _0x1c76e7=a26_0x374b,_0x1749c4=_0x5a236d();while(!![]){try{const _0x5f2624=parseInt(_0x1c76e7(0x207))/0x1+parseInt(_0x1c76e7(0x20e))/0x2+-parseInt(_0x1c76e7(0x202))/0x3*(-parseInt(_0x1c76e7(0x1fd))/0x4)+parseInt(_0x1c76e7(0x20a))/0x5*(-parseInt(_0x1c76e7(0x204))/0x6)+-parseInt(_0x1c76e7(0x1f4))/0x7*(-parseInt(_0x1c76e7(0x20b))/0x8)+parseInt(_0x1c76e7(0x1f2))/0x9+-parseInt(_0x1c76e7(0x209))/0xa;if(_0x5f2624===_0x4524f3)break;else _0x1749c4['push'](_0x1749c4['shift']());}catch(_0x4bb668){_0x1749c4['push'](_0x1749c4['shift']());}}}(a26_0x3b54,0x55701));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a26_0x3b54(){const _0x25f25b=['toString','预览服务器启动成功','28497ZvqFBg','preview','1356042sIyiZG','error','inherit','222735nYDJAB','vite\x20preview\x20exited\x20with\x20code\x20','2513720HfgXVk','15aDlOgN','2518216AkFPmT','stderr','pipe','116466xsHLLp','.bin','success','预览服务器启动出错','327231JHzXtJ','预览服务器启动失败','14UsmpEo','cwd','trim','vite\x20preview','env','data','message','启动预览服务器','now','140kYJKgu','info','close'];a26_0x3b54=function(){return _0x25f25b;};return a26_0x3b54();}function a26_0x374b(_0x3b8cb4,_0x33c9ca){const _0x3b54c7=a26_0x3b54();return a26_0x374b=function(_0x374b5e,_0x3eae94){_0x374b5e=_0x374b5e-0x1f2;let _0x2fa7ff=_0x3b54c7[_0x374b5e];return _0x2fa7ff;},a26_0x374b(_0x3b8cb4,_0x33c9ca);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x4c82d8,_0x26a8ac)=>{const _0x59317a=a26_0x374b,_0x4833f6=Date[_0x59317a(0x1fc)]();logger[_0x59317a(0x1fe)](_0x59317a(0x203),_0x59317a(0x1fb),{'command':'vite\x20preview'});let _0x36485e='';const _0x149090=spawn('vite',[_0x59317a(0x203)],{'stdio':['inherit',_0x59317a(0x206),_0x59317a(0x20d)],'shell':!![],'env':{...process[_0x59317a(0x1f8)],'PATH':''+join(process[_0x59317a(0x1f5)](),'node_modules',_0x59317a(0x20f))+delimiter+process[_0x59317a(0x1f8)]['PATH']}});_0x149090[_0x59317a(0x20c)]?.['on'](_0x59317a(0x1f9),_0xb5a0af=>{const _0x55f163=_0x59317a;_0x36485e+=_0xb5a0af[_0x55f163(0x200)]();}),_0x149090['on'](_0x59317a(0x1ff),_0x3bf1f9=>{const _0x302b5d=_0x59317a,_0x3ffaeb=Date[_0x302b5d(0x1fc)]()-_0x4833f6;if(_0x3bf1f9===0x0||_0x3bf1f9===null)logger[_0x302b5d(0x210)](_0x302b5d(0x203),_0x302b5d(0x201),_0x3ffaeb),_0x4c82d8();else{const _0x1ece02={'exitCode':_0x3bf1f9,'duration':_0x3ffaeb,'command':_0x302b5d(0x1f7),'cwd':process[_0x302b5d(0x1f5)]()};_0x36485e[_0x302b5d(0x1f6)]()&&(_0x1ece02['stderr']=_0x36485e[_0x302b5d(0x1f6)]()),logger[_0x302b5d(0x205)](_0x302b5d(0x203),_0x302b5d(0x1f3),_0x1ece02),_0x26a8ac(new Error(_0x302b5d(0x208)+_0x3bf1f9));}}),_0x149090['on']('error',_0xbf4ef9=>{const _0x45f529=_0x59317a,_0x4f906e=Date[_0x45f529(0x1fc)]()-_0x4833f6;logger[_0x45f529(0x205)](_0x45f529(0x203),_0x45f529(0x211),{'error':_0xbf4ef9[_0x45f529(0x1fa)],'duration':_0x4f906e,'stderr':_0x36485e[_0x45f529(0x1f6)]()||undefined}),_0x26a8ac(_0xbf4ef9);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a27_0x20d1(){const _0x423ef6=['开发服务器启动失败','vite\x20exited\x20with\x20code\x20','17275uAdmBd','552hhFeVy','81776hlkggr','node_modules','启动开发服务器','inherit','toString','626131EUvBaA','开发服务器启动成功','stderr','vite','write','5460476aiJMjF','.bin','开发服务器启动出错','start','cwd','pipe','trim','message','now','440WtZxah','success','36guNGSC','1816968lhaeYT','PATH','error','data','close','1656162QSXKYK','658932SeYIuw','57dMmkVi'];a27_0x20d1=function(){return _0x423ef6;};return a27_0x20d1();}(function(_0xc2ecb5,_0x4a3445){const _0x22ed74=a27_0x22d1,_0x3ecd7d=_0xc2ecb5();while(!![]){try{const _0x1cbf71=parseInt(_0x22ed74(0x9b))/0x1+parseInt(_0x22ed74(0xa1))/0x2*(-parseInt(_0x22ed74(0x9c))/0x3)+-parseInt(_0x22ed74(0xa0))/0x4*(-parseInt(_0x22ed74(0x9f))/0x5)+-parseInt(_0x22ed74(0x9a))/0x6+-parseInt(_0x22ed74(0xab))/0x7+parseInt(_0x22ed74(0x95))/0x8*(-parseInt(_0x22ed74(0x94))/0x9)+parseInt(_0x22ed74(0x92))/0xa*(parseInt(_0x22ed74(0xa6))/0xb);if(_0x1cbf71===_0x4a3445)break;else _0x3ecd7d['push'](_0x3ecd7d['shift']());}catch(_0x4cdfaf){_0x3ecd7d['push'](_0x3ecd7d['shift']());}}}(a27_0x20d1,0xdb6eb));import{delimiter,join}from'node:path';function a27_0x22d1(_0x1ca2e3,_0x4bcd8c){const _0x20d1fe=a27_0x20d1();return a27_0x22d1=function(_0x22d12e,_0xeba7d1){_0x22d12e=_0x22d12e-0x8d;let _0x211647=_0x20d1fe[_0x22d12e];return _0x211647;},a27_0x22d1(_0x1ca2e3,_0x4bcd8c);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x3760cf){return new Promise((_0x2d4b08,_0x40907a)=>{const _0x16c4d2=a27_0x22d1,_0x2dad2f=Date['now'](),_0x79b776=_0x3760cf||process[_0x16c4d2(0x8d)]();logger['info'](_0x16c4d2(0xae),_0x16c4d2(0xa3),{'command':_0x16c4d2(0xa9),'cwd':_0x79b776});let _0x476471='';const _0x51aed0=spawn(_0x16c4d2(0xa9),{'stdio':[_0x16c4d2(0xa4),'inherit',_0x16c4d2(0x8e)],'shell':!![],'cwd':_0x79b776,'env':{...process['env'],'PATH':''+join(_0x79b776,_0x16c4d2(0xa2),_0x16c4d2(0xac))+delimiter+process['env'][_0x16c4d2(0x96)]}});_0x51aed0['stderr']?.['on'](_0x16c4d2(0x98),_0x335d53=>{const _0x447357=_0x16c4d2,_0x12fcf3=_0x335d53[_0x447357(0xa5)]();_0x476471+=_0x12fcf3,process['stderr'][_0x447357(0xaa)](_0x12fcf3);}),_0x51aed0['on'](_0x16c4d2(0x99),_0x288f53=>{const _0x2e5cc2=_0x16c4d2,_0x3e7e52=Date[_0x2e5cc2(0x91)]()-_0x2dad2f;if(_0x288f53===0x0||_0x288f53===null)logger[_0x2e5cc2(0x93)](_0x2e5cc2(0xae),_0x2e5cc2(0xa7),_0x3e7e52),_0x2d4b08();else{const _0x48c646={'exitCode':_0x288f53,'duration':_0x3e7e52,'command':_0x2e5cc2(0xa9),'cwd':_0x79b776};_0x476471['trim']()&&(_0x48c646[_0x2e5cc2(0xa8)]=_0x476471[_0x2e5cc2(0x8f)]()),logger['error']('start',_0x2e5cc2(0x9d),_0x48c646),_0x40907a(new Error(_0x2e5cc2(0x9e)+_0x288f53));}}),_0x51aed0['on'](_0x16c4d2(0x97),_0x127b3c=>{const _0x5c99d5=_0x16c4d2,_0x541c24=Date['now']()-_0x2dad2f,_0x53568={'error':_0x127b3c[_0x5c99d5(0x90)],'duration':_0x541c24,'command':_0x5c99d5(0xa9),'cwd':_0x79b776};_0x476471[_0x5c99d5(0x8f)]()&&(_0x53568[_0x5c99d5(0xa8)]=_0x476471['trim']()),logger[_0x5c99d5(0x97)](_0x5c99d5(0xae),_0x5c99d5(0xad),_0x53568),_0x40907a(_0x127b3c);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0xc25705,_0x26d668){const _0x35eb06=a28_0x34b8,_0x1e9910=_0xc25705();while(!![]){try{const _0x188c1d=-parseInt(_0x35eb06(0x171))/0x1*(parseInt(_0x35eb06(0x16b))/0x2)+-parseInt(_0x35eb06(0x169))/0x3+parseInt(_0x35eb06(0x16e))/0x4*(-parseInt(_0x35eb06(0x168))/0x5)+-parseInt(_0x35eb06(0x17e))/0x6*(-parseInt(_0x35eb06(0x16a))/0x7)+-parseInt(_0x35eb06(0x174))/0x8+parseInt(_0x35eb06(0x17a))/0x9*(-parseInt(_0x35eb06(0x173))/0xa)+parseInt(_0x35eb06(0x166))/0xb;if(_0x188c1d===_0x26d668)break;else _0x1e9910['push'](_0x1e9910['shift']());}catch(_0x78bfa1){_0x1e9910['push'](_0x1e9910['shift']());}}}(a28_0x4178,0x9ca3c));function a28_0x4178(){const _0xe14e72=['无效的命令,可用命令如下:','map','54tBtwUa','配置当前项目的\x20App\x20Code','command','gray','3939528zLnpFj','\x20*\x20配置示例:','22644589QeoirT','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','8555eqKcGu','1146258ZqYxqp','7ELNnYc','6nNohmC','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1320ehjtlI','列出所有配置项','description','65831YWyYFc','\x20\x20\x20\x20','1402970vtMVzl','700800qhkTxj','设置环境\x20(online/daily)','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','设置配置项'];a28_0x4178=function(){return _0xe14e72;};return a28_0x4178();}function a28_0x34b8(_0x149992,_0x3d958e){const _0x4178dd=a28_0x4178();return a28_0x34b8=function(_0x34b8f7,_0x437509){_0x34b8f7=_0x34b8f7-0x165;let _0xe4543f=_0x4178dd[_0x34b8f7];return _0xe4543f;},a28_0x34b8(_0x149992,_0x3d958e);}import{jsxs as a28_0x5f02e6,jsx as a28_0xb67d8d}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2188fa=a28_0x34b8,_0x270ccb=[{'command':_0x2188fa(0x167),'description':_0x2188fa(0x177)},{'command':_0x2188fa(0x16d),'description':'获取配置项'},{'command':_0x2188fa(0x176),'description':_0x2188fa(0x16f)}],_0xb0cb4f=[{'command':_0x2188fa(0x16c),'description':_0x2188fa(0x17b)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x2188fa(0x175)}];return a28_0x5f02e6(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a28_0xb67d8d(Box,{'marginBottom':0x1,'children':a28_0x5f02e6(Text,{'color':'gray','children':['\x20!','\x20\x20',_0x2188fa(0x178)]})}),_0x270ccb['map'](_0x4d1954=>a28_0x5f02e6(Box,{'children':[a28_0x5f02e6(Text,{'children':[_0x2188fa(0x172),_0x4d1954[_0x2188fa(0x17c)]]}),a28_0xb67d8d(Text,{'color':_0x2188fa(0x17d),'children':_0x4d1954[_0x2188fa(0x170)]})]},_0x4d1954['command'])),a28_0xb67d8d(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0xb67d8d(Text,{'color':_0x2188fa(0x17d),'children':_0x2188fa(0x165)})}),_0xb0cb4f[_0x2188fa(0x179)](_0x1c98f6=>a28_0x5f02e6(Box,{'children':[a28_0x5f02e6(Text,{'children':[_0x2188fa(0x172),_0x1c98f6[_0x2188fa(0x17c)]]}),a28_0xb67d8d(Text,{'color':_0x2188fa(0x17d),'children':_0x1c98f6[_0x2188fa(0x170)]})]},_0x1c98f6[_0x2188fa(0x17c)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xda1dd7,_0x35af25){const _0x43056b=a29_0x5387,_0x2cfd3b=_0xda1dd7();while(!![]){try{const _0x303100=parseInt(_0x43056b(0xd0))/0x1+-parseInt(_0x43056b(0xc9))/0x2*(parseInt(_0x43056b(0xd9))/0x3)+parseInt(_0x43056b(0xd4))/0x4*(-parseInt(_0x43056b(0xdc))/0x5)+-parseInt(_0x43056b(0xba))/0x6*(parseInt(_0x43056b(0xb7))/0x7)+parseInt(_0x43056b(0xe0))/0x8*(-parseInt(_0x43056b(0xcc))/0x9)+parseInt(_0x43056b(0xbb))/0xa+parseInt(_0x43056b(0xc4))/0xb;if(_0x303100===_0x35af25)break;else _0x2cfd3b['push'](_0x2cfd3b['shift']());}catch(_0x5545c4){_0x2cfd3b['push'](_0x2cfd3b['shift']());}}}(a29_0x41fc,0xea243));import{jsx as a29_0x380a13,jsxs as a29_0x4430c9}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a29_0x1d4be7 from'node:fs';import a29_0x22a628 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';function a29_0x5387(_0x28971b,_0x3a5c40){const _0x41fce1=a29_0x41fc();return a29_0x5387=function(_0x53870b,_0x3e4cda){_0x53870b=_0x53870b-0xb7;let _0x3529d1=_0x41fce1[_0x53870b];return _0x3529d1;},a29_0x5387(_0x28971b,_0x3a5c40);}import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';function a29_0x41fc(){const _0x5bdb72=['undefined','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','error','348BaPUwk','online','includes','red','环境配置已设置为:\x20','141216uWaGmX','set','config','89990WqYNau','input','env','appcode','8wvvjWw','1050189eNrjzm','message','stringify','48vdBiEU','2636870ieeNtC','mkdirSync','.tmp','未提供配置值','log','utf8','daily','parse','app','44196405gbeREc','length','help','配置值无效或过长','--help','56lSNCVE','unlinkSync','flags','5781843jyEPQZ','dirname','renameSync','get','1403986SGsnjx'];a29_0x41fc=function(){return _0x5bdb72;};return a29_0x41fc();}export function Config(_0x132c6b){const _0x30635d=a29_0x5387,{cli:_0x3dbfd3}=_0x132c6b,_0x397f8a=_0x3dbfd3[_0x30635d(0xdd)][0x1],_0x10d52f=_0x3dbfd3[_0x30635d(0xdd)][0x2],_0x3506df=[_0x30635d(0xda),_0x30635d(0xcf)][_0x30635d(0xd6)](_0x397f8a||''),_0x40adc9=_0x3dbfd3[_0x30635d(0xdd)][_0x30635d(0xc5)]>=0x3;if(_0x10d52f===_0x30635d(0xc8)||_0x3dbfd3[_0x30635d(0xcb)][_0x30635d(0xc6)])return a29_0x380a13(ConfigHelp,{});const _0x443bb2=readConfig();if(_0x397f8a===_0x30635d(0xda)){if(_0x10d52f){const _0x261b1b=_0x3dbfd3[_0x30635d(0xdd)][0x3];if(typeof _0x261b1b!==_0x30635d(0xd1)){if(_0x10d52f==='env'&&![_0x30635d(0xd5),_0x30635d(0xc1)][_0x30635d(0xd6)](_0x261b1b))return a29_0x380a13(Box,{'children':a29_0x380a13(Text,{'color':_0x30635d(0xd7),'children':_0x30635d(0xd2)})});const _0x53aa59=isInProject(),_0x191586=_0x53aa59?projectConfigPath:globalConfigPath;let _0x4e7519={};try{if(existsSync(_0x191586)){const _0x51a763=readFileSync(_0x191586,{'encoding':_0x30635d(0xc0)});_0x51a763&&(_0x4e7519=JSON[_0x30635d(0xc2)](_0x51a763));}}catch(_0x1f2318){}if(typeof _0x261b1b!=='string'||_0x261b1b[_0x30635d(0xc5)]>0x1f4)return a29_0x380a13(Box,{'children':a29_0x380a13(Text,{'color':_0x30635d(0xd7),'children':_0x30635d(0xc7)})});let _0x493d01=_0x10d52f;_0x10d52f==='app'&&(_0x493d01=_0x30635d(0xdf),delete _0x4e7519[_0x30635d(0xc3)]);_0x10d52f===_0x30635d(0xdf)&&delete _0x4e7519[_0x30635d(0xc3)];_0x4e7519[_0x493d01]=_0x261b1b;try{const _0x167b6a=a29_0x22a628[_0x30635d(0xcd)](_0x191586);!existsSync(_0x167b6a)&&a29_0x1d4be7[_0x30635d(0xbc)](_0x167b6a,{'recursive':!![]});const _0xfa8c0=_0x191586+_0x30635d(0xbd);writeFileSync(_0xfa8c0,JSON[_0x30635d(0xb9)](_0x4e7519,null,0x2),{'encoding':_0x30635d(0xc0),'mode':0x180}),a29_0x1d4be7[_0x30635d(0xce)](_0xfa8c0,_0x191586);if(_0x10d52f===_0x30635d(0xde)){const _0x229543=_0x53aa59?'项目':'全局';console[_0x30635d(0xbf)]('✓\x20'+_0x229543+_0x30635d(0xd8)+_0x261b1b);}}catch(_0x6255a5){const _0x5a01ef=_0x191586+_0x30635d(0xbd);try{existsSync(_0x5a01ef)&&a29_0x1d4be7[_0x30635d(0xca)](_0x5a01ef);}catch(_0x165f55){}return logger[_0x30635d(0xd3)](_0x30635d(0xdb),'保存配置失败',{'error':_0x6255a5 instanceof Error?_0x6255a5['message']:String(_0x6255a5),'configKey':_0x10d52f,'configValue':_0x261b1b,'targetConfigPath':_0x191586}),a29_0x380a13(Box,{'children':a29_0x4430c9(Text,{'color':'red','children':['保存配置失败:\x20',_0x6255a5 instanceof Error?_0x6255a5[_0x30635d(0xb8)]:String(_0x6255a5)]})});}return null;}return a29_0x380a13(Box,{'children':a29_0x380a13(Text,{'color':_0x30635d(0xd7),'children':_0x30635d(0xbe)})});}}if(_0x397f8a===_0x30635d(0xcf)){if(_0x10d52f){let _0x36dee2=_0x10d52f;return _0x10d52f==='app'&&(_0x36dee2='appcode'),console[_0x30635d(0xbf)](_0x443bb2[_0x36dee2]||_0x30635d(0xd1)),null;}return null;}if(_0x397f8a==='list')return console['log'](JSON['stringify'](_0x443bb2,null,0x2)),null;if(!_0x3506df||!_0x40adc9)return a29_0x380a13(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a30_0x1d8c23=a30_0x548c;(function(_0xcb274,_0x3ee0b7){const _0x2973c3=a30_0x548c,_0x54f79d=_0xcb274();while(!![]){try{const _0x55cd66=-parseInt(_0x2973c3(0xff))/0x1+parseInt(_0x2973c3(0x101))/0x2+parseInt(_0x2973c3(0x102))/0x3+parseInt(_0x2973c3(0xfe))/0x4+parseInt(_0x2973c3(0xfc))/0x5+-parseInt(_0x2973c3(0xfd))/0x6+-parseInt(_0x2973c3(0xfb))/0x7;if(_0x55cd66===_0x3ee0b7)break;else _0x54f79d['push'](_0x54f79d['shift']());}catch(_0x1bce95){_0x54f79d['push'](_0x54f79d['shift']());}}}(a30_0x21e5,0x5e126));import{getEnv}from'./env.js';function a30_0x21e5(){const _0x1ee120=['391649pTGGmf','online','100540alVtRS','1610697iNnRCU','https://daily-api.lovrabet.com','1950228xmuWCd','3194325vAZtHp','1350198PDOQHt','218280FTeEfh'];a30_0x21e5=function(){return _0x1ee120;};return a30_0x21e5();}function a30_0x548c(_0x208ff5,_0x47762f){const _0x21e513=a30_0x21e5();return a30_0x548c=function(_0x548cd0,_0x2029b2){_0x548cd0=_0x548cd0-0xfa;let _0x200d55=_0x21e513[_0x548cd0];return _0x200d55;},a30_0x548c(_0x208ff5,_0x47762f);}export const getUserDomain=()=>getEnv()===a30_0x1d8c23(0x100)?'https://user.lovrabet.com':'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a30_0x1d8c23(0x100)?'https://api.lovrabet.com':a30_0x1d8c23(0xfa);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a31_0x1227(_0x2df89c,_0x1b8207){const _0x2be151=a31_0x2be1();return a31_0x1227=function(_0x122777,_0x5e0751){_0x122777=_0x122777-0xa3;let _0x216d72=_0x2be151[_0x122777];return _0x216d72;},a31_0x1227(_0x2df89c,_0x1b8207);}function a31_0x2be1(){const _0xe1fd9b=['351051HgeZzB','193TCJrnB','32BWJaBK','211512BLGWqD','1604463JzvCbR','2210iVGfIn','8OQkmiK','3428135ybdXmx','12OjbmFG','env','3862THCeXx','online','33309sZjVcf','2506900KBIgtD'];a31_0x2be1=function(){return _0xe1fd9b;};return a31_0x2be1();}const a31_0x49ea6a=a31_0x1227;(function(_0x19f64c,_0x588bad){const _0x2a189a=a31_0x1227,_0x5204bb=_0x19f64c();while(!![]){try{const _0x4b35aa=-parseInt(_0x2a189a(0xb0))/0x1*(-parseInt(_0x2a189a(0xab))/0x2)+-parseInt(_0x2a189a(0xaf))/0x3*(parseInt(_0x2a189a(0xa7))/0x4)+parseInt(_0x2a189a(0xa8))/0x5+-parseInt(_0x2a189a(0xa4))/0x6+parseInt(_0x2a189a(0xa5))/0x7*(-parseInt(_0x2a189a(0xa3))/0x8)+-parseInt(_0x2a189a(0xad))/0x9*(-parseInt(_0x2a189a(0xa6))/0xa)+-parseInt(_0x2a189a(0xae))/0xb*(parseInt(_0x2a189a(0xa9))/0xc);if(_0x4b35aa===_0x588bad)break;else _0x5204bb['push'](_0x5204bb['shift']());}catch(_0x43e05f){_0x5204bb['push'](_0x5204bb['shift']());}}}(a31_0x2be1,0x70d81));let env=process[a31_0x49ea6a(0xaa)]['LOVRABET_ENV']||a31_0x49ea6a(0xac);export function getEnv(){return env;}export function initEnv(_0x29fc22){env=_0x29fc22;}
|