@lovrabet/cli 1.1.1 → 1.1.2
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/README.md +289 -14
- 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-pull-ui.js +1 -1
- package/lib/api/format-dataset.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/api/pull.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/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
package/lib/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd624a9,_0x357c09){const _0x2145e6=a8_0x394b,_0x2f1fba=_0xd624a9();while(!![]){try{const _0x520ca3=-parseInt(_0x2145e6(0x1ed))/0x1+-parseInt(_0x2145e6(0x1e8))/0x2+-parseInt(_0x2145e6(0x203))/0x3*(-parseInt(_0x2145e6(0x1f5))/0x4)+-parseInt(_0x2145e6(0x1fb))/0x5*(parseInt(_0x2145e6(0x1ea))/0x6)+parseInt(_0x2145e6(0x1db))/0x7+-parseInt(_0x2145e6(0x1f3))/0x8*(parseInt(_0x2145e6(0x1fe))/0x9)+-parseInt(_0x2145e6(0x1d1))/0xa*(-parseInt(_0x2145e6(0x1d4))/0xb);if(_0x520ca3===_0x357c09)break;else _0x2f1fba['push'](_0x2f1fba['shift']());}catch(_0x2c12bf){_0x2f1fba['push'](_0x2f1fba['shift']());}}}(a8_0x4432,0x98514));import{createInterface}from'node:readline/promises';import{readConfig}from'../utils/config.js';import{getCookie}from'../auth/get-cookie.js';function a8_0x394b(_0xb1acca,_0x2e7513){const _0x4432b1=a8_0x4432();return a8_0x394b=function(_0x394bc2,_0x2aaa43){_0x394bc2=_0x394bc2-0x1d1;let _0x2ce8e0=_0x4432b1[_0x394bc2];return _0x2ce8e0;},a8_0x394b(_0xb1acca,_0x2e7513);}function a8_0x4432(){const _0x1d46ce=['24CGECSb','×\x20提供的应用AppCode\x20\x22','23824pqaVbi','\x1b[0m','tableData','-client','×\x20错误详情:','\x22\x20无效','20WiJQbO','data','length','804663aDdwod','question','&pageSize=999¤tPage=1','!\x20请使用以下方式之一:','log','249CsovEp','url','trim','*\x20正在处理\x20','31550SxJnsx','*\x20开始生成\x20API\x20配置文件:','stdout','5401iARdOH','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','api-pull','string','/smartapi/dataset/getList?appCode=','!\x20请输入文件前缀\x20\x1b[90m[留空表示无前缀]\x1b[0m:\x20','stdin','3926923cVTUjA','exit','error','.ts\x20-\x20模型配置文件','app','status','\x0a*\x20正在从服务器拉取\x20API\x20配置...','\x1b[90m*\x20使用配置的应用AppCode:\x20','×\x20未提供应用AppCode,且配置中也没有默认值','-api','text','\x20\x20\x20•\x20',',且无法读取错误响应内容','1359230BLgFYN','api','93144pCiBpC','*\x20使用指定的应用AppCode:\x20','test','970618WmVHnE','获取数据集失败,HTTP状态码:\x20','.ts\x20-\x20客户端实例文件','message','success','json'];a8_0x4432=function(){return _0x1d46ce;};return a8_0x4432();}import{getApiDomain}from'../constant/domain.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';export async function initApi(_0x23e0d0){const _0x363ecc=a8_0x394b,_0x1b63f1=readConfig(),_0x53b2ed=_0x23e0d0||_0x1b63f1?.[_0x363ecc(0x1df)];(typeof _0x53b2ed!==_0x363ecc(0x1d7)||!_0x53b2ed)&&(_0x23e0d0?console[_0x363ecc(0x1dd)](_0x363ecc(0x1f4)+_0x23e0d0+_0x363ecc(0x1fa)):(console['error'](_0x363ecc(0x1e3)),console[_0x363ecc(0x202)](_0x363ecc(0x201)),console[_0x363ecc(0x202)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x363ecc(0x202)](_0x363ecc(0x1d5))),process[_0x363ecc(0x1dc)](0x1));_0x23e0d0?console[_0x363ecc(0x202)](_0x363ecc(0x1eb)+_0x53b2ed):console['log'](_0x363ecc(0x1e2)+_0x53b2ed+_0x363ecc(0x1f6));const _0x57b0ef=createInterface({'input':process[_0x363ecc(0x1da)],'output':process[_0x363ecc(0x1d3)]});let _0x3875a2;try{const _0x226310=await _0x57b0ef[_0x363ecc(0x1ff)](_0x363ecc(0x1d9));_0x3875a2=_0x226310[_0x363ecc(0x205)]();if(_0x3875a2){const _0x4cc031=/^[a-zA-Z][a-zA-Z0-9_-]*$/;!_0x4cc031[_0x363ecc(0x1ec)](_0x3875a2)&&(console[_0x363ecc(0x1dd)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),process[_0x363ecc(0x1dc)](0x1));}}finally{_0x57b0ef['close']();}console[_0x363ecc(0x202)](_0x363ecc(0x1e1));const _0x2ba019=await fetch(getApiDomain()+_0x363ecc(0x1d8)+_0x53b2ed+_0x363ecc(0x200),{'headers':{'Cookie':getCookie()}});if(_0x2ba019['ok']){const _0x341aa5=await _0x2ba019[_0x363ecc(0x1f2)]();if(_0x341aa5[_0x363ecc(0x1f1)]){const _0x5bfe05=_0x3875a2?_0x3875a2+_0x363ecc(0x1e4):_0x363ecc(0x1e9),_0x2cdaf5=_0x3875a2?_0x3875a2+_0x363ecc(0x1f8):'client';console[_0x363ecc(0x202)](_0x363ecc(0x1d2)),console[_0x363ecc(0x202)](_0x363ecc(0x1e6)+_0x5bfe05+_0x363ecc(0x1de)),console[_0x363ecc(0x202)](_0x363ecc(0x1e6)+_0x2cdaf5+_0x363ecc(0x1ef)),console[_0x363ecc(0x202)](_0x363ecc(0x206)+_0x341aa5[_0x363ecc(0x1fc)]['tableData'][_0x363ecc(0x1fd)]+'\x20个数据集...');const _0x4104f2=!_0x23e0d0;await generateApiFile(_0x341aa5['data'][_0x363ecc(0x1f7)],_0x3875a2,_0x53b2ed,_0x4104f2);}}else{if(_0x2ba019[_0x363ecc(0x1e0)]===0x191){const _0x1df2bc='获取数据集失败,原因:登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录后再尝试';console[_0x363ecc(0x1dd)]('×\x20'+_0x1df2bc),logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1df2bc,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)]});}else{const _0x1e95e0=_0x363ecc(0x1ee)+_0x2ba019[_0x363ecc(0x1e0)];console[_0x363ecc(0x1dd)]('×\x20'+_0x1e95e0);try{const _0x3b9cac=await _0x2ba019[_0x363ecc(0x1e5)]();_0x3b9cac?(console[_0x363ecc(0x1dd)](_0x363ecc(0x1f9),_0x3b9cac),logger['error'](_0x363ecc(0x1d6),_0x1e95e0,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)],'errorBody':_0x3b9cac})):logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1e95e0,{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)]});}catch(_0x54ad03){console[_0x363ecc(0x1dd)]('×\x20无法读取错误响应内容'),logger[_0x363ecc(0x1dd)](_0x363ecc(0x1d6),_0x1e95e0+_0x363ecc(0x1e7),{'status':_0x2ba019[_0x363ecc(0x1e0)],'appCode':_0x53b2ed,'url':_0x2ba019[_0x363ecc(0x204)],'readError':_0x54ad03 instanceof Error?_0x54ad03[_0x363ecc(0x1f0)]:String(_0x54ad03)});}}process[_0x363ecc(0x1dc)](0x1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20d3ed,_0x1eab7a){const _0x4031b7=a10_0x4bd3,_0x4fbd76=_0x20d3ed();while(!![]){try{const _0x509aa9=-parseInt(_0x4031b7(0x130))/0x1*(parseInt(_0x4031b7(0x137))/0x2)+parseInt(_0x4031b7(0x12d))/0x3*(-parseInt(_0x4031b7(0x13b))/0x4)+parseInt(_0x4031b7(0x12a))/0x5+parseInt(_0x4031b7(0x138))/0x6+parseInt(_0x4031b7(0x13e))/0x7+-parseInt(_0x4031b7(0x13f))/0x8+-parseInt(_0x4031b7(0x135))/0x9*(-parseInt(_0x4031b7(0x12f))/0xa);if(_0x509aa9===_0x1eab7a)break;else _0x4fbd76['push'](_0x4fbd76['shift']());}catch(_0x6fa383){_0x4fbd76['push'](_0x4fbd76['shift']());}}}(a10_0x4ae6,0x1da6d));import{jsx as a10_0x2fab24,jsxs as a10_0x94f8f4}from'react/jsx-runtime';function a10_0x4bd3(_0x31197a,_0x373763){const _0x4ae609=a10_0x4ae6();return a10_0x4bd3=function(_0x4bd3da,_0x1cedcf){_0x4bd3da=_0x4bd3da-0x12a;let _0xdb36d6=_0x4ae609[_0x4bd3da];return _0xdb36d6;},a10_0x4bd3(_0x31197a,_0x373763);}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 a10_0x50e6d2 from'ink-spinner';export function AuthServer(){const _0x529d1c=a10_0x4bd3,{exit:_0x4166e0}=useApp(),[_0x44c80b,_0x24f97b]=useState(![]),[_0xf86d71,_0x55685f]=useState(!![]),[_0x1eff51,_0x350f7a]=useState(![]),[_0x536861,_0x29da3c]=useState(![]);useEffect(()=>{const _0x9c268f=a10_0x4bd3;getIsSessionValid()[_0x9c268f(0x12c)](_0x24f97b)[_0x9c268f(0x131)](()=>_0x55685f(![]));},[]),useEffect(()=>{const _0x3e0d78=a10_0x4bd3;!_0xf86d71&&_0x44c80b&&(console[_0x3e0d78(0x134)](_0x3e0d78(0x133)),_0x4166e0());},[_0xf86d71,_0x44c80b,_0x4166e0]),useEffect(()=>{const _0x132da2=a10_0x4bd3;_0x536861&&(console[_0x132da2(0x134)](_0x132da2(0x132)),_0x4166e0());},[_0x536861,_0x4166e0]),useInput((_0x14ff8b,_0x468b5f)=>{_0x468b5f['return']&&(_0x350f7a(!![]),authServer({'silent':!![]})['then'](_0x508ca6=>{_0x29da3c(_0x508ca6);})),_0x14ff8b==='q'&&_0x4166e0();});if(_0xf86d71)return null;if(_0x44c80b||_0x536861)return null;return a10_0x2fab24(Box,{'flexDirection':_0x529d1c(0x12b),'marginTop':0x1,'marginBottom':0x1,'children':_0x1eff51?a10_0x94f8f4(Box,{'children':[a10_0x2fab24(Box,{'width':'1'}),a10_0x94f8f4(Text,{'color':_0x529d1c(0x13a),'children':[a10_0x2fab24(a10_0x50e6d2,{'type':_0x529d1c(0x139)}),'\x20\x20']}),a10_0x2fab24(Text,{'children':_0x529d1c(0x12e)}),a10_0x2fab24(Text,{'color':_0x529d1c(0x136),'children':_0x529d1c(0x13d)})]}):a10_0x94f8f4(Box,{'children':[a10_0x2fab24(Box,{'width':'1'}),a10_0x2fab24(Text,{'children':_0x529d1c(0x13c)}),a10_0x2fab24(Text,{'color':_0x529d1c(0x136),'children':'按\x20“q”\x20退出。'})]})});}function a10_0x4ae6(){const _0x2a05bd=['68mqAyqN','*\x20按回车开始登录。','请前往浏览器完成登录。','1414098RFEcoS','586128qeCFJm','306635OoFBQC','column','then','7188OyiUMU','正在登录...\x20','949990gXnkIN','17pILdEa','finally','*\x20登录成功!','√\x20当前为有效会话,无需重新登录。','log','9czmrWJ','gray','22354LimgpM','402720iCjTwm','dots','green'];a10_0x4ae6=function(){return _0x2a05bd;};return a10_0x4ae6();}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x406a0a=a11_0x4aa3;function a11_0x5104(){const _0x46edfe=['end','writeHead','1313644zyNtxh','darwin','error','text/html;\x20charset=utf-8','createServer','cookie','port','utf-8','start\x20\x22\x22\x20\x22','3018riYfON','object','log','9OAUvPa','https://dev.lovrabet.com:','then','1618186zimDLp','🔗\x20请手动复制登录地址到浏览器:','json','open\x20\x22','https://g.yuntooai.com/cert/lovrabet-dev.json','3045DqvPCW','759940unAMKH','/sign-in?redirect=','📍\x20登录地址:','4615752fWHQSX','3XtdVMO','main','catch','252270qBjyIq','⚠️\x20\x20无法自动打开浏览器','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','127.0.0.1','close','🌐\x20正在尝试自动打开浏览器...','silent','638184JPGHHB','✅\x20浏览器已自动打开,请在浏览器中完成登录','Auth\x20server\x20error:','user'];a11_0x5104=function(){return _0x46edfe;};return a11_0x5104();}(function(_0x2b1027,_0x275258){const _0x2d34ed=a11_0x4aa3,_0x5bf690=_0x2b1027();while(!![]){try{const _0x5e0ca7=parseInt(_0x2d34ed(0x191))/0x1+-parseInt(_0x2d34ed(0x17d))/0x2+-parseInt(_0x2d34ed(0x187))/0x3*(parseInt(_0x2d34ed(0x197))/0x4)+parseInt(_0x2d34ed(0x18a))/0x5+-parseInt(_0x2d34ed(0x177))/0x6*(-parseInt(_0x2d34ed(0x182))/0x7)+-parseInt(_0x2d34ed(0x186))/0x8*(-parseInt(_0x2d34ed(0x17a))/0x9)+parseInt(_0x2d34ed(0x183))/0xa;if(_0x5e0ca7===_0x275258)break;else _0x5bf690['push'](_0x5bf690['shift']());}catch(_0x50c8c1){_0x5bf690['push'](_0x5bf690['shift']());}}}(a11_0x5104,0x673f6));import{writeFileSync}from'node:fs';import a11_0x14949c from'node:https';function a11_0x4aa3(_0x4699c8,_0x15752d){const _0x510446=a11_0x5104();return a11_0x4aa3=function(_0x4aa3ab,_0xc4c15){_0x4aa3ab=_0x4aa3ab-0x173;let _0x2884aa=_0x510446[_0x4aa3ab];return _0x2884aa;},a11_0x4aa3(_0x4699c8,_0x15752d);}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(_0x21701e){const _0x232d5e=a11_0x4aa3,_0x52a694=_0x21701e?.[_0x232d5e(0x190)]||![];if(await getIsSessionValid())return!![];const _0x53cb98=await(await fetch(_0x232d5e(0x181)))[_0x232d5e(0x17f)]();return new Promise(async(_0x273dfb,_0x1f0381)=>{const _0x26b44b=_0x232d5e;let _0x5bc069=0x0;const _0x35d5be=a11_0x14949c[_0x26b44b(0x19b)](_0x53cb98,async(_0x5d0ac4,_0x333696)=>{const _0x2e0055=_0x26b44b,_0xdf0879=getUserDomain(),_0x5a6d46=_0x5d0ac4['headers'][_0x2e0055(0x173)]||'',_0x1ac7da=await fetch(_0xdf0879+'/api/auth/get-session',{'headers':{'cookie':_0x5a6d46}})[_0x2e0055(0x17c)](_0x5a4e13=>_0x5a4e13[_0x2e0055(0x17f)]()),_0x478afa=_0x1ac7da&&_0x1ac7da['session']&&_0x1ac7da[_0x2e0055(0x194)];if(_0x478afa){writeFileSync(cookieFile,_0x5a6d46,_0x2e0055(0x175)),_0x273dfb(!![]);const _0x3903a8='<!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>';_0x333696[_0x2e0055(0x196)](0xc8,{'Content-Type':_0x2e0055(0x19a)}),_0x333696[_0x2e0055(0x195)](_0x3903a8),_0x35d5be[_0x2e0055(0x18e)]();}else{const _0x19e8ed=''+encodeURIComponent(_0x2e0055(0x17b)+_0x5bc069);_0x333696[_0x2e0055(0x196)](0x12e,{'location':_0xdf0879+_0x2e0055(0x184)+_0x19e8ed}),_0x333696[_0x2e0055(0x195)]();return;}});_0x35d5be['listen'](0x0,_0x26b44b(0x18d),()=>{const _0x129157=_0x26b44b,_0x6d05ee=_0x35d5be['address']();_0x5bc069=typeof _0x6d05ee===_0x129157(0x178)&&_0x6d05ee?_0x6d05ee[_0x129157(0x174)]:Number(_0x6d05ee);const _0x3f5a9a='https://dev.lovrabet.com:'+_0x5bc069;!_0x52a694&&(console[_0x129157(0x179)]('🔐\x20正在启动登录服务...'),console[_0x129157(0x179)](_0x129157(0x185),_0x3f5a9a),console[_0x129157(0x179)](_0x129157(0x18f)),console[_0x129157(0x179)](''),console['log'](_0x129157(0x18c)),console[_0x129157(0x179)]('')),openInBrowser(_0x3f5a9a)[_0x129157(0x17c)](_0x341d70=>{const _0xd8fd42=_0x129157;!_0x52a694&&(_0x341d70?console[_0xd8fd42(0x179)](_0xd8fd42(0x192)):(console[_0xd8fd42(0x179)](_0xd8fd42(0x18b)),console[_0xd8fd42(0x179)]('🔗\x20请手动复制登录地址到浏览器:',_0x3f5a9a)),console['log'](''));})[_0x129157(0x189)](()=>{const _0x265c0f=_0x129157;!_0x52a694&&(console[_0x265c0f(0x179)](_0x265c0f(0x18b)),console[_0x265c0f(0x179)](_0x265c0f(0x17e),_0x3f5a9a),console[_0x265c0f(0x179)](''));});}),_0x35d5be['on'](_0x26b44b(0x199),_0x58b78d=>{const _0x2c0f3d=_0x26b44b;!_0x52a694&&console[_0x2c0f3d(0x199)](_0x2c0f3d(0x193),_0x58b78d),_0x1f0381(_0x58b78d);});});}function openInBrowser(_0x1b674b){return new Promise(_0x816f66=>{const _0x5b68e0=a11_0x4aa3,_0x172fdf=process['platform'];let _0x2005d7;if(_0x172fdf==='win32')_0x2005d7=_0x5b68e0(0x176)+_0x1b674b+'\x22';else _0x172fdf===_0x5b68e0(0x198)?_0x2005d7=_0x5b68e0(0x180)+_0x1b674b+'\x22':_0x2005d7='xdg-open\x20\x22'+_0x1b674b+'\x22';exec(_0x2005d7,_0x355e04=>{_0x355e04?_0x816f66(![]):_0x816f66(!![]);});});}if(import.meta[a11_0x406a0a(0x188)]){const isAuth=await authServer();console[a11_0x406a0a(0x179)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x45b3bd=a12_0x418d;(function(_0x41460a,_0x8dcff1){const _0x47d603=a12_0x418d,_0x116567=_0x41460a();while(!![]){try{const _0x3e63fb=-parseInt(_0x47d603(0x8e))/0x1+parseInt(_0x47d603(0x8f))/0x2+-parseInt(_0x47d603(0x8c))/0x3*(-parseInt(_0x47d603(0x8b))/0x4)+-parseInt(_0x47d603(0x90))/0x5*(-parseInt(_0x47d603(0x91))/0x6)+parseInt(_0x47d603(0x95))/0x7+-parseInt(_0x47d603(0x92))/0x8+parseInt(_0x47d603(0x94))/0x9;if(_0x3e63fb===_0x8dcff1)break;else _0x116567['push'](_0x116567['shift']());}catch(_0x33cb13){_0x116567['push'](_0x116567['shift']());}}}(a12_0x28aa,0x925bb));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a12_0x28aa(){const _0x16c689=['220WnhgQm','27255MieUeo','/cookie','864199ErSYsP','667794QFVvzy','1155ohDBpT','9702UkMGwg','3664128fUsMlU','/.lovrabet','1740771sKUhZd','3648260DgqbTv'];a12_0x28aa=function(){return _0x16c689;};return a12_0x28aa();}export const configDir=homedir()+a12_0x45b3bd(0x93);export const cookieFile=configDir+a12_0x45b3bd(0x8d);function a12_0x418d(_0x507517,_0x442f42){const _0x28aafb=a12_0x28aa();return a12_0x418d=function(_0x418db8,_0x24bc1f){_0x418db8=_0x418db8-0x8b;let _0x3c4e86=_0x28aafb[_0x418db8];return _0x3c4e86;},a12_0x418d(_0x507517,_0x442f42);}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x720a(){var _0x2d5242=['735pNyHIc','1108260QpsPGO','32885PPKORT','5985cLhALV','6138rQEVYV','670sDtPSE','73182lxhaQd','40803llbXQi','234Kojhte','2222hQJHZB','1216UqcbXx','utf-8'];a13_0x720a=function(){return _0x2d5242;};return a13_0x720a();}function a13_0x2464(_0x2d0009,_0x3e9ef1){var _0x720a04=a13_0x720a();return a13_0x2464=function(_0x2464f9,_0x4cc7ec){_0x2464f9=_0x2464f9-0x155;var _0x1220b0=_0x720a04[_0x2464f9];return _0x1220b0;},a13_0x2464(_0x2d0009,_0x3e9ef1);}(function(_0xbc96c8,_0x9aa02e){var _0x5e3e6e=a13_0x2464,_0x39a552=_0xbc96c8();while(!![]){try{var _0x2ec8d1=parseInt(_0x5e3e6e(0x15d))/0x1+-parseInt(_0x5e3e6e(0x160))/0x2*(-parseInt(_0x5e3e6e(0x157))/0x3)+parseInt(_0x5e3e6e(0x158))/0x4+-parseInt(_0x5e3e6e(0x159))/0x5*(parseInt(_0x5e3e6e(0x15f))/0x6)+-parseInt(_0x5e3e6e(0x15e))/0x7+parseInt(_0x5e3e6e(0x155))/0x8*(-parseInt(_0x5e3e6e(0x15a))/0x9)+-parseInt(_0x5e3e6e(0x15c))/0xa*(parseInt(_0x5e3e6e(0x15b))/0xb);if(_0x2ec8d1===_0x9aa02e)break;else _0x39a552['push'](_0x39a552['shift']());}catch(_0x14e142){_0x39a552['push'](_0x39a552['shift']());}}}(a13_0x720a,0x361cc));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x2c60b2=a13_0x2464;try{return readFileSync(cookieFile,_0x2c60b2(0x156));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ce95f,_0x1366e2){const _0x325c1e=a14_0xfdb9,_0x1d48ed=_0x3ce95f();while(!![]){try{const _0x1f32c2=parseInt(_0x325c1e(0xdc))/0x1+parseInt(_0x325c1e(0xdf))/0x2*(-parseInt(_0x325c1e(0xd5))/0x3)+-parseInt(_0x325c1e(0xd8))/0x4*(-parseInt(_0x325c1e(0xd6))/0x5)+parseInt(_0x325c1e(0xd1))/0x6+parseInt(_0x325c1e(0xdd))/0x7*(-parseInt(_0x325c1e(0xdb))/0x8)+-parseInt(_0x325c1e(0xd0))/0x9*(parseInt(_0x325c1e(0xe0))/0xa)+parseInt(_0x325c1e(0xde))/0xb*(parseInt(_0x325c1e(0xd2))/0xc);if(_0x1f32c2===_0x1366e2)break;else _0x1d48ed['push'](_0x1d48ed['shift']());}catch(_0x292665){_0x1d48ed['push'](_0x1d48ed['shift']());}}}(a14_0x54c9,0x8b8e4));function a14_0xfdb9(_0x586534,_0x1ea7da){const _0x54c913=a14_0x54c9();return a14_0xfdb9=function(_0xfdb90c,_0x2d09d2){_0xfdb90c=_0xfdb90c-0xd0;let _0x28d23a=_0x54c913[_0xfdb90c];return _0x28d23a;},a14_0xfdb9(_0x586534,_0x1ea7da);}function a14_0x54c9(){const _0x35af0a=['10Hzzihh','129825gTtBrG','3692328bPQoMs','120odeFml','session','json','3asuBfi','10lxlwaD','/api/auth/get-session','580132PGULBL','then','user','433880QIRJMs','79389ZHesbS','63nWPOiX','1207019wtZmjy','2015946xgSxXt'];a14_0x54c9=function(){return _0x35af0a;};return a14_0x54c9();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x5b37c3=a14_0xfdb9;try{if(!existsSync(cookieFile))return![];const _0x478d1e=readFileSync(cookieFile,'utf-8'),_0x2b068b=await fetch(getUserDomain()+_0x5b37c3(0xd7),{'headers':{'cookie':_0x478d1e}})[_0x5b37c3(0xd9)](_0x9c5bfb=>_0x9c5bfb[_0x5b37c3(0xd4)]());return _0x2b068b&&_0x2b068b[_0x5b37c3(0xd3)]&&_0x2b068b[_0x5b37c3(0xda)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a15_0x394b(_0x3c912e,_0x1ed9be){var _0x20e6e2=a15_0x20e6();return a15_0x394b=function(_0x394b0b,_0x31978a){_0x394b0b=_0x394b0b-0x184;var _0xc9147d=_0x20e6e2[_0x394b0b];return _0xc9147d;},a15_0x394b(_0x3c912e,_0x1ed9be);}(function(_0x146f49,_0x21ad3a){var _0xa63299=a15_0x394b,_0x20c05b=_0x146f49();while(!![]){try{var _0x3502de=-parseInt(_0xa63299(0x189))/0x1*(parseInt(_0xa63299(0x190))/0x2)+parseInt(_0xa63299(0x18c))/0x3*(parseInt(_0xa63299(0x184))/0x4)+parseInt(_0xa63299(0x192))/0x5+parseInt(_0xa63299(0x185))/0x6*(parseInt(_0xa63299(0x18f))/0x7)+parseInt(_0xa63299(0x191))/0x8+-parseInt(_0xa63299(0x18d))/0x9*(parseInt(_0xa63299(0x18e))/0xa)+parseInt(_0xa63299(0x188))/0xb*(-parseInt(_0xa63299(0x18a))/0xc);if(_0x3502de===_0x21ad3a)break;else _0x20c05b['push'](_0x20c05b['shift']());}catch(_0x668ae5){_0x20c05b['push'](_0x20c05b['shift']());}}}(a15_0x20e6,0x6eac6));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a15_0x20e6(){var _0x57abe5=['8187612GPYXFp','log','41529ZoUxCW','18zMvWtU','1297550rGpEAH','1099xPEIqn','312478HwtKFU','4634952amtOqt','1145535bsVqBc','192jFNZBw','20910kjoAyX','✓\x20已退出登录','!\x20当前未登录','11nOtYOM','4mMakqf'];a15_0x20e6=function(){return _0x57abe5;};return a15_0x20e6();}export function logout(){var _0x472b82=a15_0x394b;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x472b82(0x186))):console[_0x472b82(0x18b)](_0x472b82(0x187));}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a16_0x198d79=a16_0xee6c;(function(_0x4e8fe6,_0x1546d1){const _0x4def12=a16_0xee6c,_0x44310c=_0x4e8fe6();while(!![]){try{const _0x44965f=parseInt(_0x4def12(0xa2))/0x1+-parseInt(_0x4def12(0x98))/0x2+parseInt(_0x4def12(0x91))/0x3+parseInt(_0x4def12(0xa6))/0x4+parseInt(_0x4def12(0xa1))/0x5*(parseInt(_0x4def12(0x9e))/0x6)+-parseInt(_0x4def12(0xa0))/0x7*(parseInt(_0x4def12(0x8f))/0x8)+parseInt(_0x4def12(0x94))/0x9;if(_0x44965f===_0x1546d1)break;else _0x44310c['push'](_0x44310c['shift']());}catch(_0xe37870){_0x44310c['push'](_0x44310c['shift']());}}}(a16_0x1046,0x40deb));import{jsx as a16_0x3a866d}from'react/jsx-runtime';function a16_0xee6c(_0xc23851,_0x39dc64){const _0x10468d=a16_0x1046();return a16_0xee6c=function(_0xee6c0f,_0x46639a){_0xee6c0f=_0xee6c0f-0x8f;let _0x44b6c3=_0x10468d[_0xee6c0f];return _0x44b6c3;},a16_0xee6c(_0xc23851,_0x39dc64);}import a16_0x4e84e4 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';function a16_0x1046(){const _0x251579=['add','watch','api','186ZjGoRc','preview','2129043fYoQRP','2705HjjEQM','64292FXRnsJ','config','input','trim','154764sFavIT','exit','\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登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\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添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\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构建项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\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监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20[app-code]\x20\x20//\x20拉取并生成\x20API\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查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','setLogPath','error','8NPZToG','clear','1001664rbZHqS','page','logs','3859578zkcMgT','boolean','flags','cwd','625256aGZErp','auth','start'];a16_0x1046=function(){return _0x251579;};return a16_0x1046();}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';const cli=a16_0x4e84e4(a16_0x198d79(0xa8),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a16_0x198d79(0x95)}}});await run();async function run(){const _0x3ad47b=a16_0x198d79,_0xf725e7=cli[_0x3ad47b(0xa4)][0x0];switch(_0xf725e7){case'create':{const _0xc3cb64=cli[_0x3ad47b(0xa4)][0x1]?.[_0x3ad47b(0xa5)]();render(a16_0x3a866d(CreateApp,{'projectCode':_0xc3cb64}));break;}case _0x3ad47b(0x9b):{cli['input'][0x1]===_0x3ad47b(0x92)&&(logger[_0x3ad47b(0xa9)](process[_0x3ad47b(0x97)]()),render(a16_0x3a866d(AddPage,{})));break;}case _0x3ad47b(0x9a):{try{logger[_0x3ad47b(0xa9)](process['cwd']()),await runStart();}catch(_0x5f4c5c){console['error'](_0x5f4c5c),process[_0x3ad47b(0xa7)](0x1);}break;}case'build':{try{logger[_0x3ad47b(0xa9)](process[_0x3ad47b(0x97)]()),await runBuild();}catch(_0x1fbcb8){console['error'](_0x1fbcb8),process[_0x3ad47b(0xa7)](0x1);}break;}case _0x3ad47b(0x9f):{const _0x4f5a60=cli[_0x3ad47b(0x96)][_0x3ad47b(0x9c)];logger['setLogPath'](process[_0x3ad47b(0x97)]());if(_0x4f5a60)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x4784c8){console[_0x3ad47b(0xaa)](_0x4784c8),process[_0x3ad47b(0xa7)](0x1);}else try{await runPreview();}catch(_0x4b18b3){console['error'](_0x4b18b3),process[_0x3ad47b(0xa7)](0x1);}break;}case _0x3ad47b(0xa3):{render(a16_0x3a866d(Config,{'cli':cli}));break;}case _0x3ad47b(0x9d):{await apiCli(cli);break;}case _0x3ad47b(0x99):{render(a16_0x3a866d(AuthServer,{}));break;}case'logout':{logout();break;}case _0x3ad47b(0x93):{cli['flags'][_0x3ad47b(0x90)]?clearLogs():showLogs();break;}default:render(a16_0x3a866d(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x38e6(_0x582189,_0x14fe78){const _0xb039cd=a17_0xb039();return a17_0x38e6=function(_0x38e649,_0x804f28){_0x38e649=_0x38e649-0x19f;let _0x53a30b=_0xb039cd[_0x38e649];return _0x53a30b;},a17_0x38e6(_0x582189,_0x14fe78);}function a17_0xb039(){const _0x444ed=['node_modules','55932oMNPAD','4284672AQXcpd','build','vite','7037577pbrGRN','npm\x20run\x20build\x20exited\x20with\x20code\x20','env','796198nFgWog','error','2777580AYnnfi','3151938hQGCUl','2156712QSkkGL','close','--watch','8OyZTYh','1spPVFN'];a17_0xb039=function(){return _0x444ed;};return a17_0xb039();}(function(_0x5766c6,_0xaad145){const _0x515ee8=a17_0x38e6,_0x1259ca=_0x5766c6();while(!![]){try{const _0x2285d4=parseInt(_0x515ee8(0x1a8))/0x1*(parseInt(_0x515ee8(0x1a0))/0x2)+-parseInt(_0x515ee8(0x1a3))/0x3+parseInt(_0x515ee8(0x1a4))/0x4+parseInt(_0x515ee8(0x1a2))/0x5+-parseInt(_0x515ee8(0x1aa))/0x6+-parseInt(_0x515ee8(0x1ab))/0x7+parseInt(_0x515ee8(0x1a7))/0x8*(parseInt(_0x515ee8(0x1ae))/0x9);if(_0x2285d4===_0xaad145)break;else _0x1259ca['push'](_0x1259ca['shift']());}catch(_0x2d2f9f){_0x1259ca['push'](_0x1259ca['shift']());}}}(a17_0xb039,0x9323a));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x4da108,_0x13ed51)=>{const _0x4f9795=a17_0x38e6,_0x245f96=spawn(_0x4f9795(0x1ad),[_0x4f9795(0x1ac),_0x4f9795(0x1a6)],{'stdio':'inherit','shell':!![],'env':{...process[_0x4f9795(0x19f)],'PATH':''+join(process['cwd'](),_0x4f9795(0x1a9),'.bin')+delimiter+process[_0x4f9795(0x19f)]['PATH']}});_0x245f96['on'](_0x4f9795(0x1a5),_0x1205ce=>{const _0x489677=_0x4f9795;if(_0x1205ce===0x0||_0x1205ce===null)_0x4da108();else _0x13ed51(new Error(_0x489677(0x1af)+_0x1205ce));}),_0x245f96['on'](_0x4f9795(0x1a1),_0x13ed51);});}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9a3cfb,_0x484d1e){const _0x1bd07d=a18_0x31d5,_0x43ebda=_0x9a3cfb();while(!![]){try{const _0x468d84=parseInt(_0x1bd07d(0x16e))/0x1*(-parseInt(_0x1bd07d(0x173))/0x2)+parseInt(_0x1bd07d(0x16b))/0x3+-parseInt(_0x1bd07d(0x177))/0x4*(parseInt(_0x1bd07d(0x182))/0x5)+-parseInt(_0x1bd07d(0x169))/0x6*(-parseInt(_0x1bd07d(0x17f))/0x7)+-parseInt(_0x1bd07d(0x179))/0x8*(parseInt(_0x1bd07d(0x175))/0x9)+-parseInt(_0x1bd07d(0x168))/0xa*(-parseInt(_0x1bd07d(0x170))/0xb)+parseInt(_0x1bd07d(0x180))/0xc;if(_0x468d84===_0x484d1e)break;else _0x43ebda['push'](_0x43ebda['shift']());}catch(_0x3af5f9){_0x43ebda['push'](_0x43ebda['shift']());}}}(a18_0x5125,0x894b3));function a18_0x31d5(_0x4eaeea,_0x2b9031){const _0x51259d=a18_0x5125();return a18_0x31d5=function(_0x31d5f7,_0x4359be){_0x31d5f7=_0x31d5f7-0x164;let _0x4051ef=_0x51259d[_0x31d5f7];return _0x4051ef;},a18_0x31d5(_0x4eaeea,_0x2b9031);}import{delimiter,join}from'node:path';function a18_0x5125(){const _0x57ccc5=['1762976vfCWHe','toString','4838337PYTUct','env','4IUzWeB','trim','8jmiWUV','run','.bin','npm\x20run\x20build\x20exited\x20with\x20code\x20','info','npm\x20run\x20build','8841ssHdeO','849156DchOZu','error','1658060JzPQWR','cwd','开始构建项目','node_modules','build','1096420kRjOlc','2112UVGdgt','PATH','2761719hcjmVT','inherit','npm','1aImdCX','now','88tJETfY','success','close'];a18_0x5125=function(){return _0x57ccc5;};return a18_0x5125();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x19013e,_0x2ac2ff)=>{const _0x535ea5=a18_0x31d5,_0x5c96b5=Date[_0x535ea5(0x16f)]();logger[_0x535ea5(0x17d)](_0x535ea5(0x167),_0x535ea5(0x165),{'command':'npm\x20run\x20build'});let _0x552411='';const _0x389619=spawn(_0x535ea5(0x16d),[_0x535ea5(0x17a),'build'],{'stdio':[_0x535ea5(0x16c),_0x535ea5(0x16c),'pipe'],'shell':!![],'env':{...process[_0x535ea5(0x176)],'PATH':''+join(process[_0x535ea5(0x164)](),_0x535ea5(0x166),_0x535ea5(0x17b))+delimiter+process['env'][_0x535ea5(0x16a)]}});_0x389619['stderr']?.['on']('data',_0x1af9e6=>{const _0x37c032=_0x535ea5;_0x552411+=_0x1af9e6[_0x37c032(0x174)]();}),_0x389619['on'](_0x535ea5(0x172),_0x2fdc38=>{const _0x8e2701=_0x535ea5,_0x42aa4b=Date[_0x8e2701(0x16f)]()-_0x5c96b5;if(_0x2fdc38===0x0||_0x2fdc38===null)logger[_0x8e2701(0x171)](_0x8e2701(0x167),'项目构建成功',_0x42aa4b),_0x19013e();else{const _0x4bc5dd={'exitCode':_0x2fdc38,'duration':_0x42aa4b,'command':_0x8e2701(0x17e),'cwd':process[_0x8e2701(0x164)]()};_0x552411[_0x8e2701(0x178)]()&&(_0x4bc5dd['stderr']=_0x552411[_0x8e2701(0x178)]()),logger['error'](_0x8e2701(0x167),'项目构建失败',_0x4bc5dd),_0x2ac2ff(new Error(_0x8e2701(0x17c)+_0x2fdc38));}}),_0x389619['on'](_0x535ea5(0x181),_0x5d7f71=>{const _0x136002=_0x535ea5,_0x440bce=Date[_0x136002(0x16f)]()-_0x5c96b5;logger[_0x136002(0x181)](_0x136002(0x167),'项目构建出错',{'error':_0x5d7f71['message'],'duration':_0x440bce,'stderr':_0x552411[_0x136002(0x178)]()||undefined}),_0x2ac2ff(_0x5d7f71);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ae8e3,_0x3f7254){const _0x41b047=a19_0x14ac,_0x4763d9=_0x3ae8e3();while(!![]){try{const _0x2fe79c=-parseInt(_0x41b047(0x1d5))/0x1*(-parseInt(_0x41b047(0x1ce))/0x2)+parseInt(_0x41b047(0x1e5))/0x3+-parseInt(_0x41b047(0x1de))/0x4*(parseInt(_0x41b047(0x1d9))/0x5)+parseInt(_0x41b047(0x1d3))/0x6+parseInt(_0x41b047(0x1cd))/0x7*(parseInt(_0x41b047(0x1e0))/0x8)+parseInt(_0x41b047(0x1db))/0x9+-parseInt(_0x41b047(0x1e1))/0xa;if(_0x2fe79c===_0x3f7254)break;else _0x4763d9['push'](_0x4763d9['shift']());}catch(_0x3cf875){_0x4763d9['push'](_0x4763d9['shift']());}}}(a19_0x4ac3,0x8fb21));import{logger}from'../utils/logger.js';export function showLogs(){const _0x4dfd0d=a19_0x14ac;logger['setLogPath'](process[_0x4dfd0d(0x1ca)]());const _0x3c7d2f=logger[_0x4dfd0d(0x1d2)]();if(_0x3c7d2f['length']===0x0){console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1da));return;}console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1c9)),_0x3c7d2f[_0x4dfd0d(0x1d4)]((_0x1bbf29,_0x301bdf)=>{const _0x346811=_0x4dfd0d,_0x136300=new Date(_0x1bbf29['timestamp'])[_0x346811(0x1d8)]('zh-CN'),_0x28e624=_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1cf)?'√':_0x1bbf29['level']==='error'?'×':_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1e3)?'!':'i';console[_0x346811(0x1cc)](_0x301bdf+0x1+'.\x20'+_0x28e624+'\x20['+_0x1bbf29[_0x346811(0x1cb)]+']\x20'+_0x1bbf29['message']),console[_0x346811(0x1cc)](_0x346811(0x1d7)+_0x136300),_0x1bbf29[_0x346811(0x1dc)]&&console[_0x346811(0x1cc)](_0x346811(0x1e4)+_0x1bbf29[_0x346811(0x1dc)]+'ms'),_0x1bbf29[_0x346811(0x1d6)]&&Object[_0x346811(0x1e6)](_0x1bbf29[_0x346811(0x1d6)])[_0x346811(0x1dd)]>0x0&&console[_0x346811(0x1cc)](_0x346811(0x1d1)+JSON['stringify'](_0x1bbf29[_0x346811(0x1d6)],null,0x2)),console[_0x346811(0x1cc)]('');});}function a19_0x14ac(_0x343f72,_0x2bb358){const _0x4ac334=a19_0x4ac3();return a19_0x14ac=function(_0x14ac6e,_0x125b47){_0x14ac6e=_0x14ac6e-0x1c9;let _0x4c098e=_0x4ac334[_0x14ac6e];return _0x4c098e;},a19_0x14ac(_0x343f72,_0x2bb358);}export function clearLogs(){const _0x3686a2=a19_0x14ac;logger[_0x3686a2(0x1d0)](process['cwd']()),logger[_0x3686a2(0x1e2)](),console['log']('*\x20日志已清空');}function a19_0x4ac3(){const _0x561bd8=['13079950JKKLdD','clearLogs','warn','\x20\x20\x20耗时:\x20','809691ScPtUk','keys','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','cwd','command','log','5348MMpxaM','177646rxVgRd','success','setLogPath','\x20\x20\x20详情:\x20','readLogs','5563812VTugHq','forEach','11dVoqKu','details','\x20\x20\x20时间:\x20','toLocaleString','624055vaFuIW','*\x20暂无日志记录','443268JDXavi','duration','length','32ZdgvBa','level','7032MHLnZy'];a19_0x4ac3=function(){return _0x561bd8;};return a19_0x4ac3();}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5abf21,_0x38d410){const _0x2acaa1=a20_0x41f9,_0x9328f5=_0x5abf21();while(!![]){try{const _0x1b12bc=-parseInt(_0x2acaa1(0x93))/0x1+parseInt(_0x2acaa1(0x8c))/0x2+parseInt(_0x2acaa1(0x90))/0x3+-parseInt(_0x2acaa1(0x84))/0x4*(parseInt(_0x2acaa1(0x8b))/0x5)+-parseInt(_0x2acaa1(0x88))/0x6+parseInt(_0x2acaa1(0x92))/0x7+-parseInt(_0x2acaa1(0x79))/0x8*(-parseInt(_0x2acaa1(0x95))/0x9);if(_0x1b12bc===_0x38d410)break;else _0x9328f5['push'](_0x9328f5['shift']());}catch(_0x2b7cb6){_0x9328f5['push'](_0x9328f5['shift']());}}}(a20_0x2d7e,0x50207));function a20_0x2d7e(){const _0x359298=['449376zACRdB','PATH','vite\x20preview','node_modules','218196EqtCgd','inherit','3534622gRAokm','502139siKEoI','success','54dkBWRb','908608biUEod','env','.bin','preview','info','预览服务器启动成功','error','cwd','vite\x20preview\x20exited\x20with\x20code\x20','close','pipe','11884sspboj','trim','stderr','预览服务器启动出错','3439602PztKLe','now','toString','135dErCyl'];a20_0x2d7e=function(){return _0x359298;};return a20_0x2d7e();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x41f9(_0xf9865c,_0x6f6dae){const _0x2d7e3c=a20_0x2d7e();return a20_0x41f9=function(_0x41f9b2,_0x4dd122){_0x41f9b2=_0x41f9b2-0x79;let _0x10373e=_0x2d7e3c[_0x41f9b2];return _0x10373e;},a20_0x41f9(_0xf9865c,_0x6f6dae);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x49d6d8,_0x52974f)=>{const _0x3aaa68=a20_0x41f9,_0x49ab4f=Date[_0x3aaa68(0x89)]();logger[_0x3aaa68(0x7d)](_0x3aaa68(0x7c),'启动预览服务器',{'command':_0x3aaa68(0x8e)});let _0x335e43='';const _0x5789ad=spawn('vite',[_0x3aaa68(0x7c)],{'stdio':[_0x3aaa68(0x91),_0x3aaa68(0x91),_0x3aaa68(0x83)],'shell':!![],'env':{...process[_0x3aaa68(0x7a)],'PATH':''+join(process[_0x3aaa68(0x80)](),_0x3aaa68(0x8f),_0x3aaa68(0x7b))+delimiter+process[_0x3aaa68(0x7a)][_0x3aaa68(0x8d)]}});_0x5789ad['stderr']?.['on']('data',_0x46d558=>{const _0x835ec=_0x3aaa68;_0x335e43+=_0x46d558[_0x835ec(0x8a)]();}),_0x5789ad['on'](_0x3aaa68(0x82),_0x4e12c0=>{const _0x2fa331=_0x3aaa68,_0x2d592a=Date[_0x2fa331(0x89)]()-_0x49ab4f;if(_0x4e12c0===0x0||_0x4e12c0===null)logger[_0x2fa331(0x94)](_0x2fa331(0x7c),_0x2fa331(0x7e),_0x2d592a),_0x49d6d8();else{const _0x36b526={'exitCode':_0x4e12c0,'duration':_0x2d592a,'command':_0x2fa331(0x8e),'cwd':process['cwd']()};_0x335e43[_0x2fa331(0x85)]()&&(_0x36b526[_0x2fa331(0x86)]=_0x335e43[_0x2fa331(0x85)]()),logger[_0x2fa331(0x7f)](_0x2fa331(0x7c),'预览服务器启动失败',_0x36b526),_0x52974f(new Error(_0x2fa331(0x81)+_0x4e12c0));}}),_0x5789ad['on'](_0x3aaa68(0x7f),_0x138af8=>{const _0x1b955d=_0x3aaa68,_0x4c5647=Date['now']()-_0x49ab4f;logger[_0x1b955d(0x7f)](_0x1b955d(0x7c),_0x1b955d(0x87),{'error':_0x138af8['message'],'duration':_0x4c5647,'stderr':_0x335e43[_0x1b955d(0x85)]()||undefined}),_0x52974f(_0x138af8);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a21_0x1a14(_0x3ce0bb,_0x2d7ed8){const _0xcd6d5d=a21_0xcd6d();return a21_0x1a14=function(_0x1a1445,_0x5e3653){_0x1a1445=_0x1a1445-0xc7;let _0x1f724e=_0xcd6d5d[_0x1a1445];return _0x1f724e;},a21_0x1a14(_0x3ce0bb,_0x2d7ed8);}function a21_0xcd6d(){const _0x1cbd82=['env','525WYxzcr','pipe','12vaOFTL','578866ByYLZY','45138afeYWq','1647921KCLZIL','inherit','开发服务器启动失败','2770888LdGxJj','开发服务器启动出错','225VaCDbD','info','4971DkoOJB','cwd','toString','启动开发服务器','127510tnSBXQ','295908kBACnV','开发服务器启动成功','now','PATH','612GDelWl','error','35gTnxIb','close','vite\x20exited\x20with\x20code\x20','start','stderr','trim','vite','data'];a21_0xcd6d=function(){return _0x1cbd82;};return a21_0xcd6d();}(function(_0x2f2ca9,_0x891438){const _0x5032c3=a21_0x1a14,_0x31a936=_0x2f2ca9();while(!![]){try{const _0x395eec=parseInt(_0x5032c3(0xdf))/0x1+-parseInt(_0x5032c3(0xd1))/0x2*(parseInt(_0x5032c3(0xc8))/0x3)+-parseInt(_0x5032c3(0xcd))/0x4*(parseInt(_0x5032c3(0xd3))/0x5)+parseInt(_0x5032c3(0xe0))/0x6*(parseInt(_0x5032c3(0xdc))/0x7)+parseInt(_0x5032c3(0xe4))/0x8+parseInt(_0x5032c3(0xe6))/0x9*(-parseInt(_0x5032c3(0xcc))/0xa)+-parseInt(_0x5032c3(0xe1))/0xb*(-parseInt(_0x5032c3(0xde))/0xc);if(_0x395eec===_0x891438)break;else _0x31a936['push'](_0x31a936['shift']());}catch(_0xcd599){_0x31a936['push'](_0x31a936['shift']());}}}(a21_0xcd6d,0x482b7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x35e1d2){return new Promise((_0x434500,_0x22f833)=>{const _0x1ddb10=a21_0x1a14,_0x4d754b=Date[_0x1ddb10(0xcf)](),_0x12c8d8=_0x35e1d2||process[_0x1ddb10(0xc9)]();logger[_0x1ddb10(0xc7)](_0x1ddb10(0xd6),_0x1ddb10(0xcb),{'command':_0x1ddb10(0xd9),'cwd':_0x12c8d8});let _0x286678='';const _0x5411aa=spawn(_0x1ddb10(0xd9),{'stdio':[_0x1ddb10(0xe2),'inherit',_0x1ddb10(0xdd)],'shell':!![],'cwd':_0x12c8d8,'env':{...process['env'],'PATH':''+join(_0x12c8d8,'node_modules','.bin')+delimiter+process[_0x1ddb10(0xdb)][_0x1ddb10(0xd0)]}});_0x5411aa['stderr']?.['on'](_0x1ddb10(0xda),_0x5bafaf=>{const _0x17be89=_0x1ddb10,_0x50f02f=_0x5bafaf[_0x17be89(0xca)]();_0x286678+=_0x50f02f,process[_0x17be89(0xd7)]['write'](_0x50f02f);}),_0x5411aa['on'](_0x1ddb10(0xd4),_0x1ddcfa=>{const _0x5c1249=_0x1ddb10,_0x24eed1=Date[_0x5c1249(0xcf)]()-_0x4d754b;if(_0x1ddcfa===0x0||_0x1ddcfa===null)logger['success'](_0x5c1249(0xd6),_0x5c1249(0xce),_0x24eed1),_0x434500();else{const _0x3788a0={'exitCode':_0x1ddcfa,'duration':_0x24eed1,'command':'vite','cwd':_0x12c8d8};_0x286678[_0x5c1249(0xd8)]()&&(_0x3788a0[_0x5c1249(0xd7)]=_0x286678[_0x5c1249(0xd8)]()),logger[_0x5c1249(0xd2)](_0x5c1249(0xd6),_0x5c1249(0xe3),_0x3788a0),_0x22f833(new Error(_0x5c1249(0xd5)+_0x1ddcfa));}}),_0x5411aa['on'](_0x1ddb10(0xd2),_0x3e2c30=>{const _0x2689f0=_0x1ddb10,_0x4fa829=Date[_0x2689f0(0xcf)]()-_0x4d754b,_0x2670e9={'error':_0x3e2c30['message'],'duration':_0x4fa829,'command':'vite','cwd':_0x12c8d8};_0x286678['trim']()&&(_0x2670e9['stderr']=_0x286678[_0x2689f0(0xd8)]()),logger[_0x2689f0(0xd2)](_0x2689f0(0xd6),_0x2689f0(0xe5),_0x2670e9),_0x22f833(_0x3e2c30);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a09f7,_0x457af9){const _0x283713=a22_0x6e26,_0x5cfcf1=_0x1a09f7();while(!![]){try{const _0x558336=-parseInt(_0x283713(0x81))/0x1*(-parseInt(_0x283713(0x7c))/0x2)+parseInt(_0x283713(0x76))/0x3+-parseInt(_0x283713(0x7a))/0x4*(-parseInt(_0x283713(0x82))/0x5)+-parseInt(_0x283713(0x7e))/0x6*(-parseInt(_0x283713(0x83))/0x7)+parseInt(_0x283713(0x79))/0x8+parseInt(_0x283713(0x78))/0x9*(parseInt(_0x283713(0x80))/0xa)+-parseInt(_0x283713(0x7d))/0xb;if(_0x558336===_0x457af9)break;else _0x5cfcf1['push'](_0x5cfcf1['shift']());}catch(_0x5d4227){_0x5cfcf1['push'](_0x5cfcf1['shift']());}}}(a22_0x29f3,0x60620));function a22_0x29f3(){const _0x2c74f1=['6JjuTPS','description','72500pfgAly','1qHKXOf','605YbeOtJ','2585387dzykdI','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','map','gray','command','列出所有配置项','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','无效的命令,可用命令如下:','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','1843572hSCTRJ','\x20*\x20配置示例:','927lucmxn','3709640oKEjrf','1244pTdmku','\x20\x20\x20\x20','1808YDHJSY','20218781qlNmiI'];a22_0x29f3=function(){return _0x2c74f1;};return a22_0x29f3();}function a22_0x6e26(_0x1f3d63,_0x277a6b){const _0x29f393=a22_0x29f3();return a22_0x6e26=function(_0x6e26d3,_0x5972b7){_0x6e26d3=_0x6e26d3-0x6e;let _0x313fb=_0x29f393[_0x6e26d3];return _0x313fb;},a22_0x6e26(_0x1f3d63,_0x277a6b);}import{jsxs as a22_0x1838bc,jsx as a22_0x225820}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x28f630=a22_0x6e26,_0x2852e9=[{'command':_0x28f630(0x75),'description':'设置配置项'},{'command':_0x28f630(0x74),'description':'获取配置项'},{'command':_0x28f630(0x72),'description':_0x28f630(0x71)}],_0x464059=[{'command':_0x28f630(0x84),'description':'配置当前项目的\x20App\x20Code'}];return a22_0x1838bc(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x225820(Box,{'marginBottom':0x1,'children':a22_0x1838bc(Text,{'color':_0x28f630(0x6f),'children':['\x20!','\x20\x20',_0x28f630(0x73)]})}),_0x2852e9[_0x28f630(0x6e)](_0xc98d9=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0xc98d9['command']]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0xc98d9['description']})]},_0xc98d9[_0x28f630(0x70)])),a22_0x225820(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x28f630(0x77)})}),_0x464059[_0x28f630(0x6e)](_0x2a959e=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0x2a959e[_0x28f630(0x70)]]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x2a959e[_0x28f630(0x7f)]})]},_0x2a959e[_0x28f630(0x70)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x123e10,_0x4b12d5){const _0x4f098a=a23_0x2200,_0x54ceac=_0x123e10();while(!![]){try{const _0x267b6c=-parseInt(_0x4f098a(0x133))/0x1+parseInt(_0x4f098a(0x13a))/0x2*(parseInt(_0x4f098a(0x131))/0x3)+parseInt(_0x4f098a(0x127))/0x4+parseInt(_0x4f098a(0x132))/0x5*(parseInt(_0x4f098a(0x137))/0x6)+parseInt(_0x4f098a(0x138))/0x7*(-parseInt(_0x4f098a(0x12f))/0x8)+-parseInt(_0x4f098a(0x126))/0x9+-parseInt(_0x4f098a(0x12c))/0xa;if(_0x267b6c===_0x4b12d5)break;else _0x54ceac['push'](_0x54ceac['shift']());}catch(_0x52b164){_0x54ceac['push'](_0x54ceac['shift']());}}}(a23_0x2888,0xba684));import{jsx as a23_0x2f1a41}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process['cwd'](),'.lovrabetrc');function a23_0x2200(_0x4546c3,_0x1fbf5a){const _0x288895=a23_0x2888();return a23_0x2200=function(_0x2200e4,_0x3eb194){_0x2200e4=_0x2200e4-0x126;let _0x51e8e2=_0x288895[_0x2200e4];return _0x51e8e2;},a23_0x2200(_0x4546c3,_0x1fbf5a);}function a23_0x2888(){const _0x176a53=['2526435wdAtMT','5860100BoiSrh','undefined','保存配置失败','utf8','red','21003460PmUXkm','get','log','25288JBfEGz','stringify','6675sOxIIt','114160rEiWCB','1120481ADUboP','未提供配置值','input','includes','378zciWsd','350migPYN','set','1366NYHaIK','list'];a23_0x2888=function(){return _0x176a53;};return a23_0x2888();}export function Config(_0x3d119c){const _0x542099=a23_0x2200,{cli:_0x38d40a}=_0x3d119c,_0x923786=_0x38d40a[_0x542099(0x135)][0x1],_0x33002b=_0x38d40a[_0x542099(0x135)][0x2],_0x3b3d0d=[_0x542099(0x139),_0x542099(0x12d)][_0x542099(0x136)](_0x923786||''),_0x35d118=_0x38d40a[_0x542099(0x135)]['length']>=0x3,_0x4726c9=readConfig();if(_0x923786===_0x542099(0x139)){if(_0x33002b){const _0x4b432d=_0x38d40a[_0x542099(0x135)][0x3];if(typeof _0x4b432d!==_0x542099(0x128)){_0x4726c9[_0x33002b]=_0x4b432d;try{writeFileSync(configPath,JSON[_0x542099(0x130)](_0x4726c9,null,0x2),{'encoding':_0x542099(0x12a)});}catch(_0x2aac8d){return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':_0x542099(0x12b),'children':_0x542099(0x129)})});}return null;}return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':'red','children':_0x542099(0x134)})});}}if(_0x923786===_0x542099(0x12d)){if(_0x33002b)return console['log'](_0x4726c9[_0x33002b]||_0x542099(0x128)),null;return null;}if(_0x923786===_0x542099(0x13b))return console[_0x542099(0x12e)](JSON[_0x542099(0x130)](_0x4726c9,null,0x2)),null;if(!_0x3b3d0d||!_0x35d118)return a23_0x2f1a41(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a24_0x292b(){const _0x6200ff=['https://user-daily.lovrabet.com','50lclDBy','https://api.lovrabet.com','7tCFybF','1370238UQOomD','https://user.lovrabet.com','393804Zrpaea','7004240uEeRlJ','2050677haSufm','https://daily-api.lovrabet.com','262404eyPNRy','online','6sTyJyl','3171688uizQUL','556336pKoisL'];a24_0x292b=function(){return _0x6200ff;};return a24_0x292b();}const a24_0x2bd64b=a24_0x459e;function a24_0x459e(_0x53d99c,_0x5a70bb){const _0x292bef=a24_0x292b();return a24_0x459e=function(_0x459ed4,_0x575b10){_0x459ed4=_0x459ed4-0x114;let _0x5479b3=_0x292bef[_0x459ed4];return _0x5479b3;},a24_0x459e(_0x53d99c,_0x5a70bb);}(function(_0x4a5e82,_0x7300ba){const _0x1efcef=a24_0x459e,_0x1ad5cb=_0x4a5e82();while(!![]){try{const _0x3b2c0f=parseInt(_0x1efcef(0x114))/0x1+parseInt(_0x1efcef(0x11c))/0x2*(-parseInt(_0x1efcef(0x116))/0x3)+-parseInt(_0x1efcef(0x11e))/0x4+parseInt(_0x1efcef(0x120))/0x5*(-parseInt(_0x1efcef(0x11a))/0x6)+-parseInt(_0x1efcef(0x122))/0x7*(parseInt(_0x1efcef(0x11d))/0x8)+parseInt(_0x1efcef(0x118))/0x9+parseInt(_0x1efcef(0x117))/0xa;if(_0x3b2c0f===_0x7300ba)break;else _0x1ad5cb['push'](_0x1ad5cb['shift']());}catch(_0x525596){_0x1ad5cb['push'](_0x1ad5cb['shift']());}}}(a24_0x292b,0xe37f2));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x115):a24_0x2bd64b(0x11f);export const getApiDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x121):a24_0x2bd64b(0x119);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a25_0x3c2969=a25_0x1692;function a25_0x3d70(){const _0x2f2699=['10378720TpFIme','9561730JwxWIC','1854459spluvP','env','234iavNRb','18036IuaHgC','1535tAIKVd','LOVRABET_ENV','65834UeoDWN','123557GlQdhu','4247310tataBa','3eJFhrH','online'];a25_0x3d70=function(){return _0x2f2699;};return a25_0x3d70();}(function(_0x166ec2,_0x979157){const _0x10213e=a25_0x1692,_0x144e6d=_0x166ec2();while(!![]){try{const _0x39597d=-parseInt(_0x10213e(0x1d8))/0x1*(parseInt(_0x10213e(0x1d5))/0x2)+parseInt(_0x10213e(0x1d7))/0x3+parseInt(_0x10213e(0x1d2))/0x4*(parseInt(_0x10213e(0x1d3))/0x5)+-parseInt(_0x10213e(0x1d1))/0x6*(-parseInt(_0x10213e(0x1d6))/0x7)+-parseInt(_0x10213e(0x1cd))/0x8+-parseInt(_0x10213e(0x1cf))/0x9+-parseInt(_0x10213e(0x1ce))/0xa;if(_0x39597d===_0x979157)break;else _0x144e6d['push'](_0x144e6d['shift']());}catch(_0x2c9f29){_0x144e6d['push'](_0x144e6d['shift']());}}}(a25_0x3d70,0xe313b));let env=process[a25_0x3c2969(0x1d0)][a25_0x3c2969(0x1d4)]||a25_0x3c2969(0x1d9);function a25_0x1692(_0x55760d,_0xa3bf17){const _0x3d7023=a25_0x3d70();return a25_0x1692=function(_0x1692d1,_0x312882){_0x1692d1=_0x1692d1-0x1cd;let _0x758b98=_0x3d7023[_0x1692d1];return _0x758b98;},a25_0x1692(_0x55760d,_0xa3bf17);}export function getEnv(){return env;}export function initEnv(_0x153a9a){env=_0x153a9a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1ee688,_0x28c4c7){const _0x354b66=a26_0x4856,_0x3a21f8=_0x1ee688();while(!![]){try{const _0x5c2e3a=parseInt(_0x354b66(0xfa))/0x1+parseInt(_0x354b66(0xe5))/0x2+-parseInt(_0x354b66(0x10d))/0x3*(-parseInt(_0x354b66(0xeb))/0x4)+-parseInt(_0x354b66(0xf8))/0x5*(-parseInt(_0x354b66(0x10c))/0x6)+parseInt(_0x354b66(0x116))/0x7*(-parseInt(_0x354b66(0xf7))/0x8)+parseInt(_0x354b66(0xec))/0x9*(-parseInt(_0x354b66(0xe0))/0xa)+parseInt(_0x354b66(0xfc))/0xb*(-parseInt(_0x354b66(0xfe))/0xc);if(_0x5c2e3a===_0x28c4c7)break;else _0x3a21f8['push'](_0x3a21f8['shift']());}catch(_0x27316e){_0x3a21f8['push'](_0x3a21f8['shift']());}}}(a26_0x112d,0xad167));function a26_0x112d(){const _0x42c932=['2810024WuVwkk','6699345mLEyaz','my-app','912209DqdqDu','\x20←\x20','132AJNjWG','length','1122780gcUSwn','yellow','项目名长度不能超过\x2050\x20个字符','\x20检查中...','*\x20应用AppCode\x20','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20是否要先登录以便拉取\x20API\x20配置?','login','confirm-api-pull','未设置','*\x20正在登录,请前往浏览器完成登录...','Yes','项目名不合法','login-process','6mpHKzz','2200449IXVUMw','[可选]:\x20','已登录','api-pull','拉取API配置','gray','login-check','red','\x20直接回车确认,或输入自定义名称','14vblleo','\x20\x20使用\x20←→\x20选择,回车确认','应用AppCode长度不能超过\x20100\x20个字符','creating','rightArrow','login-prompt','*\x20创建新项目','*\x20项目名:\x20','!\x20未检测到有效登录','10uGFSKP','跳过登录','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','column','green','1815346RAXQgv','test','leftArrow','登录状态','app-code','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','4mQnfvY','12230829JxtopS','backspace','*\x20正在检查登录状态...','应用AppCode','project-name','cyan','return','slice','√\x20检测到有效登录状态','trim','登录失败'];a26_0x112d=function(){return _0x42c932;};return a26_0x112d();}import{jsx as a26_0x50378d,jsxs as a26_0x4ea38b,Fragment as a26_0xc98a7c}from'react/jsx-runtime';function a26_0x4856(_0x31e452,_0x42097c){const _0x112d53=a26_0x112d();return a26_0x4856=function(_0x4856d5,_0x53dbf0){_0x4856d5=_0x4856d5-0xdd;let _0x3bf5b6=_0x112d53[_0x4856d5];return _0x3bf5b6;},a26_0x4856(_0x31e452,_0x42097c);}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0x213fff){const _0x176c9f=a26_0x4856,{onCreate:_0x549e99}=_0x213fff,[_0x5aae43,_0x239372]=useState('project-name'),[_0x2dbabb,_0x4f2896]=useState(''),[_0x4dadb5,_0x37af26]=useState(''),[_0x1fc084,_0x3f026c]=useState(''),[_0x47c6ff,_0x16741b]=useState(''),[_0x2e623c,_0x3f1d9e]=useState([]),[_0x59e959,_0x534855]=useState(null),[_0x1513d8,_0x59405b]=useState(![]),[_0x4f83dc,_0x59f64f]=useState(![]),[_0x54d697,_0x581a1b]=useState(![]),[_0x7d7f1,_0x34b6dd]=useState(0x0),[_0x50d0f0,_0x4dbe61]=useState(0x0),_0x256f8b=_0x176c9f(0xf9);function _0x346ca4(_0xb5fed6){const _0x38dd87=_0x176c9f;if(_0xb5fed6[_0x38dd87(0xfd)]>0x32)return{'valid':![],'message':_0x38dd87(0x100)};const _0x155c17=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xb5fed6?.[_0x38dd87(0xf5)]()&&!_0x155c17[_0x38dd87(0xe6)](_0xb5fed6))return{'valid':![],'message':_0x38dd87(0xea)};return{'valid':!![]};}function _0x3561ea(_0x12fe84){const _0x4a9efc=_0x176c9f;if(!_0x12fe84[_0x4a9efc(0xf5)]())return{'valid':!![]};if(_0x12fe84[_0x4a9efc(0xfd)]>0x64)return{'valid':![],'message':_0x4a9efc(0x118)};const _0x1357cd=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1357cd[_0x4a9efc(0xe6)](_0x12fe84))return{'valid':![],'message':_0x4a9efc(0x103)};return{'valid':!![]};}async function _0x1e875a(){_0x59405b(!![]);try{const _0x20863d=await getIsSessionValid();return _0x534855(_0x20863d),_0x20863d;}catch(_0x300a57){return _0x534855(![]),![];}finally{_0x59405b(![]);}}async function _0x434e97(){_0x59f64f(!![]);try{const _0x19a2c7=await authServer({'silent':!![]});return _0x534855(_0x19a2c7),_0x19a2c7;}catch(_0x11a1db){return _0x534855(![]),![];}finally{_0x59f64f(![]);}}return useInput(async(_0x1de13a,_0x98a91e)=>{const _0x7faf2=_0x176c9f;if(_0x98a91e[_0x7faf2(0xe7)]||_0x98a91e[_0x7faf2(0x11a)]){if(_0x5aae43==='confirm-api-pull'){_0x34b6dd(_0x1d2837=>_0x1d2837===0x0?0x1:0x0);return;}if(_0x5aae43===_0x7faf2(0x11b)){_0x4dbe61(_0x5dd1a3=>_0x5dd1a3===0x0?0x1:0x0);return;}}if(_0x98a91e[_0x7faf2(0xf2)]){if(_0x5aae43===_0x7faf2(0xf0)){const _0x5f22ee=_0x1fc084['trim']()||_0x256f8b;if(_0x47c6ff)return;_0x4f2896(_0x5f22ee),_0x3f1d9e([{'step':_0x7faf2(0xf0),'label':'项目名','value':_0x5f22ee}]),_0x3f026c(''),_0x16741b(''),_0x239372(_0x7faf2(0xe9));return;}if(_0x5aae43==='app-code'){if(_0x47c6ff)return;const _0x403a74=_0x1fc084['trim']();_0x37af26(_0x403a74),_0x3f1d9e(_0x2dc010=>[..._0x2dc010,{'step':_0x7faf2(0xe9),'label':_0x7faf2(0xef),'value':_0x403a74||_0x7faf2(0x107)}]),_0x3f026c(''),_0x16741b('');if(_0x403a74){_0x239372(_0x7faf2(0x113));const _0x46434d=await _0x1e875a();_0x46434d?_0x239372(_0x7faf2(0x106)):_0x239372(_0x7faf2(0x11b));}else _0x549e99({'projectName':_0x2dbabb,'appCode':undefined,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x106)){const _0x3d2772=_0x7d7f1===0x0;_0x581a1b(_0x3d2772),_0x3f1d9e(_0x52157f=>[..._0x52157f,{'step':_0x7faf2(0x110),'label':_0x7faf2(0x111),'value':_0x3d2772?'是':'否'}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':_0x3d2772}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x11b)){const _0x57d85b=_0x50d0f0===0x0;if(_0x57d85b){_0x239372(_0x7faf2(0x10b));const _0x2c764d=await _0x434e97();_0x2c764d?(_0x3f1d9e(_0x16c221=>[..._0x16c221,{'step':'login','label':'登录状态','value':_0x7faf2(0x10f)}]),_0x239372(_0x7faf2(0x106))):(_0x3f1d9e(_0x39863f=>[..._0x39863f,{'step':_0x7faf2(0x105),'label':_0x7faf2(0xe8),'value':_0x7faf2(0xf6)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119)));}else _0x3f1d9e(_0x6c6264=>[..._0x6c6264,{'step':_0x7faf2(0x105),'label':'登录状态','value':_0x7faf2(0xe1)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}}if(_0x98a91e[_0x7faf2(0xed)]||_0x98a91e['delete']){_0x3f026c(_0x54e749=>{const _0x5d43f7=_0x7faf2,_0x4c3506=_0x54e749[_0x5d43f7(0xf3)](0x0,-0x1);if(_0x5aae43===_0x5d43f7(0xf0)){const {valid:_0x34d403,message:_0x71cdbb}=_0x346ca4(_0x4c3506);_0x16741b(_0x34d403?'':_0x71cdbb||_0x5d43f7(0x10a));}else{if(_0x5aae43===_0x5d43f7(0xe9)){const {valid:_0x4e27d1,message:_0x3dffcf}=_0x3561ea(_0x4c3506);_0x16741b(_0x4e27d1?'':_0x3dffcf||'应用AppCode不合法');}}return _0x4c3506;});return;}if(['creating','login-check',_0x7faf2(0x10b)]['includes'](_0x5aae43))return;if(_0x5aae43===_0x7faf2(0x106)||_0x5aae43===_0x7faf2(0x11b))return;_0x3f026c(_0x2c0630=>{const _0x30a894=_0x7faf2,_0x5c1b4a=_0x2c0630+_0x1de13a;if(_0x5aae43==='project-name'){const {valid:_0x5e9b13,message:_0x3978bb}=_0x346ca4(_0x5c1b4a);_0x16741b(_0x5e9b13?'':_0x3978bb||_0x30a894(0x10a));}else{if(_0x5aae43===_0x30a894(0xe9)){const {valid:_0x5e34db,message:_0x2322f2}=_0x3561ea(_0x5c1b4a);_0x16741b(_0x5e34db?'':_0x2322f2||'应用AppCode不合法');}}return _0x5c1b4a;});}),a26_0x4ea38b(Box,{'flexDirection':_0x176c9f(0xe3),'marginTop':0x1,'children':[_0x2e623c[_0x176c9f(0xfd)]===0x0&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x176c9f(0xdd)})}),_0x2e623c['map'](_0x478940=>a26_0x4ea38b(Box,{'children':[a26_0x4ea38b(Text,{'color':_0x176c9f(0xe4),'children':['√\x20',_0x478940['label'],':\x20']}),a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x478940['value']})]},_0x478940['step'])),_0x5aae43==='project-name'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xde)}),_0x1fc084?a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}):a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x256f8b}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&!_0x1fc084&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x115)})})]}),_0x5aae43==='app-code'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x102)}),a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x10e)}),a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&a26_0x50378d(Box,{'children':a26_0x4ea38b(Text,{'color':_0x176c9f(0x112),'children':['\x20',_0x176c9f(0xe2)]})})]}),_0x5aae43===_0x176c9f(0x113)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xee)}),_0x1513d8&&a26_0x50378d(Text,{'color':'gray','children':_0x176c9f(0x101)})]}),_0x5aae43==='confirm-api-pull'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x176c9f(0xf4)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x7d7f1===0x0?_0x176c9f(0xe4):'gray','children':[_0x7d7f1===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x7d7f1===0x1?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x7d7f1===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x11b)&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':'yellow','children':_0x176c9f(0xdf)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':_0x176c9f(0x104)})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x50d0f0===0x0?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x50d0f0===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x50d0f0===0x1?'green':_0x176c9f(0x112),'children':[_0x50d0f0===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x10b)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x108)}),_0x4f83dc&&a26_0x50378d(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
|
|
1
|
+
(function(_0x1ffb5c,_0xc6df0b){const _0x2b335b=a26_0x25a8,_0x28f22d=_0x1ffb5c();while(!![]){try{const _0x5dd65c=-parseInt(_0x2b335b(0x1a5))/0x1+-parseInt(_0x2b335b(0x1ac))/0x2*(-parseInt(_0x2b335b(0x19e))/0x3)+parseInt(_0x2b335b(0x1c8))/0x4+-parseInt(_0x2b335b(0x1af))/0x5*(parseInt(_0x2b335b(0x1bf))/0x6)+-parseInt(_0x2b335b(0x19d))/0x7+-parseInt(_0x2b335b(0x1a4))/0x8*(-parseInt(_0x2b335b(0x194))/0x9)+parseInt(_0x2b335b(0x19c))/0xa;if(_0x5dd65c===_0xc6df0b)break;else _0x28f22d['push'](_0x28f22d['shift']());}catch(_0x38825b){_0x28f22d['push'](_0x28f22d['shift']());}}}(a26_0x5662,0x3c3f5));import{jsx as a26_0x565250,jsxs as a26_0x54147c,Fragment as a26_0x3d557c}from'react/jsx-runtime';function a26_0x5662(){const _0x5e9985=['跳过登录','gray','*\x20项目名:\x20','yellow','*\x20正在检查登录状态...','268586kICJVj','!\x20未检测到有效登录','column','5ZqMexo','red','login','app-code','Yes','登录状态','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','登录失败','green','delete','项目名长度不能超过\x2050\x20个字符','cyan','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20\x20使用\x20←→\x20选择,回车确认','leftArrow','应用AppCode不合法','1165578KfkphY','*\x20是否要自动拉取\x20API\x20配置?','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','creating','api-pull','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','slice','应用AppCode','已登录','511212NlXUua','未设置','test','拉取API配置','label','405wkxfIm','rightArrow','√\x20检测到有效登录状态','includes','*\x20创建新项目','trim','confirm-api-pull','项目名','5216210HhJEez','3092474qAvZxY','3atiEWz','backspace','login-check','length','project-name','login-prompt','67960DBoIGH','283174kQkaPy','my-app'];a26_0x5662=function(){return _0x5e9985;};return a26_0x5662();}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a26_0x25a8(_0xb26e23,_0x1268ce){const _0x56627d=a26_0x5662();return a26_0x25a8=function(_0x25a8c4,_0x21dfd5){_0x25a8c4=_0x25a8c4-0x194;let _0x3d37b9=_0x56627d[_0x25a8c4];return _0x3d37b9;},a26_0x25a8(_0xb26e23,_0x1268ce);}export function EnhancedGuidedCreate(_0x2ab0bc){const _0x2a9ccb=a26_0x25a8,{onCreate:_0x215690}=_0x2ab0bc,[_0x118380,_0x2ef382]=useState(_0x2a9ccb(0x1a2)),[_0x5897ed,_0x23033d]=useState(''),[_0x51d5f4,_0xe7aee2]=useState(''),[_0x2550e7,_0x2c89de]=useState(''),[_0x191c6e,_0x20d162]=useState(''),[_0x233fd7,_0x1aec9b]=useState([]),[_0x52f3a8,_0x37186d]=useState(null),[_0xcc9bff,_0x4e0dfe]=useState(![]),[_0x116149,_0x4b82d2]=useState(![]),[_0x119f99,_0x4f81bb]=useState(![]),[_0x2f0762,_0x43d793]=useState(0x0),[_0x249740,_0x5f5867]=useState(0x0),_0x18a7f4=_0x2a9ccb(0x1a6);function _0x44579d(_0x213e41){const _0x2d82db=_0x2a9ccb;if(_0x213e41[_0x2d82db(0x1a1)]>0x32)return{'valid':![],'message':_0x2d82db(0x1b9)};const _0x234dae=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x213e41?.[_0x2d82db(0x199)]()&&!_0x234dae[_0x2d82db(0x1ca)](_0x213e41))return{'valid':![],'message':_0x2d82db(0x1c1)};return{'valid':!![]};}function _0x4444b3(_0x4a03ae){const _0x1b830e=_0x2a9ccb;if(!_0x4a03ae['trim']())return{'valid':!![]};if(_0x4a03ae[_0x1b830e(0x1a1)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x59c2db=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x59c2db[_0x1b830e(0x1ca)](_0x4a03ae))return{'valid':![],'message':_0x1b830e(0x1b5)};return{'valid':!![]};}async function _0x5faf4a(){_0x4e0dfe(!![]);try{const _0x5de3d6=await getIsSessionValid();return _0x37186d(_0x5de3d6),_0x5de3d6;}catch(_0x16e762){return _0x37186d(![]),![];}finally{_0x4e0dfe(![]);}}async function _0x4f9f4d(){_0x4b82d2(!![]);try{const _0x139659=await authServer({'silent':!![]});return _0x37186d(_0x139659),_0x139659;}catch(_0x48d876){return _0x37186d(![]),![];}finally{_0x4b82d2(![]);}}return useInput(async(_0x1d2460,_0x25df23)=>{const _0x78a3af=_0x2a9ccb;if(_0x25df23[_0x78a3af(0x1bd)]||_0x25df23[_0x78a3af(0x195)]){if(_0x118380===_0x78a3af(0x19a)){_0x43d793(_0x12934f=>_0x12934f===0x0?0x1:0x0);return;}if(_0x118380===_0x78a3af(0x1a3)){_0x5f5867(_0x287c89=>_0x287c89===0x0?0x1:0x0);return;}}if(_0x25df23['return']){if(_0x118380===_0x78a3af(0x1a2)){const _0x45d065=_0x2550e7[_0x78a3af(0x199)]()||_0x18a7f4;if(_0x191c6e)return;_0x23033d(_0x45d065),_0x1aec9b([{'step':_0x78a3af(0x1a2),'label':_0x78a3af(0x19b),'value':_0x45d065}]),_0x2c89de(''),_0x20d162(''),_0x2ef382(_0x78a3af(0x1b2));return;}if(_0x118380===_0x78a3af(0x1b2)){if(_0x191c6e)return;const _0x484cd9=_0x2550e7[_0x78a3af(0x199)]();_0xe7aee2(_0x484cd9),_0x1aec9b(_0xa5a7e4=>[..._0xa5a7e4,{'step':_0x78a3af(0x1b2),'label':_0x78a3af(0x1c6),'value':_0x484cd9||_0x78a3af(0x1c9)}]),_0x2c89de(''),_0x20d162('');if(_0x484cd9){_0x2ef382(_0x78a3af(0x1a0));const _0x4a93bf=await _0x5faf4a();_0x4a93bf?_0x2ef382(_0x78a3af(0x19a)):_0x2ef382(_0x78a3af(0x1a3));}else _0x215690({'projectName':_0x5897ed,'appCode':undefined,'pullApi':![]}),_0x2ef382('creating');return;}if(_0x118380===_0x78a3af(0x19a)){const _0x50cc69=_0x2f0762===0x0;_0x4f81bb(_0x50cc69),_0x1aec9b(_0x2f63f9=>[..._0x2f63f9,{'step':_0x78a3af(0x1c3),'label':_0x78a3af(0x1cb),'value':_0x50cc69?'是':'否'}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':_0x50cc69}),_0x2ef382(_0x78a3af(0x1c2));return;}if(_0x118380===_0x78a3af(0x1a3)){const _0x2bff41=_0x249740===0x0;if(_0x2bff41){_0x2ef382('login-process');const _0x99ceaa=await _0x4f9f4d();_0x99ceaa?(_0x1aec9b(_0x537d92=>[..._0x537d92,{'step':_0x78a3af(0x1b1),'label':_0x78a3af(0x1b4),'value':_0x78a3af(0x1c7)}]),_0x2ef382(_0x78a3af(0x19a))):(_0x1aec9b(_0xea2963=>[..._0xea2963,{'step':_0x78a3af(0x1b1),'label':'登录状态','value':_0x78a3af(0x1b6)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382(_0x78a3af(0x1c2)));}else _0x1aec9b(_0x58e9be=>[..._0x58e9be,{'step':'login','label':'登录状态','value':_0x78a3af(0x1a7)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382('creating');return;}}if(_0x25df23[_0x78a3af(0x19f)]||_0x25df23[_0x78a3af(0x1b8)]){_0x2c89de(_0x28b1bd=>{const _0x32da4b=_0x78a3af,_0x35b94c=_0x28b1bd[_0x32da4b(0x1c5)](0x0,-0x1);if(_0x118380===_0x32da4b(0x1a2)){const {valid:_0x2b2577,message:_0x462c76}=_0x44579d(_0x35b94c);_0x20d162(_0x2b2577?'':_0x462c76||'项目名不合法');}else{if(_0x118380===_0x32da4b(0x1b2)){const {valid:_0x5507f4,message:_0x244300}=_0x4444b3(_0x35b94c);_0x20d162(_0x5507f4?'':_0x244300||'应用AppCode不合法');}}return _0x35b94c;});return;}if([_0x78a3af(0x1c2),_0x78a3af(0x1a0),'login-process'][_0x78a3af(0x197)](_0x118380))return;if(_0x118380===_0x78a3af(0x19a)||_0x118380===_0x78a3af(0x1a3))return;_0x2c89de(_0x584b7e=>{const _0x5ae9df=_0x78a3af,_0x266a5b=_0x584b7e+_0x1d2460;if(_0x118380===_0x5ae9df(0x1a2)){const {valid:_0x136a6a,message:_0x583743}=_0x44579d(_0x266a5b);_0x20d162(_0x136a6a?'':_0x583743||'项目名不合法');}else{if(_0x118380==='app-code'){const {valid:_0x3860af,message:_0x48e651}=_0x4444b3(_0x266a5b);_0x20d162(_0x3860af?'':_0x48e651||_0x5ae9df(0x1be));}}return _0x266a5b;});}),a26_0x54147c(Box,{'flexDirection':_0x2a9ccb(0x1ae),'marginTop':0x1,'children':[_0x233fd7[_0x2a9ccb(0x1a1)]===0x0&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1ba),'children':_0x2a9ccb(0x198)})}),_0x233fd7['map'](_0x5890cf=>a26_0x54147c(Box,{'children':[a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b7),'children':['√\x20',_0x5890cf[_0x2a9ccb(0x1cc)],':\x20']}),a26_0x565250(Text,{'color':'cyan','children':_0x5890cf['value']})]},_0x5890cf['step'])),_0x118380==='project-name'&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1a9)}),_0x2550e7?a26_0x565250(Text,{'color':'green','children':_0x2550e7}):a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x18a7f4}),_0x191c6e&&a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b0),'children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&!_0x2550e7&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x118380===_0x2a9ccb(0x1b2)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20应用AppCode\x20'}),a26_0x565250(Text,{'color':'gray','children':'[可选]:\x20'}),a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2550e7}),_0x191c6e&&a26_0x54147c(Text,{'color':'red','children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&a26_0x565250(Box,{'children':a26_0x54147c(Text,{'color':_0x2a9ccb(0x1a8),'children':['\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)']})})]}),_0x118380==='login-check'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1ab)}),_0xcc9bff&&a26_0x565250(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x118380===_0x2a9ccb(0x19a)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2a9ccb(0x196)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1c0)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x2f0762===0x0?'green':'gray','children':[_0x2f0762===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x2f0762===0x1?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x2f0762===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x118380===_0x2a9ccb(0x1a3)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':'yellow','children':_0x2a9ccb(0x1ad)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1bb)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x249740===0x0?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x249740===0x0?'▶\x20':'\x20\x20',_0x2a9ccb(0x1b3)]}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x249740===0x1?'green':_0x2a9ccb(0x1a8),'children':[_0x249740===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':_0x2a9ccb(0x1c4)})})]}),_0x118380==='login-process'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x116149&&a26_0x565250(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x580b23,_0x496446){const _0x2bd31e=a27_0xcd40,_0x52c0f7=_0x580b23();while(!![]){try{const _0x11a390=-parseInt(_0x2bd31e(0x8b))/0x1+parseInt(_0x2bd31e(0x89))/0x2*(-parseInt(_0x2bd31e(0x91))/0x3)+-parseInt(_0x2bd31e(0x90))/0x4+-parseInt(_0x2bd31e(0x8a))/0x5*(-parseInt(_0x2bd31e(0x8c))/0x6)+-parseInt(_0x2bd31e(0x88))/0x7+parseInt(_0x2bd31e(0x86))/0x8+-parseInt(_0x2bd31e(0x87))/0x9*(-parseInt(_0x2bd31e(0x8d))/0xa);if(_0x11a390===_0x496446)break;else _0x52c0f7['push'](_0x52c0f7['shift']());}catch(_0x4c1d39){_0x52c0f7['push'](_0x52c0f7['shift']());}}}(a27_0x51a1,0x823ba));export function formatElapsed(_0x393e23){const _0x54e0c2=a27_0xcd40,_0xa0c9e6=Date['now']()-_0x393e23;if(_0xa0c9e6<0x3e8)return _0xa0c9e6+'ms';const _0x5167e7=(_0xa0c9e6/0x3e8)[_0x54e0c2(0x8e)](0x2),_0x1f433=_0x5167e7[_0x54e0c2(0x8f)](/\.?0+$/u,'');return _0x1f433+'s';}function a27_0xcd40(_0x48a574,_0xb555e7){const _0x51a1f2=a27_0x51a1();return a27_0xcd40=function(_0xcd40ab,_0x23481c){_0xcd40ab=_0xcd40ab-0x86;let _0x5a64ef=_0x51a1f2[_0xcd40ab];return _0x5a64ef;},a27_0xcd40(_0x48a574,_0xb555e7);}function a27_0x51a1(){const _0x252738=['325275RzTELV','4269640QfbdHN','367317ovGrRo','5611193wNyZIY','18wsXiAV','25kmRbOy','534530pUXVtR','494580wxZepU','650nnJUBb','toFixed','replace','3013248brXQCX'];a27_0x51a1=function(){return _0x252738;};return a27_0x51a1();}
|