@lovrabet/cli 1.1.8 → 1.1.10
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 +51 -0
- 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 -0
- package/lib/api/api-doc.js +1 -0
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/fetch-datasets.js +1 -0
- 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/http-client.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/templates/pages/sdk-fetch/index.tsx.tpl +41 -52
- package/templates/projects/sub-app-react-demo/package-lock.json +4 -4
- package/templates/projects/sub-app-react-demo/package.json +1 -1
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x2e15d1=a14_0x467b;(function(_0x1466f7,_0x1d97c6){const _0x290eef=a14_0x467b,_0x33036e=_0x1466f7();while(!![]){try{const _0x4b0e40=-parseInt(_0x290eef(0xd1))/0x1*(parseInt(_0x290eef(0xd2))/0x2)+parseInt(_0x290eef(0xce))/0x3+-parseInt(_0x290eef(0xc1))/0x4*(parseInt(_0x290eef(0xc0))/0x5)+-parseInt(_0x290eef(0xb6))/0x6+parseInt(_0x290eef(0xb7))/0x7+parseInt(_0x290eef(0xca))/0x8*(-parseInt(_0x290eef(0xd3))/0x9)+-parseInt(_0x290eef(0xd9))/0xa*(-parseInt(_0x290eef(0xda))/0xb);if(_0x4b0e40===_0x1d97c6)break;else _0x33036e['push'](_0x33036e['shift']());}catch(_0x205f53){_0x33036e['push'](_0x33036e['shift']());}}}(a14_0x554f,0xf0e43));function a14_0x554f(){const _0x25a8b1=['8991000gCEIKN','182133WlnUTK','🔗\x20请手动复制登录地址到浏览器:','📍\x20登录地址:','writeHead','darwin','🔐\x20正在启动登录服务...','silent','utf-8','cookie','50hSYVRe','282428rAXkOH','<!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>','127.0.0.1','Auth\x20server\x20error:','json','main','then','user','xdg-open\x20\x22','8MLhipy','win32','end','/sign-in?redirect=','3313008QSfPcM','https://dev.lovrabet.com:','⚠️\x20\x20无法自动打开浏览器','8ftbtiF','130892yUjSRb','3016863gjNUWK','object','✅\x20浏览器已自动打开,请在浏览器中完成登录','catch','text/html;\x20charset=utf-8','platform','90ijQEek','3568499qEJIBN','createServer','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','🌐\x20正在尝试自动打开浏览器...','log'];a14_0x554f=function(){return _0x25a8b1;};return a14_0x554f();}import{writeFileSync}from'node:fs';import a14_0x1f6a40 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a14_0x467b(_0x191f7c,_0x46e9df){const _0x554fa9=a14_0x554f();return a14_0x467b=function(_0x467b06,_0x4b3bb9){_0x467b06=_0x467b06-0xb6;let _0x1c9695=_0x554fa9[_0x467b06];return _0x1c9695;},a14_0x467b(_0x191f7c,_0x46e9df);}export async function authServer(_0x45da7f){const _0x480ee8=a14_0x467b,_0x32b936=_0x45da7f?.[_0x480ee8(0xbd)]||![];if(await getIsSessionValid())return!![];const _0x3b8f90=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x480ee8(0xc5)]();return new Promise(async(_0x4e4aa7,_0x28e555)=>{const _0x2dc8f2=_0x480ee8;let _0x3f082c=0x0;const _0x1d3300=a14_0x1f6a40[_0x2dc8f2(0xdb)](_0x3b8f90,async(_0x597319,_0x890ba9)=>{const _0x427796=_0x2dc8f2,_0x3ba96c=getUserDomain(),_0x5a6eec=_0x597319['headers'][_0x427796(0xbf)]||'',_0xc83954=await fetch(_0x3ba96c+'/api/auth/get-session',{'headers':{'cookie':_0x5a6eec}})['then'](_0x266db2=>_0x266db2[_0x427796(0xc5)]()),_0x82c3a9=_0xc83954&&_0xc83954['session']&&_0xc83954[_0x427796(0xc8)];if(_0x82c3a9){writeFileSync(cookieFile,_0x5a6eec,_0x427796(0xbe)),_0x4e4aa7(!![]);const _0x30e961=_0x427796(0xc2);_0x890ba9[_0x427796(0xba)](0xc8,{'Content-Type':_0x427796(0xd7)}),_0x890ba9[_0x427796(0xcc)](_0x30e961),_0x1d3300['close']();}else{const _0x1f042e=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x3f082c);_0x890ba9[_0x427796(0xba)](0x12e,{'location':_0x3ba96c+_0x427796(0xcd)+_0x1f042e}),_0x890ba9[_0x427796(0xcc)]();return;}});_0x1d3300['listen'](0x0,_0x2dc8f2(0xc3),()=>{const _0x35daf1=_0x2dc8f2,_0x1ecb9b=_0x1d3300['address']();_0x3f082c=typeof _0x1ecb9b===_0x35daf1(0xd4)&&_0x1ecb9b?_0x1ecb9b['port']:Number(_0x1ecb9b);const _0x22e7a4=_0x35daf1(0xcf)+_0x3f082c;!_0x32b936&&(console['log'](_0x35daf1(0xbc)),console[_0x35daf1(0xde)](_0x35daf1(0xb9),_0x22e7a4),console[_0x35daf1(0xde)](_0x35daf1(0xdd)),console[_0x35daf1(0xde)](''),console[_0x35daf1(0xde)](_0x35daf1(0xdc)),console[_0x35daf1(0xde)]('')),openInBrowser(_0x22e7a4)[_0x35daf1(0xc7)](_0x500858=>{const _0x59ea9d=_0x35daf1;!_0x32b936&&(_0x500858?console[_0x59ea9d(0xde)](_0x59ea9d(0xd5)):(console[_0x59ea9d(0xde)](_0x59ea9d(0xd0)),console[_0x59ea9d(0xde)](_0x59ea9d(0xb8),_0x22e7a4)),console[_0x59ea9d(0xde)](''));})[_0x35daf1(0xd6)](()=>{const _0x653d21=_0x35daf1;!_0x32b936&&(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x653d21(0xde)](_0x653d21(0xb8),_0x22e7a4),console[_0x653d21(0xde)](''));});}),_0x1d3300['on']('error',_0x228a08=>{const _0x1182c9=_0x2dc8f2;!_0x32b936&&console['error'](_0x1182c9(0xc4),_0x228a08),_0x28e555(_0x228a08);});});}function openInBrowser(_0x314dfe){return new Promise(_0x2b7dd2=>{const _0x3d38c2=a14_0x467b,_0x229755=process[_0x3d38c2(0xd8)];let _0x363959;if(_0x229755===_0x3d38c2(0xcb))_0x363959='start\x20\x22\x22\x20\x22'+_0x314dfe+'\x22';else _0x229755===_0x3d38c2(0xbb)?_0x363959='open\x20\x22'+_0x314dfe+'\x22':_0x363959=_0x3d38c2(0xc9)+_0x314dfe+'\x22';exec(_0x363959,_0x35b832=>{_0x35b832?_0x2b7dd2(![]):_0x2b7dd2(!![]);});});}if(import.meta[a14_0x2e15d1(0xc6)]){const isAuth=await authServer();console[a14_0x2e15d1(0xde)]('isAuth',isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a15_0x4785(){const _0x272c11=['4954600PQmfLi','913639KFjYcb','2eTMgHZ','78954Vulqoz','7280357VCYcYs','43064955Nsxmkz','5370655EJEjyU','3653334eRsOQl','184nLNKlz'];a15_0x4785=function(){return _0x272c11;};return a15_0x4785();}(function(_0x5cd204,_0x1c68fb){const _0xff8ed9=a15_0x2783,_0x275fd1=_0x5cd204();while(!![]){try{const _0xa731e5=parseInt(_0xff8ed9(0x18c))/0x1*(parseInt(_0xff8ed9(0x18d))/0x2)+parseInt(_0xff8ed9(0x18e))/0x3*(parseInt(_0xff8ed9(0x18a))/0x4)+parseInt(_0xff8ed9(0x188))/0x5+parseInt(_0xff8ed9(0x189))/0x6+parseInt(_0xff8ed9(0x186))/0x7+parseInt(_0xff8ed9(0x18b))/0x8+-parseInt(_0xff8ed9(0x187))/0x9;if(_0xa731e5===_0x1c68fb)break;else _0x275fd1['push'](_0x275fd1['shift']());}catch(_0x24b57e){_0x275fd1['push'](_0x275fd1['shift']());}}}(a15_0x4785,0xa66c4));function a15_0x2783(_0x32b3c8,_0x28aee3){const _0x478560=a15_0x4785();return a15_0x2783=function(_0x2783f7,_0x2935a3){_0x2783f7=_0x2783f7-0x186;let _0x32813a=_0x478560[_0x2783f7];return _0x32813a;},a15_0x2783(_0x32b3c8,_0x28aee3);}import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x4d19(_0x2d56b6,_0x213bc2){var _0x53c345=a16_0x53c3();return a16_0x4d19=function(_0x4d1902,_0x3202ef){_0x4d1902=_0x4d1902-0x1ab;var _0x582b25=_0x53c345[_0x4d1902];return _0x582b25;},a16_0x4d19(_0x2d56b6,_0x213bc2);}(function(_0x3509ee,_0x2162ab){var _0x59d693=a16_0x4d19,_0x216a9d=_0x3509ee();while(!![]){try{var _0x4cb674=-parseInt(_0x59d693(0x1b3))/0x1+parseInt(_0x59d693(0x1ad))/0x2*(-parseInt(_0x59d693(0x1af))/0x3)+parseInt(_0x59d693(0x1ac))/0x4*(parseInt(_0x59d693(0x1b0))/0x5)+-parseInt(_0x59d693(0x1ae))/0x6+parseInt(_0x59d693(0x1b1))/0x7*(-parseInt(_0x59d693(0x1ab))/0x8)+parseInt(_0x59d693(0x1b2))/0x9+parseInt(_0x59d693(0x1b4))/0xa;if(_0x4cb674===_0x2162ab)break;else _0x216a9d['push'](_0x216a9d['shift']());}catch(_0x33dc2e){_0x216a9d['push'](_0x216a9d['shift']());}}}(a16_0x53c3,0xbbfea));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';function a16_0x53c3(){var _0x3171c6=['31615970VTvkfI','476200qeLiHG','12yrKzZd','1094LpzZMN','1186590PtrLaK','7077QXncgV','283405ftjzcw','21ZYUGzk','426177laIujk','942254nNEbGj'];a16_0x53c3=function(){return _0x3171c6;};return a16_0x53c3();}export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x599282,_0x488ff1){const _0x26b9d2=a17_0x5ae1,_0xffeefe=_0x599282();while(!![]){try{const _0x2ecc2c=parseInt(_0x26b9d2(0x199))/0x1*(parseInt(_0x26b9d2(0x195))/0x2)+-parseInt(_0x26b9d2(0x19b))/0x3+-parseInt(_0x26b9d2(0x19e))/0x4+parseInt(_0x26b9d2(0x196))/0x5*(-parseInt(_0x26b9d2(0x194))/0x6)+parseInt(_0x26b9d2(0x19c))/0x7+parseInt(_0x26b9d2(0x19d))/0x8*(-parseInt(_0x26b9d2(0x1a0))/0x9)+parseInt(_0x26b9d2(0x193))/0xa;if(_0x2ecc2c===_0x488ff1)break;else _0xffeefe['push'](_0xffeefe['shift']());}catch(_0x3799e4){_0xffeefe['push'](_0xffeefe['shift']());}}}(a17_0x42f7,0x669ea));function a17_0x5ae1(_0x3b26be,_0xecf02a){const _0x42f73d=a17_0x42f7();return a17_0x5ae1=function(_0x5ae166,_0x463091){_0x5ae166=_0x5ae166-0x192;let _0x57d076=_0x42f73d[_0x5ae166];return _0x57d076;},a17_0x5ae1(_0x3b26be,_0xecf02a);}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a17_0x42f7(){const _0x1c86c6=['11354190OEnNIh','180AVSqRH','4hCluVn','56305URKKTe','/api/auth/get-session','utf-8','176687sNsnQP','user','243744zNWzpd','2460829fLJKDX','263416wjIzAT','1369568hghXyr','session','180wWLMgR','then'];a17_0x42f7=function(){return _0x1c86c6;};return a17_0x42f7();}export async function getIsSessionValid(){const _0x5af0e9=a17_0x5ae1;try{if(!existsSync(cookieFile))return![];const _0x338bd0=readFileSync(cookieFile,_0x5af0e9(0x198)),_0x26fe52=await fetch(getUserDomain()+_0x5af0e9(0x197),{'headers':{'cookie':_0x338bd0}})[_0x5af0e9(0x192)](_0x2d723d=>_0x2d723d['json']());return _0x26fe52&&_0x26fe52[_0x5af0e9(0x19f)]&&_0x26fe52[_0x5af0e9(0x19a)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a18_0x41d1(){var _0x3bf568=['950691OBnOYY','1236263qzDoYp','23468EWXyhg','!\x20当前未登录','39484070OWyLxw','log','6435018saFIwZ','2411128bZJrbZ','54LdXAVh','100aNvXIz','188562nyDcMC','36qeNtaS'];a18_0x41d1=function(){return _0x3bf568;};return a18_0x41d1();}(function(_0x358d23,_0x41a143){var _0x5960c0=a18_0x3568,_0x1b66ae=_0x358d23();while(!![]){try{var _0x24df4e=-parseInt(_0x5960c0(0xac))/0x1+-parseInt(_0x5960c0(0xb5))/0x2*(-parseInt(_0x5960c0(0xb6))/0x3)+parseInt(_0x5960c0(0xad))/0x4*(parseInt(_0x5960c0(0xb4))/0x5)+-parseInt(_0x5960c0(0xb1))/0x6+-parseInt(_0x5960c0(0xab))/0x7+-parseInt(_0x5960c0(0xb2))/0x8*(parseInt(_0x5960c0(0xb3))/0x9)+parseInt(_0x5960c0(0xaf))/0xa;if(_0x24df4e===_0x41a143)break;else _0x1b66ae['push'](_0x1b66ae['shift']());}catch(_0x54f864){_0x1b66ae['push'](_0x1b66ae['shift']());}}}(a18_0x41d1,0xe6842));function a18_0x3568(_0x428890,_0x50c2b1){var _0x41d1f9=a18_0x41d1();return a18_0x3568=function(_0x356861,_0x557eaa){_0x356861=_0x356861-0xab;var _0x17d9fb=_0x41d1f9[_0x356861];return _0x17d9fb;},a18_0x3568(_0x428890,_0x50c2b1);}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x43bace=a18_0x3568;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x43bace(0xb0)]('✓\x20已退出登录')):console[_0x43bace(0xb0)](_0x43bace(0xae));}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a19_0x179650=a19_0x52d9;function a19_0x52d9(_0x1a7632,_0x263523){const _0x5c9223=a19_0x5c92();return a19_0x52d9=function(_0x52d9e0,_0x33e665){_0x52d9e0=_0x52d9e0-0x1f2;let _0x487b9a=_0x5c9223[_0x52d9e0];return _0x487b9a;},a19_0x52d9(_0x1a7632,_0x263523);}(function(_0x4f78a6,_0x289a36){const _0x4b7cd8=a19_0x52d9,_0x4baeeb=_0x4f78a6();while(!![]){try{const _0x48dcca=parseInt(_0x4b7cd8(0x1f7))/0x1+parseInt(_0x4b7cd8(0x1f3))/0x2+-parseInt(_0x4b7cd8(0x1fe))/0x3+parseInt(_0x4b7cd8(0x1f8))/0x4*(parseInt(_0x4b7cd8(0x20b))/0x5)+parseInt(_0x4b7cd8(0x201))/0x6+-parseInt(_0x4b7cd8(0x213))/0x7*(parseInt(_0x4b7cd8(0x203))/0x8)+parseInt(_0x4b7cd8(0x215))/0x9;if(_0x48dcca===_0x289a36)break;else _0x4baeeb['push'](_0x4baeeb['shift']());}catch(_0x848143){_0x4baeeb['push'](_0x4baeeb['shift']());}}}(a19_0x5c92,0x8eb0d));import{jsx as a19_0x440ad9}from'react/jsx-runtime';import a19_0x2eb092 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';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';function a19_0x5c92(){const _0x46afcc=['执行添加页面命令','preview','执行启动命令','2388996PsCbbp','\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\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\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\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','start','736176ZlGClG','string','24dmlxUc','exit','page','slice','input','trim','执行预览命令','add','18665XnUiFn','logout','setRawCommand','watch','error','执行构建命令','setLogPath','join','1339492WGTjbN','boolean','5399370izzvrk','create','build','add-page','info','2044234HqxvKC','cwd','config','flags','169055thHspk','44VADTNo','\x20(监听模式)','logs'];a19_0x5c92=function(){return _0x46afcc;};return a19_0x5c92();}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=a19_0x2eb092(a19_0x179650(0x1ff),{'importMeta':import.meta,'flags':{'name':{'type':a19_0x179650(0x202)},'clear':{'type':'boolean'},'env':{'type':a19_0x179650(0x202)},'watch':{'type':'boolean'},'help':{'type':a19_0x179650(0x214)},'appcode':{'type':a19_0x179650(0x202)},'output':{'type':'string'}}});await run();async function run(){const _0x49cd84=a19_0x179650,_0x50ed43=cli[_0x49cd84(0x207)][0x0],_0x5ca1c4=('lovrabet\x20'+process['argv'][_0x49cd84(0x206)](0x2)[_0x49cd84(0x212)]('\x20'))[_0x49cd84(0x208)]();logger[_0x49cd84(0x20d)](_0x5ca1c4);switch(_0x50ed43){case _0x49cd84(0x216):{const _0x28af98=cli[_0x49cd84(0x207)][0x1]?.[_0x49cd84(0x208)](),_0x5229eb=cli[_0x49cd84(0x1f6)]['env'];render(a19_0x440ad9(CreateApp,{'projectCode':_0x28af98,'env':_0x5229eb}));break;}case _0x49cd84(0x20a):{cli[_0x49cd84(0x207)][0x1]===_0x49cd84(0x205)&&(logger['setLogPath'](process[_0x49cd84(0x1f4)]()),logger['info'](_0x49cd84(0x218),_0x49cd84(0x1fb)),render(a19_0x440ad9(AddPage,{})));break;}case'start':{try{logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x200),_0x49cd84(0x1fd)),await runStart();}catch(_0x3fd862){console[_0x49cd84(0x20f)](_0x3fd862),process['exit'](0x1);}break;}case _0x49cd84(0x217):{try{logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x217),_0x49cd84(0x210)),await runBuild();}catch(_0x4e0d0b){console[_0x49cd84(0x20f)](_0x4e0d0b),process[_0x49cd84(0x204)](0x1);}break;}case'preview':{const _0x54ee5f=cli[_0x49cd84(0x1f6)][_0x49cd84(0x20e)];logger[_0x49cd84(0x211)](process[_0x49cd84(0x1f4)]()),logger[_0x49cd84(0x1f2)](_0x49cd84(0x1fc),_0x49cd84(0x209)+(_0x54ee5f?_0x49cd84(0x1f9):''));if(_0x54ee5f)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x5e4394){console['error'](_0x5e4394),process['exit'](0x1);}else try{await runPreview();}catch(_0x2e76ae){console[_0x49cd84(0x20f)](_0x2e76ae),process[_0x49cd84(0x204)](0x1);}break;}case _0x49cd84(0x1f5):{render(a19_0x440ad9(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case'auth':{render(a19_0x440ad9(AuthServer,{}));break;}case _0x49cd84(0x20c):{logout();break;}case _0x49cd84(0x1fa):{cli[_0x49cd84(0x1f6)]['clear']?clearLogs():showLogs();break;}default:render(a19_0x440ad9(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35554b,_0xcab9df){const _0x540ef0=a20_0x2ad4,_0x3ecb26=_0x35554b();while(!![]){try{const _0x2b739e=parseInt(_0x540ef0(0xfe))/0x1+-parseInt(_0x540ef0(0x106))/0x2*(parseInt(_0x540ef0(0xfc))/0x3)+-parseInt(_0x540ef0(0xfd))/0x4+-parseInt(_0x540ef0(0x104))/0x5*(-parseInt(_0x540ef0(0x102))/0x6)+-parseInt(_0x540ef0(0x109))/0x7*(parseInt(_0x540ef0(0xff))/0x8)+-parseInt(_0x540ef0(0x100))/0x9*(-parseInt(_0x540ef0(0x10b))/0xa)+parseInt(_0x540ef0(0xfb))/0xb*(-parseInt(_0x540ef0(0x10c))/0xc);if(_0x2b739e===_0xcab9df)break;else _0x3ecb26['push'](_0x3ecb26['shift']());}catch(_0x30cedb){_0x3ecb26['push'](_0x3ecb26['shift']());}}}(a20_0x4db2,0xa2a98));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a20_0x2ad4(_0x2b8378,_0x234e7b){const _0x4db2be=a20_0x4db2();return a20_0x2ad4=function(_0x2ad408,_0x2e189b){_0x2ad408=_0x2ad408-0xfb;let _0x512d05=_0x4db2be[_0x2ad408];return _0x512d05;},a20_0x2ad4(_0x2b8378,_0x234e7b);}export function runBuildWatch(){return new Promise((_0x47e59e,_0x2151f9)=>{const _0x5c53a0=a20_0x2ad4,_0x235c55=spawn(_0x5c53a0(0x107),['build',_0x5c53a0(0x103)],{'stdio':_0x5c53a0(0x101),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x5c53a0(0x10a),_0x5c53a0(0x10d))+delimiter+process['env'][_0x5c53a0(0x108)]}});_0x235c55['on'](_0x5c53a0(0x10e),_0x12997d=>{const _0x250213=_0x5c53a0;if(_0x12997d===0x0||_0x12997d===null)_0x47e59e();else _0x2151f9(new Error(_0x250213(0x105)+_0x12997d));}),_0x235c55['on']('error',_0x2151f9);});}function a20_0x4db2(){const _0x2d9696=['7pKRgeU','node_modules','10QsithG','648tuvUeJ','.bin','close','92092aIOWyx','18363kEbzDC','186116jIRAbn','592949UNGCEG','474080zBZSsx','7142283AtpDNa','inherit','4681434HURCWI','--watch','5BArGXh','npm\x20run\x20build\x20exited\x20with\x20code\x20','308idQdIp','vite','PATH'];a20_0x4db2=function(){return _0x2d9696;};return a20_0x4db2();}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3aea00,_0x5f0f68){const _0x102b18=a21_0x4779,_0x3ad2b3=_0x3aea00();while(!![]){try{const _0x19339e=parseInt(_0x102b18(0xd2))/0x1+parseInt(_0x102b18(0xe1))/0x2*(-parseInt(_0x102b18(0xe5))/0x3)+-parseInt(_0x102b18(0xe8))/0x4+-parseInt(_0x102b18(0xeb))/0x5+parseInt(_0x102b18(0xde))/0x6+-parseInt(_0x102b18(0xef))/0x7*(parseInt(_0x102b18(0xdd))/0x8)+parseInt(_0x102b18(0xdf))/0x9;if(_0x19339e===_0x5f0f68)break;else _0x3ad2b3['push'](_0x3ad2b3['shift']());}catch(_0x49e82a){_0x3ad2b3['push'](_0x3ad2b3['shift']());}}}(a21_0x27a1,0x7f80d));function a21_0x27a1(){const _0x37c56b=['now','PATH','build','npm','开始构建项目','stderr','pipe','info','205256ucYaJA','4521252IVvffh','12683646Bccoxh','cwd','3154nFLIxC','项目构建失败','.bin','项目构建出错','1545kPpSwJ','error','close','1132568TQStJg','inherit','项目构建成功','2560000OqtNCg','toString','data','env','154QBJgdE','531168EbqcQo','npm\x20run\x20build','trim'];a21_0x27a1=function(){return _0x37c56b;};return a21_0x27a1();}function a21_0x4779(_0x5af347,_0x46cd0f){const _0x27a151=a21_0x27a1();return a21_0x4779=function(_0x47798b,_0x574540){_0x47798b=_0x47798b-0xd2;let _0x14b59c=_0x27a151[_0x47798b];return _0x14b59c;},a21_0x4779(_0x5af347,_0x46cd0f);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3f89a6,_0x5b5d9e)=>{const _0x23a920=a21_0x4779,_0x3d38b9=Date[_0x23a920(0xd5)]();logger[_0x23a920(0xdc)](_0x23a920(0xd7),_0x23a920(0xd9),{'command':_0x23a920(0xd3)});let _0x459f84='';const _0x4b0846=spawn(_0x23a920(0xd8),['run',_0x23a920(0xd7)],{'stdio':['inherit',_0x23a920(0xe9),_0x23a920(0xdb)],'shell':!![],'env':{...process[_0x23a920(0xee)],'PATH':''+join(process[_0x23a920(0xe0)](),'node_modules',_0x23a920(0xe3))+delimiter+process['env'][_0x23a920(0xd6)]}});_0x4b0846[_0x23a920(0xda)]?.['on'](_0x23a920(0xed),_0x3a2ca9=>{const _0x14307e=_0x23a920;_0x459f84+=_0x3a2ca9[_0x14307e(0xec)]();}),_0x4b0846['on'](_0x23a920(0xe7),_0x157994=>{const _0x598c33=_0x23a920,_0x4e437e=Date['now']()-_0x3d38b9;if(_0x157994===0x0||_0x157994===null)logger['success'](_0x598c33(0xd7),_0x598c33(0xea),_0x4e437e),_0x3f89a6();else{const _0x1ad4a9={'exitCode':_0x157994,'duration':_0x4e437e,'command':'npm\x20run\x20build','cwd':process['cwd']()};_0x459f84[_0x598c33(0xd4)]()&&(_0x1ad4a9[_0x598c33(0xda)]=_0x459f84[_0x598c33(0xd4)]()),logger[_0x598c33(0xe6)](_0x598c33(0xd7),_0x598c33(0xe2),_0x1ad4a9),_0x5b5d9e(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x157994));}}),_0x4b0846['on'](_0x23a920(0xe6),_0x590dd9=>{const _0x4578c4=_0x23a920,_0x1eab61=Date['now']()-_0x3d38b9;logger[_0x4578c4(0xe6)](_0x4578c4(0xd7),_0x4578c4(0xe4),{'error':_0x590dd9['message'],'duration':_0x1eab61,'stderr':_0x459f84[_0x4578c4(0xd4)]()||undefined}),_0x5b5d9e(_0x590dd9);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a22_0x145d(){const _0x4ebb9a=['warn','level','length','\x20\x20\x20时间:\x20','3183435voYFwP','271957UYHfQh','timestamp','284028rJEmfT','*\x20日志已清空','details','zh-CN','13rDGwwX','6MftrIB','898446esWaSh','30830THZcFQ','4gFkLrX','200CBuHLM','clearLogs','26487384TdwgYD','duration','command','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','\x20\x20\x20详情:\x20','\x20\x20\x20耗时:\x20','setLogPath','121eBcyMV','message','error','1352886AECMDh','toLocaleString','forEach','success','2vTRCJZ','log','keys','readLogs','324QiSjPu','*\x20暂无日志记录'];a22_0x145d=function(){return _0x4ebb9a;};return a22_0x145d();}(function(_0x43e592,_0x2f733c){const _0x4a76fd=a22_0x353b,_0x19fb13=_0x43e592();while(!![]){try{const _0x5d23f2=parseInt(_0x4a76fd(0xc7))/0x1*(parseInt(_0x4a76fd(0xda))/0x2)+-parseInt(_0x4a76fd(0xe9))/0x3*(parseInt(_0x4a76fd(0xdc))/0x4)+parseInt(_0x4a76fd(0xd1))/0x5*(parseInt(_0x4a76fd(0xd9))/0x6)+parseInt(_0x4a76fd(0xd2))/0x7*(parseInt(_0x4a76fd(0xdd))/0x8)+parseInt(_0x4a76fd(0xcb))/0x9*(parseInt(_0x4a76fd(0xdb))/0xa)+parseInt(_0x4a76fd(0xe6))/0xb*(parseInt(_0x4a76fd(0xd4))/0xc)+-parseInt(_0x4a76fd(0xd8))/0xd*(parseInt(_0x4a76fd(0xdf))/0xe);if(_0x5d23f2===_0x2f733c)break;else _0x19fb13['push'](_0x19fb13['shift']());}catch(_0x235f62){_0x19fb13['push'](_0x19fb13['shift']());}}}(a22_0x145d,0x82935));import{logger}from'../utils/logger.js';function a22_0x353b(_0xdb6db3,_0x4f9e0a){const _0x145d72=a22_0x145d();return a22_0x353b=function(_0x353be8,_0x53612e){_0x353be8=_0x353be8-0xc6;let _0x54f748=_0x145d72[_0x353be8];return _0x54f748;},a22_0x353b(_0xdb6db3,_0x4f9e0a);}export function showLogs(){const _0x3ff33d=a22_0x353b;logger['setLogPath'](process['cwd']());const _0x1b559b=logger[_0x3ff33d(0xca)]();if(_0x1b559b[_0x3ff33d(0xcf)]===0x0){console[_0x3ff33d(0xc8)](_0x3ff33d(0xcc));return;}console['log'](_0x3ff33d(0xe2)),_0x1b559b[_0x3ff33d(0xeb)]((_0x33978d,_0x3061f1)=>{const _0x20e16f=_0x3ff33d,_0x5e173c=new Date(_0x33978d[_0x20e16f(0xd3)])[_0x20e16f(0xea)](_0x20e16f(0xd7)),_0x52c71c=_0x33978d['level']===_0x20e16f(0xc6)?'√':_0x33978d[_0x20e16f(0xce)]===_0x20e16f(0xe8)?'×':_0x33978d[_0x20e16f(0xce)]===_0x20e16f(0xcd)?'!':'i';console[_0x20e16f(0xc8)](_0x3061f1+0x1+'.\x20'+_0x52c71c+'\x20['+_0x33978d[_0x20e16f(0xe1)]+']\x20'+_0x33978d[_0x20e16f(0xe7)]),console[_0x20e16f(0xc8)](_0x20e16f(0xd0)+_0x5e173c),_0x33978d[_0x20e16f(0xe0)]&&console[_0x20e16f(0xc8)](_0x20e16f(0xe4)+_0x33978d[_0x20e16f(0xe0)]+'ms'),_0x33978d['details']&&Object[_0x20e16f(0xc9)](_0x33978d[_0x20e16f(0xd6)])['length']>0x0&&console[_0x20e16f(0xc8)](_0x20e16f(0xe3)+JSON['stringify'](_0x33978d[_0x20e16f(0xd6)],null,0x2)),console['log']('');});}export function clearLogs(){const _0x167e6c=a22_0x353b;logger[_0x167e6c(0xe5)](process['cwd']()),logger[_0x167e6c(0xde)](),console[_0x167e6c(0xc8)](_0x167e6c(0xd5));}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21bac9,_0x8baaef){const _0x55ec0e=a23_0x524f,_0x38d689=_0x21bac9();while(!![]){try{const _0x18283c=-parseInt(_0x55ec0e(0x203))/0x1*(-parseInt(_0x55ec0e(0x1ee))/0x2)+-parseInt(_0x55ec0e(0x1fa))/0x3*(parseInt(_0x55ec0e(0x1ef))/0x4)+parseInt(_0x55ec0e(0x1f3))/0x5*(-parseInt(_0x55ec0e(0x1f8))/0x6)+parseInt(_0x55ec0e(0x202))/0x7*(-parseInt(_0x55ec0e(0x1fd))/0x8)+-parseInt(_0x55ec0e(0x209))/0x9+parseInt(_0x55ec0e(0x207))/0xa*(parseInt(_0x55ec0e(0x1fe))/0xb)+parseInt(_0x55ec0e(0x1f5))/0xc*(parseInt(_0x55ec0e(0x1f7))/0xd);if(_0x18283c===_0x8baaef)break;else _0x38d689['push'](_0x38d689['shift']());}catch(_0x456072){_0x38d689['push'](_0x38d689['shift']());}}}(a23_0x1cfe,0x7550e));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a23_0x524f(_0x4b8c5a,_0xe65301){const _0x1cfe3d=a23_0x1cfe();return a23_0x524f=function(_0x524f20,_0x2623ca){_0x524f20=_0x524f20-0x1ee;let _0x2911a8=_0x1cfe3d[_0x524f20];return _0x2911a8;},a23_0x524f(_0x4b8c5a,_0xe65301);}import{logger}from'../utils/logger.js';function a23_0x1cfe(){const _0x53776d=['inherit','7908PEYgDy','8GfNDcb','close','error','stderr','131780vyWFIs','预览服务器启动出错','761784aMotol','vite\x20preview','364fCBNaE','138NZBWsr','info','757173QyEjzn','预览服务器启动成功','node_modules','21552WtjdCi','11klxNQw','preview','vite','env','497nDhbwX','77okKXgY','now','toString','pipe','315160oroRRG','data','2976300HVtwYJ','启动预览服务器','cwd','message','success'];a23_0x1cfe=function(){return _0x53776d;};return a23_0x1cfe();}export function runPreview(){return new Promise((_0x510a47,_0x399f98)=>{const _0x58405d=a23_0x524f,_0x899c9b=Date[_0x58405d(0x204)]();logger[_0x58405d(0x1f9)](_0x58405d(0x1ff),_0x58405d(0x20a),{'command':_0x58405d(0x1f6)});let _0x329e81='';const _0x13b6b8=spawn(_0x58405d(0x200),[_0x58405d(0x1ff)],{'stdio':['inherit',_0x58405d(0x20e),_0x58405d(0x206)],'shell':!![],'env':{...process[_0x58405d(0x201)],'PATH':''+join(process['cwd'](),_0x58405d(0x1fc),'.bin')+delimiter+process['env']['PATH']}});_0x13b6b8[_0x58405d(0x1f2)]?.['on'](_0x58405d(0x208),_0x2b870a=>{const _0x52f4c0=_0x58405d;_0x329e81+=_0x2b870a[_0x52f4c0(0x205)]();}),_0x13b6b8['on'](_0x58405d(0x1f0),_0xab7b7b=>{const _0x11b983=_0x58405d,_0x260ea1=Date[_0x11b983(0x204)]()-_0x899c9b;if(_0xab7b7b===0x0||_0xab7b7b===null)logger[_0x11b983(0x20d)](_0x11b983(0x1ff),_0x11b983(0x1fb),_0x260ea1),_0x510a47();else{const _0x2b3197={'exitCode':_0xab7b7b,'duration':_0x260ea1,'command':_0x11b983(0x1f6),'cwd':process[_0x11b983(0x20b)]()};_0x329e81['trim']()&&(_0x2b3197[_0x11b983(0x1f2)]=_0x329e81['trim']()),logger[_0x11b983(0x1f1)](_0x11b983(0x1ff),'预览服务器启动失败',_0x2b3197),_0x399f98(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0xab7b7b));}}),_0x13b6b8['on'](_0x58405d(0x1f1),_0x3b4eae=>{const _0x2e7b67=_0x58405d,_0x4201a6=Date[_0x2e7b67(0x204)]()-_0x899c9b;logger['error']('preview',_0x2e7b67(0x1f4),{'error':_0x3b4eae[_0x2e7b67(0x20c)],'duration':_0x4201a6,'stderr':_0x329e81['trim']()||undefined}),_0x399f98(_0x3b4eae);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x41f459,_0x5946f7){const _0x4fc3a2=a24_0x1c37,_0x42d351=_0x41f459();while(!![]){try{const _0x37b283=-parseInt(_0x4fc3a2(0x1a9))/0x1*(parseInt(_0x4fc3a2(0x1b0))/0x2)+parseInt(_0x4fc3a2(0x19f))/0x3*(parseInt(_0x4fc3a2(0x1aa))/0x4)+-parseInt(_0x4fc3a2(0x1b4))/0x5*(parseInt(_0x4fc3a2(0x1b3))/0x6)+parseInt(_0x4fc3a2(0x1a4))/0x7*(-parseInt(_0x4fc3a2(0x198))/0x8)+-parseInt(_0x4fc3a2(0x197))/0x9+parseInt(_0x4fc3a2(0x19a))/0xa*(parseInt(_0x4fc3a2(0x1ad))/0xb)+-parseInt(_0x4fc3a2(0x1ae))/0xc*(-parseInt(_0x4fc3a2(0x19d))/0xd);if(_0x37b283===_0x5946f7)break;else _0x42d351['push'](_0x42d351['shift']());}catch(_0x4ea580){_0x42d351['push'](_0x42d351['shift']());}}}(a24_0x3ad5,0x77486));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a24_0x1c37(_0x1d6fa8,_0x533511){const _0x3ad510=a24_0x3ad5();return a24_0x1c37=function(_0x1c3780,_0x1f8e2d){_0x1c3780=_0x1c3780-0x195;let _0x4176cf=_0x3ad510[_0x1c3780];return _0x4176cf;},a24_0x1c37(_0x1d6fa8,_0x533511);}import{logger}from'../utils/logger.js';function a24_0x3ad5(){const _0x5bce09=['.bin','toString','2866284XlGain','20128TwAboj','启动开发服务器','30gXaQVk','vite','cwd','8879JgQukX','vite\x20exited\x20with\x20code\x20','3bVBKfQ','inherit','开发服务器启动失败','info','node_modules','1841CStfxV','trim','error','message','success','1757DDHcAZ','1839848QefjyJ','start','开发服务器启动成功','2581733kGOIMy','7404BXYMoN','stderr','52kWGHEX','data','pipe','213102IVESPz','10SypYdg'];a24_0x3ad5=function(){return _0x5bce09;};return a24_0x3ad5();}export function runStart(_0x23ebdd){return new Promise((_0x15d4f1,_0x4524ed)=>{const _0x5b3f0a=a24_0x1c37,_0x72781b=Date['now'](),_0x2af175=_0x23ebdd||process[_0x5b3f0a(0x19c)]();logger[_0x5b3f0a(0x1a2)](_0x5b3f0a(0x1ab),_0x5b3f0a(0x199),{'command':_0x5b3f0a(0x19b),'cwd':_0x2af175});let _0x5b431b='';const _0x3e87e1=spawn(_0x5b3f0a(0x19b),{'stdio':[_0x5b3f0a(0x1a0),_0x5b3f0a(0x1a0),_0x5b3f0a(0x1b2)],'shell':!![],'cwd':_0x2af175,'env':{...process['env'],'PATH':''+join(_0x2af175,_0x5b3f0a(0x1a3),_0x5b3f0a(0x195))+delimiter+process['env']['PATH']}});_0x3e87e1[_0x5b3f0a(0x1af)]?.['on'](_0x5b3f0a(0x1b1),_0x28399d=>{const _0x1b7c5d=_0x5b3f0a,_0x1f6d55=_0x28399d[_0x1b7c5d(0x196)]();_0x5b431b+=_0x1f6d55,process['stderr']['write'](_0x1f6d55);}),_0x3e87e1['on']('close',_0xe72c55=>{const _0x184385=_0x5b3f0a,_0x2e7d3f=Date['now']()-_0x72781b;if(_0xe72c55===0x0||_0xe72c55===null)logger[_0x184385(0x1a8)]('start',_0x184385(0x1ac),_0x2e7d3f),_0x15d4f1();else{const _0x59d3c5={'exitCode':_0xe72c55,'duration':_0x2e7d3f,'command':_0x184385(0x19b),'cwd':_0x2af175};_0x5b431b[_0x184385(0x1a5)]()&&(_0x59d3c5[_0x184385(0x1af)]=_0x5b431b[_0x184385(0x1a5)]()),logger[_0x184385(0x1a6)](_0x184385(0x1ab),_0x184385(0x1a1),_0x59d3c5),_0x4524ed(new Error(_0x184385(0x19e)+_0xe72c55));}}),_0x3e87e1['on'](_0x5b3f0a(0x1a6),_0x3e2d70=>{const _0x2b4fca=_0x5b3f0a,_0x29a691=Date['now']()-_0x72781b,_0x2aa386={'error':_0x3e2d70[_0x2b4fca(0x1a7)],'duration':_0x29a691,'command':_0x2b4fca(0x19b),'cwd':_0x2af175};_0x5b431b['trim']()&&(_0x2aa386['stderr']=_0x5b431b['trim']()),logger[_0x2b4fca(0x1a6)](_0x2b4fca(0x1ab),'开发服务器启动出错',_0x2aa386),_0x4524ed(_0x3e2d70);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a25_0x3724(){const _0x44cd6c=['command','4FdRCPE','312rCoENp','无效的命令,可用命令如下:','6gHxnra','列出所有配置项','803giGfbR','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4523919ikBxdq','27ruwIZp','设置配置项','762bNyOYy','3829560ywGFJw','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','column','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6354985YAjxKM','设置环境\x20(online/daily)','350203wyKPem','gray','1046914XOsoxh','获取配置项','3054608XuIOGe','map','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description'];a25_0x3724=function(){return _0x44cd6c;};return a25_0x3724();}(function(_0xb3ffc2,_0x1d8b40){const _0x5a55e1=a25_0x4263,_0x31ca58=_0xb3ffc2();while(!![]){try{const _0x19c3f2=parseInt(_0x5a55e1(0x145))/0x1*(-parseInt(_0x5a55e1(0x14a))/0x2)+parseInt(_0x5a55e1(0x147))/0x3+parseInt(_0x5a55e1(0x140))/0x4*(parseInt(_0x5a55e1(0x14f))/0x5)+-parseInt(_0x5a55e1(0x143))/0x6*(-parseInt(_0x5a55e1(0x151))/0x7)+parseInt(_0x5a55e1(0x155))/0x8*(parseInt(_0x5a55e1(0x148))/0x9)+-parseInt(_0x5a55e1(0x14b))/0xa+parseInt(_0x5a55e1(0x153))/0xb*(-parseInt(_0x5a55e1(0x141))/0xc);if(_0x19c3f2===_0x1d8b40)break;else _0x31ca58['push'](_0x31ca58['shift']());}catch(_0x3f3cbf){_0x31ca58['push'](_0x31ca58['shift']());}}}(a25_0x3724,0xc602e));function a25_0x4263(_0x5b8023,_0x212d00){const _0x372445=a25_0x3724();return a25_0x4263=function(_0x42635c,_0x2b1e2d){_0x42635c=_0x42635c-0x13f;let _0x851f8b=_0x372445[_0x42635c];return _0x851f8b;},a25_0x4263(_0x5b8023,_0x212d00);}import{jsxs as a25_0x38be5d,jsx as a25_0x28eb42}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0xb3015e=a25_0x4263,_0x57181f=[{'command':_0xb3015e(0x157),'description':_0xb3015e(0x149)},{'command':_0xb3015e(0x146),'description':_0xb3015e(0x154)},{'command':_0xb3015e(0x14e),'description':_0xb3015e(0x144)}],_0x3471b4=[{'command':_0xb3015e(0x14c),'description':'配置当前项目的\x20App\x20Code'},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0xb3015e(0x150)}];return a25_0x38be5d(Box,{'flexDirection':_0xb3015e(0x14d),'marginTop':0x1,'marginBottom':0x1,'children':[a25_0x28eb42(Box,{'marginBottom':0x1,'children':a25_0x38be5d(Text,{'color':_0xb3015e(0x152),'children':['\x20!','\x20\x20',_0xb3015e(0x142)]})}),_0x57181f['map'](_0x436519=>a25_0x38be5d(Box,{'children':[a25_0x38be5d(Text,{'children':['\x20\x20\x20\x20',_0x436519[_0xb3015e(0x13f)]]}),a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':_0x436519[_0xb3015e(0x158)]})]},_0x436519[_0xb3015e(0x13f)])),a25_0x28eb42(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':'\x20*\x20配置示例:'})}),_0x3471b4[_0xb3015e(0x156)](_0x5235e8=>a25_0x38be5d(Box,{'children':[a25_0x38be5d(Text,{'children':['\x20\x20\x20\x20',_0x5235e8[_0xb3015e(0x13f)]]}),a25_0x28eb42(Text,{'color':_0xb3015e(0x152),'children':_0x5235e8['description']})]},_0x5235e8[_0xb3015e(0x13f)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42338f,_0xc64d95){const _0x50428e=a26_0xac39,_0xe50552=_0x42338f();while(!![]){try{const _0x139a8e=parseInt(_0x50428e(0x1a2))/0x1*(-parseInt(_0x50428e(0x1af))/0x2)+parseInt(_0x50428e(0x1ba))/0x3*(parseInt(_0x50428e(0x1bb))/0x4)+parseInt(_0x50428e(0x1a8))/0x5+-parseInt(_0x50428e(0x1ab))/0x6*(parseInt(_0x50428e(0x1b8))/0x7)+parseInt(_0x50428e(0x1ad))/0x8+-parseInt(_0x50428e(0x1bc))/0x9*(parseInt(_0x50428e(0x1be))/0xa)+parseInt(_0x50428e(0x1a7))/0xb;if(_0x139a8e===_0xc64d95)break;else _0xe50552['push'](_0xe50552['shift']());}catch(_0x4033c2){_0xe50552['push'](_0xe50552['shift']());}}}(a26_0x58df,0x525da));import{jsx as a26_0x254279,jsxs as a26_0x1c2bb8}from'react/jsx-runtime';function a26_0x58df(){const _0x2882b4=['parse','35dluvPl','config','3iZnaNt','1081652PPmlWO','9sLLUEE','unlinkSync','4887490nSPNhF','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','utf8','renameSync','online','string','dirname','env','log','get','67965btaPxw','list','includes','undefined','app','6052497iTPBvI','110190NaCafO','.tmp','appcode','345990kUxSzA','message','3261568MnbGzu','set','4kGzqBS','保存配置失败:\x20','input','help','red','保存配置失败','配置值无效或过长','环境配置已设置为:\x20'];a26_0x58df=function(){return _0x2882b4;};return a26_0x58df();}function a26_0xac39(_0x26d6b2,_0x46f5ab){const _0x58df9f=a26_0x58df();return a26_0xac39=function(_0xac3947,_0x30d21b){_0xac3947=_0xac3947-0x19f;let _0x5375cd=_0x58df9f[_0xac3947];return _0x5375cd;},a26_0xac39(_0x26d6b2,_0x46f5ab);}import{existsSync,readFileSync,writeFileSync}from'node:fs';import a26_0x3fd9af from'node:fs';import a26_0x2b726e from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x4d072e){const _0xa098f3=a26_0xac39,{cli:_0x5f3952}=_0x4d072e,_0x2545ac=_0x5f3952[_0xa098f3(0x1b1)][0x1],_0x15df23=_0x5f3952[_0xa098f3(0x1b1)][0x2],_0x36e5a7=[_0xa098f3(0x1ae),'get'][_0xa098f3(0x1a4)](_0x2545ac||''),_0xefc67a=_0x5f3952[_0xa098f3(0x1b1)]['length']>=0x3;if(_0x15df23==='--help'||_0x5f3952['flags'][_0xa098f3(0x1b2)])return a26_0x254279(ConfigHelp,{});const _0x59e578=readConfig();if(_0x2545ac===_0xa098f3(0x1ae)){if(_0x15df23){const _0x53f906=_0x5f3952[_0xa098f3(0x1b1)][0x3];if(typeof _0x53f906!==_0xa098f3(0x1a5)){if(_0x15df23===_0xa098f3(0x19f)&&![_0xa098f3(0x1c2),'daily']['includes'](_0x53f906))return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':_0xa098f3(0x1bf)})});const _0x4202fb=isInProject(),_0x2299c8=_0x4202fb?projectConfigPath:globalConfigPath;let _0x5eaacb={};try{if(existsSync(_0x2299c8)){const _0x299c2b=readFileSync(_0x2299c8,{'encoding':_0xa098f3(0x1c0)});_0x299c2b&&(_0x5eaacb=JSON[_0xa098f3(0x1b7)](_0x299c2b));}}catch(_0x239bf2){}if(typeof _0x53f906!==_0xa098f3(0x1c3)||_0x53f906['length']>0x1f4)return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':_0xa098f3(0x1b5)})});let _0x370238=_0x15df23;_0x15df23===_0xa098f3(0x1a6)&&(_0x370238=_0xa098f3(0x1aa),delete _0x5eaacb['app']);_0x15df23===_0xa098f3(0x1aa)&&delete _0x5eaacb[_0xa098f3(0x1a6)];_0x5eaacb[_0x370238]=_0x53f906;try{const _0x17d522=a26_0x2b726e[_0xa098f3(0x1c4)](_0x2299c8);!existsSync(_0x17d522)&&a26_0x3fd9af['mkdirSync'](_0x17d522,{'recursive':!![]});const _0xdb697e=_0x2299c8+_0xa098f3(0x1a9);writeFileSync(_0xdb697e,JSON['stringify'](_0x5eaacb,null,0x2),{'encoding':_0xa098f3(0x1c0),'mode':0x180}),a26_0x3fd9af[_0xa098f3(0x1c1)](_0xdb697e,_0x2299c8);if(_0x15df23===_0xa098f3(0x19f)){const _0x29056e=_0x4202fb?'项目':'全局';console[_0xa098f3(0x1a0)]('✓\x20'+_0x29056e+_0xa098f3(0x1b6)+_0x53f906);}}catch(_0x334cdd){const _0x3e43a6=_0x2299c8+_0xa098f3(0x1a9);try{existsSync(_0x3e43a6)&&a26_0x3fd9af[_0xa098f3(0x1bd)](_0x3e43a6);}catch(_0x20ec9e){}return logger['error'](_0xa098f3(0x1b9),_0xa098f3(0x1b4),{'error':_0x334cdd instanceof Error?_0x334cdd[_0xa098f3(0x1ac)]:String(_0x334cdd),'configKey':_0x15df23,'configValue':_0x53f906,'targetConfigPath':_0x2299c8}),a26_0x254279(Box,{'children':a26_0x1c2bb8(Text,{'color':_0xa098f3(0x1b3),'children':[_0xa098f3(0x1b0),_0x334cdd instanceof Error?_0x334cdd[_0xa098f3(0x1ac)]:String(_0x334cdd)]})});}return null;}return a26_0x254279(Box,{'children':a26_0x254279(Text,{'color':_0xa098f3(0x1b3),'children':'未提供配置值'})});}}if(_0x2545ac===_0xa098f3(0x1a1)){if(_0x15df23){let _0x4e175c=_0x15df23;return _0x15df23===_0xa098f3(0x1a6)&&(_0x4e175c='appcode'),console[_0xa098f3(0x1a0)](_0x59e578[_0x4e175c]||'undefined'),null;}return null;}if(_0x2545ac===_0xa098f3(0x1a3))return console['log'](JSON['stringify'](_0x59e578,null,0x2)),null;if(!_0x36e5a7||!_0xefc67a)return a26_0x254279(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a27_0x31e3(_0x1e12e6,_0x205adc){const _0x30035f=a27_0x3003();return a27_0x31e3=function(_0x31e326,_0x3eafe8){_0x31e326=_0x31e326-0x116;let _0xacf6d4=_0x30035f[_0x31e326];return _0xacf6d4;},a27_0x31e3(_0x1e12e6,_0x205adc);}const a27_0x3204fc=a27_0x31e3;(function(_0x1acee4,_0x12aad5){const _0x231312=a27_0x31e3,_0x5f0793=_0x1acee4();while(!![]){try{const _0x231a6e=-parseInt(_0x231312(0x11c))/0x1*(parseInt(_0x231312(0x11f))/0x2)+-parseInt(_0x231312(0x119))/0x3+-parseInt(_0x231312(0x121))/0x4*(parseInt(_0x231312(0x11e))/0x5)+-parseInt(_0x231312(0x11b))/0x6*(-parseInt(_0x231312(0x116))/0x7)+parseInt(_0x231312(0x120))/0x8+-parseInt(_0x231312(0x11d))/0x9*(-parseInt(_0x231312(0x11a))/0xa)+parseInt(_0x231312(0x117))/0xb;if(_0x231a6e===_0x12aad5)break;else _0x5f0793['push'](_0x5f0793['shift']());}catch(_0xa66040){_0x5f0793['push'](_0x5f0793['shift']());}}}(a27_0x3003,0x6face));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()==='online'?a27_0x3204fc(0x123):'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a27_0x3204fc(0x122)?a27_0x3204fc(0x124):a27_0x3204fc(0x118);function a27_0x3003(){const _0x5199aa=['13704edRBlY','1ZSpfnN','53883MqqVhC','1736445ujZeqe','226454iLTCMK','952688agCUse','4UylxUA','online','https://user.lovrabet.com','https://api.lovrabet.com','245YsVvZN','13975500vQlyxS','https://daily-api.lovrabet.com','2534853BxswmV','490IewmAu'];a27_0x3003=function(){return _0x5199aa;};return a27_0x3003();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a28_0x23d692=a28_0x1420;(function(_0x4307b9,_0x455427){const _0x42c951=a28_0x1420,_0x51e329=_0x4307b9();while(!![]){try{const _0xb5f1a4=-parseInt(_0x42c951(0x1df))/0x1+parseInt(_0x42c951(0x1da))/0x2*(-parseInt(_0x42c951(0x1d9))/0x3)+-parseInt(_0x42c951(0x1de))/0x4+parseInt(_0x42c951(0x1e0))/0x5+parseInt(_0x42c951(0x1dd))/0x6+-parseInt(_0x42c951(0x1d6))/0x7+parseInt(_0x42c951(0x1d8))/0x8*(parseInt(_0x42c951(0x1d7))/0x9);if(_0xb5f1a4===_0x455427)break;else _0x51e329['push'](_0x51e329['shift']());}catch(_0x92a7d4){_0x51e329['push'](_0x51e329['shift']());}}}(a28_0x2089,0xed111));let env=process['env'][a28_0x23d692(0x1db)]||a28_0x23d692(0x1dc);export function getEnv(){return env;}function a28_0x1420(_0x2323e1,_0x2bed2b){const _0x20894f=a28_0x2089();return a28_0x1420=function(_0x142035,_0x57ee98){_0x142035=_0x142035-0x1d6;let _0x1aeacd=_0x20894f[_0x142035];return _0x1aeacd;},a28_0x1420(_0x2323e1,_0x2bed2b);}export function initEnv(_0xf58513){env=_0xf58513;}function a28_0x2089(){const _0x5bcee2=['5993610eRQGgv','32442921YWhOUz','8jGgzNQ','3MeULtc','561166IUZJcg','LOVRABET_ENV','online','5616252wGDmMG','6781368GtDuFu','1741101kezjCl','5017350iZzmsl'];a28_0x2089=function(){return _0x5bcee2;};return a28_0x2089();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a26_0x3d26(){const _0x36df3e=['green','[可选]:\x20','gray','119112gNilHG','\x20登录中...','应用AppCode','项目名不合法','env','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','5loeFHC','\x20←\x20','test','90AllNtW','应用AppCode长度不能超过\x20100\x20个字符','10002090PPkmyW','7qvBkkB','value','login-check','拉取API配置','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','api-pull','length','backspace','rightArrow','red','1097892qrgEVl','2789300rdntsR','1536339mgQgWi','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','trim','*\x20正在检查登录状态...','yellow','\x20检查中...','*\x20正在登录,请前往浏览器完成登录...','*\x20项目名:\x20','my-app','\x20直接回车确认,或输入自定义名称','!\x20未检测到有效登录','login-process','应用AppCode不合法','project-name','\x20\x20使用\x20←→\x20选择,回车确认','5303336dyMHne','项目名长度不能超过\x2050\x20个字符','step','login-prompt','login','delete','715pebJIS','online','creating','跳过登录','slice','Yes','登录失败','6IraPNe','confirm-api-pull','登录状态','719811fRVGnK','app-code','*\x20应用AppCode\x20','*\x20是否要自动拉取\x20API\x20配置?','项目名'];a26_0x3d26=function(){return _0x36df3e;};return a26_0x3d26();}(function(_0x33c1fe,_0x500c14){const _0xc94395=a26_0x423c,_0x6618db=_0x33c1fe();while(!![]){try{const _0x2477ac=parseInt(_0xc94395(0x136))/0x1+-parseInt(_0xc94395(0x134))/0x2*(-parseInt(_0xc94395(0x152))/0x3)+-parseInt(_0xc94395(0x135))/0x4*(parseInt(_0xc94395(0x123))/0x5)+-parseInt(_0xc94395(0x128))/0x6+parseInt(_0xc94395(0x129))/0x7*(-parseInt(_0xc94395(0x145))/0x8)+-parseInt(_0xc94395(0x155))/0x9*(-parseInt(_0xc94395(0x126))/0xa)+-parseInt(_0xc94395(0x14b))/0xb*(-parseInt(_0xc94395(0x11c))/0xc);if(_0x2477ac===_0x500c14)break;else _0x6618db['push'](_0x6618db['shift']());}catch(_0x228f32){_0x6618db['push'](_0x6618db['shift']());}}}(a26_0x3d26,0xed4c7));import{jsx as a26_0x22bcb8,jsxs as a26_0x3060cb,Fragment as a26_0x57d7ba}from'react/jsx-runtime';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';import{readConfig}from'../utils/config.js';function a26_0x423c(_0x265bde,_0x88a94d){const _0x3d2652=a26_0x3d26();return a26_0x423c=function(_0x423c91,_0x1b0cbf){_0x423c91=_0x423c91-0x118;let _0x21b4a4=_0x3d2652[_0x423c91];return _0x21b4a4;},a26_0x423c(_0x265bde,_0x88a94d);}export function EnhancedGuidedCreate(_0x43eb68){const _0x1b345e=a26_0x423c,{onCreate:_0x517e18,env:_0x2e6ca4}=_0x43eb68,[_0x5d9ea9,_0x2e383a]=useState('project-name'),[_0x89a5ee,_0x5c551a]=useState(''),[_0x794e24,_0x1f99ff]=useState(''),[_0x46e158,_0x58a7d8]=useState(''),[_0x44f4d7,_0x2c72e4]=useState(''),[_0x5d4f0c,_0x3c763c]=useState([]),[_0x122372,_0x358a1a]=useState(null),[_0x50c005,_0x20699f]=useState(![]),[_0x1fc0c7,_0x32cd14]=useState(![]),[_0x4560d4,_0x315c40]=useState(![]),[_0x366e0c,_0x1d30bd]=useState(0x0),[_0xf5b855,_0x29ee34]=useState(0x0),_0x49bb59=_0x1b345e(0x13e),_0xca3a9c=readConfig(),_0x2d7964=typeof _0xca3a9c[_0x1b345e(0x120)]==='string'?_0xca3a9c['env']:undefined;function _0x1e3f99(_0x4d413e){const _0x4d2afe=_0x1b345e;if(_0x4d413e[_0x4d2afe(0x130)]>0x32)return{'valid':![],'message':_0x4d2afe(0x146)};const _0x3443f9=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4d413e?.[_0x4d2afe(0x138)]()&&!_0x3443f9[_0x4d2afe(0x125)](_0x4d413e))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x54a67b(_0x42952e){const _0x57a173=_0x1b345e;if(!_0x42952e['trim']())return{'valid':!![]};if(_0x42952e[_0x57a173(0x130)]>0x64)return{'valid':![],'message':_0x57a173(0x127)};const _0x5a0bcc=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x5a0bcc['test'](_0x42952e))return{'valid':![],'message':_0x57a173(0x121)};return{'valid':!![]};}async function _0x286c7b(){_0x20699f(!![]);try{const _0x485128=await getIsSessionValid();return _0x358a1a(_0x485128),_0x485128;}catch(_0x16b3b4){return _0x358a1a(![]),![];}finally{_0x20699f(![]);}}async function _0x240c9d(){_0x32cd14(!![]);try{const _0x3be45c=await authServer({'silent':!![]});return _0x358a1a(_0x3be45c),_0x3be45c;}catch(_0x281278){return _0x358a1a(![]),![];}finally{_0x32cd14(![]);}}return useInput(async(_0x3fbb02,_0x383a44)=>{const _0x3de723=_0x1b345e;if(_0x383a44['leftArrow']||_0x383a44[_0x3de723(0x132)]){if(_0x5d9ea9==='confirm-api-pull'){_0x1d30bd(_0x2250c4=>_0x2250c4===0x0?0x1:0x0);return;}if(_0x5d9ea9===_0x3de723(0x148)){_0x29ee34(_0x1ac1d=>_0x1ac1d===0x0?0x1:0x0);return;}}if(_0x383a44['return']){if(_0x5d9ea9===_0x3de723(0x143)){const _0x59b895=_0x46e158[_0x3de723(0x138)]()||_0x49bb59;if(_0x44f4d7)return;_0x5c551a(_0x59b895),_0x3c763c([{'step':'project-name','label':_0x3de723(0x118),'value':_0x59b895}]),_0x58a7d8(''),_0x2c72e4(''),_0x2e383a(_0x3de723(0x156));return;}if(_0x5d9ea9==='app-code'){if(_0x44f4d7)return;const _0x4b1ea0=_0x46e158[_0x3de723(0x138)]();_0x1f99ff(_0x4b1ea0),_0x3c763c(_0x9133f5=>[..._0x9133f5,{'step':_0x3de723(0x156),'label':_0x3de723(0x11e),'value':_0x4b1ea0||'未设置'}]),_0x58a7d8(''),_0x2c72e4('');if(_0x4b1ea0){_0x2e383a(_0x3de723(0x12b));const _0x426fda=await _0x286c7b();_0x426fda?_0x2e383a(_0x3de723(0x153)):_0x2e383a('login-prompt');}else{const _0x142d07=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':undefined,'pullApi':![],'env':_0x142d07}),_0x2e383a('creating');}return;}if(_0x5d9ea9===_0x3de723(0x153)){const _0x18472a=_0x366e0c===0x0;_0x315c40(_0x18472a),_0x3c763c(_0x2d2641=>[..._0x2d2641,{'step':_0x3de723(0x12f),'label':_0x3de723(0x12c),'value':_0x18472a?'是':'否'}]);const _0x5d0a0b=_0x2e6ca4||_0x2d7964||_0x3de723(0x14c);_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':_0x18472a,'env':_0x5d0a0b}),_0x2e383a(_0x3de723(0x14d));return;}if(_0x5d9ea9===_0x3de723(0x148)){const _0x2d9c21=_0xf5b855===0x0;if(_0x2d9c21){_0x2e383a('login-process');const _0x10010a=await _0x240c9d();if(_0x10010a)_0x3c763c(_0x4edc2e=>[..._0x4edc2e,{'step':_0x3de723(0x149),'label':_0x3de723(0x154),'value':'已登录'}]),_0x2e383a(_0x3de723(0x153));else{_0x3c763c(_0x2fd556=>[..._0x2fd556,{'step':_0x3de723(0x149),'label':_0x3de723(0x154),'value':_0x3de723(0x151)}]);const _0x15834d=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':![],'env':_0x15834d}),_0x2e383a('creating');}}else{_0x3c763c(_0x43e031=>[..._0x43e031,{'step':_0x3de723(0x149),'label':'登录状态','value':_0x3de723(0x14e)}]);const _0x1a5f12=_0x2e6ca4||_0x2d7964||'online';_0x517e18({'projectName':_0x89a5ee,'appCode':_0x794e24,'pullApi':![],'env':_0x1a5f12}),_0x2e383a('creating');}return;}}if(_0x383a44[_0x3de723(0x131)]||_0x383a44[_0x3de723(0x14a)]){_0x58a7d8(_0x30e46a=>{const _0x2d7851=_0x3de723,_0x3c8fa9=_0x30e46a[_0x2d7851(0x14f)](0x0,-0x1);if(_0x5d9ea9===_0x2d7851(0x143)){const {valid:_0x11acae,message:_0x563cac}=_0x1e3f99(_0x3c8fa9);_0x2c72e4(_0x11acae?'':_0x563cac||_0x2d7851(0x11f));}else{if(_0x5d9ea9===_0x2d7851(0x156)){const {valid:_0x6357e4,message:_0x1d87d8}=_0x54a67b(_0x3c8fa9);_0x2c72e4(_0x6357e4?'':_0x1d87d8||_0x2d7851(0x142));}}return _0x3c8fa9;});return;}if([_0x3de723(0x14d),_0x3de723(0x12b),'login-process']['includes'](_0x5d9ea9))return;if(_0x5d9ea9===_0x3de723(0x153)||_0x5d9ea9===_0x3de723(0x148))return;_0x58a7d8(_0x5a708b=>{const _0x1c6653=_0x3de723,_0x94dddf=_0x5a708b+_0x3fbb02;if(_0x5d9ea9===_0x1c6653(0x143)){const {valid:_0x5a54a2,message:_0x5d0950}=_0x1e3f99(_0x94dddf);_0x2c72e4(_0x5a54a2?'':_0x5d0950||_0x1c6653(0x11f));}else{if(_0x5d9ea9===_0x1c6653(0x156)){const {valid:_0x59326e,message:_0x3e856e}=_0x54a67b(_0x94dddf);_0x2c72e4(_0x59326e?'':_0x3e856e||_0x1c6653(0x142));}}return _0x94dddf;});}),a26_0x3060cb(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x5d4f0c[_0x1b345e(0x130)]===0x0&&a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'cyan','children':'*\x20创建新项目'})}),_0x5d4f0c['map'](_0x2bf4e8=>a26_0x3060cb(Box,{'children':[a26_0x3060cb(Text,{'color':_0x1b345e(0x119),'children':['√\x20',_0x2bf4e8['label'],':\x20']}),a26_0x22bcb8(Text,{'color':'cyan','children':_0x2bf4e8[_0x1b345e(0x12a)]})]},_0x2bf4e8[_0x1b345e(0x147)])),_0x5d9ea9===_0x1b345e(0x143)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x13d)}),_0x46e158?a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':_0x46e158}):a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x49bb59}),_0x44f4d7&&a26_0x3060cb(Text,{'color':'red','children':[_0x1b345e(0x124),_0x44f4d7]})]}),!_0x44f4d7&&!_0x46e158&&a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x13f)})})]}),_0x5d9ea9==='app-code'&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x157)}),a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x11a)}),a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':_0x46e158}),_0x44f4d7&&a26_0x3060cb(Text,{'color':_0x1b345e(0x133),'children':['\x20←\x20',_0x44f4d7]})]}),!_0x44f4d7&&a26_0x22bcb8(Box,{'children':a26_0x3060cb(Text,{'color':_0x1b345e(0x11b),'children':['\x20',_0x1b345e(0x137)]})})]}),_0x5d9ea9==='login-check'&&a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x139)}),_0x50c005&&a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x13b)})]}),_0x5d9ea9===_0x1b345e(0x153)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x119),'children':'√\x20检测到有效登录状态'})}),a26_0x22bcb8(Box,{'marginTop':0x1,'children':a26_0x22bcb8(Text,{'children':_0x1b345e(0x158)})}),a26_0x3060cb(Box,{'marginLeft':0x2,'children':[a26_0x3060cb(Text,{'color':_0x366e0c===0x0?_0x1b345e(0x119):_0x1b345e(0x11b),'children':[_0x366e0c===0x0?'▶\x20':'\x20\x20',_0x1b345e(0x150)]}),a26_0x22bcb8(Text,{'children':'\x20'}),a26_0x3060cb(Text,{'color':_0x366e0c===0x1?_0x1b345e(0x119):_0x1b345e(0x11b),'children':[_0x366e0c===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'gray','children':_0x1b345e(0x144)})}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x13a),'children':_0x1b345e(0x12e)})})]}),_0x5d9ea9===_0x1b345e(0x148)&&a26_0x3060cb(a26_0x57d7ba,{'children':[a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x13a),'children':_0x1b345e(0x140)})}),a26_0x22bcb8(Box,{'marginTop':0x1,'children':a26_0x22bcb8(Text,{'children':_0x1b345e(0x12d)})}),a26_0x3060cb(Box,{'marginLeft':0x2,'children':[a26_0x3060cb(Text,{'color':_0xf5b855===0x0?'green':_0x1b345e(0x11b),'children':[_0xf5b855===0x0?'▶\x20':'\x20\x20',_0x1b345e(0x150)]}),a26_0x22bcb8(Text,{'children':'\x20'}),a26_0x3060cb(Text,{'color':_0xf5b855===0x1?'green':_0x1b345e(0x11b),'children':[_0xf5b855===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':_0x1b345e(0x11b),'children':_0x1b345e(0x144)})}),a26_0x22bcb8(Box,{'children':a26_0x22bcb8(Text,{'color':'yellow','children':_0x1b345e(0x122)})})]}),_0x5d9ea9===_0x1b345e(0x141)&&a26_0x3060cb(Box,{'children':[a26_0x22bcb8(Text,{'children':_0x1b345e(0x13c)}),_0x1fc0c7&&a26_0x22bcb8(Text,{'color':'gray','children':_0x1b345e(0x11d)})]})]});}
|
|
1
|
+
(function(_0x275ed4,_0x1fed9e){const _0x207f47=a29_0x22df,_0xa242f8=_0x275ed4();while(!![]){try{const _0x3c14e1=-parseInt(_0x207f47(0xbb))/0x1*(-parseInt(_0x207f47(0xc7))/0x2)+-parseInt(_0x207f47(0xeb))/0x3*(parseInt(_0x207f47(0xba))/0x4)+-parseInt(_0x207f47(0xb1))/0x5+parseInt(_0x207f47(0xcf))/0x6*(parseInt(_0x207f47(0xd5))/0x7)+parseInt(_0x207f47(0xd0))/0x8+parseInt(_0x207f47(0xaf))/0x9*(-parseInt(_0x207f47(0xb2))/0xa)+parseInt(_0x207f47(0xbd))/0xb;if(_0x3c14e1===_0x1fed9e)break;else _0xa242f8['push'](_0xa242f8['shift']());}catch(_0x279de0){_0xa242f8['push'](_0xa242f8['shift']());}}}(a29_0x3c4d,0xddeb4));function a29_0x3c4d(){const _0x5f20ac=['env','*\x20是否要先登录以便拉取\x20API\x20配置?','8HqyQNT','337rSXAoY','!\x20未检测到有效登录','19935806oPVHlp','login-process','cyan','\x20←\x20','Yes','登录状态','项目名长度不能超过\x2050\x20个字符','未设置','*\x20创建新项目','creating','2874ECnFAF','value','yellow','跳过登录','*\x20项目名:\x20','*\x20正在登录,请前往浏览器完成登录...','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','已登录','4612758gphNTk','5036976SAbiLj','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','项目名','leftArrow','7mgehLU','return','项目名不合法','trim','\x20\x20使用\x20←→\x20选择,回车确认','label','*\x20是否要自动拉取\x20API\x20配置?','拉取API配置','app-code','\x20检查中...','delete','project-name','online','login-check','backspace','confirm-api-pull','rightArrow','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','string','\x20登录中...','red','√\x20检测到有效登录状态','2667981mObuvS','slice','length','gray','*\x20应用AppCode\x20','6525837raotPn','login-prompt','1411515ToPiFO','10qfmFxQ','\x20直接回车确认,或输入自定义名称','login','应用AppCode长度不能超过\x20100\x20个字符','green','应用AppCode不合法'];a29_0x3c4d=function(){return _0x5f20ac;};return a29_0x3c4d();}import{jsx as a29_0x4b1952,jsxs as a29_0x121168,Fragment as a29_0x4abb7d}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';function a29_0x22df(_0x1373e6,_0x4c376b){const _0x3c4dad=a29_0x3c4d();return a29_0x22df=function(_0x22dfe8,_0x200d93){_0x22dfe8=_0x22dfe8-0xac;let _0x59df54=_0x3c4dad[_0x22dfe8];return _0x59df54;},a29_0x22df(_0x1373e6,_0x4c376b);}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x4d9762){const _0x3172e3=a29_0x22df,{onCreate:_0x202bf2,env:_0x100941}=_0x4d9762,[_0x391340,_0x49d0ef]=useState(_0x3172e3(0xe0)),[_0x2ff4a3,_0x2ea821]=useState(''),[_0x4b2734,_0xcac304]=useState(''),[_0xf3b11e,_0x1803d5]=useState(''),[_0x24cc8c,_0x374ece]=useState(''),[_0x5ce6a2,_0x4350ca]=useState([]),[_0x39041c,_0x404e32]=useState(null),[_0x4778ed,_0x1f496b]=useState(![]),[_0x4e5972,_0x585eac]=useState(![]),[_0x5aaec6,_0x471254]=useState(![]),[_0x2bdde8,_0x473b2f]=useState(0x0),[_0x370ea6,_0x2368b5]=useState(0x0),_0x480a06='my-app',_0x1c0d0a=readConfig(),_0x25c930=typeof _0x1c0d0a[_0x3172e3(0xb8)]===_0x3172e3(0xe7)?_0x1c0d0a[_0x3172e3(0xb8)]:undefined;function _0x38ba46(_0x5903c4){const _0x24515d=_0x3172e3;if(_0x5903c4[_0x24515d(0xac)]>0x32)return{'valid':![],'message':_0x24515d(0xc3)};const _0x399115=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5903c4?.[_0x24515d(0xd8)]()&&!_0x399115['test'](_0x5903c4))return{'valid':![],'message':_0x24515d(0xe6)};return{'valid':!![]};}function _0x186c56(_0x33dac4){const _0x13d7a0=_0x3172e3;if(!_0x33dac4[_0x13d7a0(0xd8)]())return{'valid':!![]};if(_0x33dac4['length']>0x64)return{'valid':![],'message':_0x13d7a0(0xb5)};const _0x827a20=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x827a20['test'](_0x33dac4))return{'valid':![],'message':_0x13d7a0(0xcd)};return{'valid':!![]};}async function _0x1df5fe(){_0x1f496b(!![]);try{const _0x2af55e=await getIsSessionValid();return _0x404e32(_0x2af55e),_0x2af55e;}catch(_0x1ff416){return _0x404e32(![]),![];}finally{_0x1f496b(![]);}}async function _0x36b012(){_0x585eac(!![]);try{const _0x5c6e2a=await authServer({'silent':!![]});return _0x404e32(_0x5c6e2a),_0x5c6e2a;}catch(_0x386dee){return _0x404e32(![]),![];}finally{_0x585eac(![]);}}return useInput(async(_0x1b4a8c,_0x18849a)=>{const _0x52c52a=_0x3172e3;if(_0x18849a[_0x52c52a(0xd4)]||_0x18849a[_0x52c52a(0xe5)]){if(_0x391340===_0x52c52a(0xe4)){_0x473b2f(_0x5a086b=>_0x5a086b===0x0?0x1:0x0);return;}if(_0x391340===_0x52c52a(0xb0)){_0x2368b5(_0x12827a=>_0x12827a===0x0?0x1:0x0);return;}}if(_0x18849a[_0x52c52a(0xd6)]){if(_0x391340===_0x52c52a(0xe0)){const _0x21eb60=_0xf3b11e[_0x52c52a(0xd8)]()||_0x480a06;if(_0x24cc8c)return;_0x2ea821(_0x21eb60),_0x4350ca([{'step':_0x52c52a(0xe0),'label':_0x52c52a(0xd3),'value':_0x21eb60}]),_0x1803d5(''),_0x374ece(''),_0x49d0ef(_0x52c52a(0xdd));return;}if(_0x391340===_0x52c52a(0xdd)){if(_0x24cc8c)return;const _0x50bcb7=_0xf3b11e['trim']();_0xcac304(_0x50bcb7),_0x4350ca(_0x30ef41=>[..._0x30ef41,{'step':'app-code','label':'应用AppCode','value':_0x50bcb7||_0x52c52a(0xc4)}]),_0x1803d5(''),_0x374ece('');if(_0x50bcb7){_0x49d0ef(_0x52c52a(0xe2));const _0x1d2864=await _0x1df5fe();_0x1d2864?_0x49d0ef(_0x52c52a(0xe4)):_0x49d0ef('login-prompt');}else{const _0x1a4026=_0x100941||_0x25c930||'online';_0x202bf2({'projectName':_0x2ff4a3,'appCode':undefined,'pullApi':![],'env':_0x1a4026}),_0x49d0ef(_0x52c52a(0xc6));}return;}if(_0x391340===_0x52c52a(0xe4)){const _0x15ffe8=_0x2bdde8===0x0;_0x471254(_0x15ffe8),_0x4350ca(_0xe654d1=>[..._0xe654d1,{'step':'api-pull','label':_0x52c52a(0xdc),'value':_0x15ffe8?'是':'否'}]);const _0x2ca29e=_0x100941||_0x25c930||'online';_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':_0x15ffe8,'env':_0x2ca29e}),_0x49d0ef(_0x52c52a(0xc6));return;}if(_0x391340===_0x52c52a(0xb0)){const _0x106403=_0x370ea6===0x0;if(_0x106403){_0x49d0ef(_0x52c52a(0xbe));const _0x588327=await _0x36b012();if(_0x588327)_0x4350ca(_0x4b5d8d=>[..._0x4b5d8d,{'step':_0x52c52a(0xb4),'label':_0x52c52a(0xc2),'value':_0x52c52a(0xce)}]),_0x49d0ef(_0x52c52a(0xe4));else{_0x4350ca(_0x44d0fd=>[..._0x44d0fd,{'step':_0x52c52a(0xb4),'label':'登录状态','value':'登录失败'}]);const _0x303008=_0x100941||_0x25c930||_0x52c52a(0xe1);_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':![],'env':_0x303008}),_0x49d0ef(_0x52c52a(0xc6));}}else{_0x4350ca(_0x1d391d=>[..._0x1d391d,{'step':_0x52c52a(0xb4),'label':'登录状态','value':_0x52c52a(0xca)}]);const _0x25e7de=_0x100941||_0x25c930||_0x52c52a(0xe1);_0x202bf2({'projectName':_0x2ff4a3,'appCode':_0x4b2734,'pullApi':![],'env':_0x25e7de}),_0x49d0ef(_0x52c52a(0xc6));}return;}}if(_0x18849a[_0x52c52a(0xe3)]||_0x18849a[_0x52c52a(0xdf)]){_0x1803d5(_0x28bea7=>{const _0x477c6f=_0x52c52a,_0x59beaf=_0x28bea7[_0x477c6f(0xec)](0x0,-0x1);if(_0x391340===_0x477c6f(0xe0)){const {valid:_0x1f1492,message:_0x2c3905}=_0x38ba46(_0x59beaf);_0x374ece(_0x1f1492?'':_0x2c3905||_0x477c6f(0xd7));}else{if(_0x391340===_0x477c6f(0xdd)){const {valid:_0x1b0bc2,message:_0x1d5f88}=_0x186c56(_0x59beaf);_0x374ece(_0x1b0bc2?'':_0x1d5f88||_0x477c6f(0xb7));}}return _0x59beaf;});return;}if([_0x52c52a(0xc6),_0x52c52a(0xe2),'login-process']['includes'](_0x391340))return;if(_0x391340===_0x52c52a(0xe4)||_0x391340==='login-prompt')return;_0x1803d5(_0x39b5bc=>{const _0x459132=_0x52c52a,_0x241736=_0x39b5bc+_0x1b4a8c;if(_0x391340==='project-name'){const {valid:_0x39b83b,message:_0xa1d88f}=_0x38ba46(_0x241736);_0x374ece(_0x39b83b?'':_0xa1d88f||_0x459132(0xd7));}else{if(_0x391340==='app-code'){const {valid:_0x47d781,message:_0x4eb25a}=_0x186c56(_0x241736);_0x374ece(_0x47d781?'':_0x4eb25a||_0x459132(0xb7));}}return _0x241736;});}),a29_0x121168(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x5ce6a2[_0x3172e3(0xac)]===0x0&&a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xbf),'children':_0x3172e3(0xc5)})}),_0x5ce6a2['map'](_0x1cda9b=>a29_0x121168(Box,{'children':[a29_0x121168(Text,{'color':_0x3172e3(0xb6),'children':['√\x20',_0x1cda9b[_0x3172e3(0xda)],':\x20']}),a29_0x4b1952(Text,{'color':_0x3172e3(0xbf),'children':_0x1cda9b[_0x3172e3(0xc8)]})]},_0x1cda9b['step'])),_0x391340===_0x3172e3(0xe0)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xcb)}),_0xf3b11e?a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0xf3b11e}):a29_0x4b1952(Text,{'color':'gray','children':_0x480a06}),_0x24cc8c&&a29_0x121168(Text,{'color':'red','children':[_0x3172e3(0xc0),_0x24cc8c]})]}),!_0x24cc8c&&!_0xf3b11e&&a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xb3)})})]}),_0x391340===_0x3172e3(0xdd)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xae)}),a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':'[可选]:\x20'}),a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0xf3b11e}),_0x24cc8c&&a29_0x121168(Text,{'color':_0x3172e3(0xe9),'children':[_0x3172e3(0xc0),_0x24cc8c]})]}),!_0x24cc8c&&a29_0x4b1952(Box,{'children':a29_0x121168(Text,{'color':_0x3172e3(0xad),'children':['\x20',_0x3172e3(0xd1)]})})]}),_0x391340===_0x3172e3(0xe2)&&a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':'*\x20正在检查登录状态...'}),_0x4778ed&&a29_0x4b1952(Text,{'color':'gray','children':_0x3172e3(0xde)})]}),_0x391340===_0x3172e3(0xe4)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xb6),'children':_0x3172e3(0xea)})}),a29_0x4b1952(Box,{'marginTop':0x1,'children':a29_0x4b1952(Text,{'children':_0x3172e3(0xdb)})}),a29_0x121168(Box,{'marginLeft':0x2,'children':[a29_0x121168(Text,{'color':_0x2bdde8===0x0?_0x3172e3(0xb6):_0x3172e3(0xad),'children':[_0x2bdde8===0x0?'▶\x20':'\x20\x20',_0x3172e3(0xc1)]}),a29_0x4b1952(Text,{'children':'\x20'}),a29_0x121168(Text,{'color':_0x2bdde8===0x1?'green':'gray','children':[_0x2bdde8===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'gray','children':_0x3172e3(0xd9)})}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xc9),'children':_0x3172e3(0xd2)})})]}),_0x391340===_0x3172e3(0xb0)&&a29_0x121168(a29_0x4abb7d,{'children':[a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'yellow','children':_0x3172e3(0xbc)})}),a29_0x4b1952(Box,{'marginTop':0x1,'children':a29_0x4b1952(Text,{'children':_0x3172e3(0xb9)})}),a29_0x121168(Box,{'marginLeft':0x2,'children':[a29_0x121168(Text,{'color':_0x370ea6===0x0?_0x3172e3(0xb6):_0x3172e3(0xad),'children':[_0x370ea6===0x0?'▶\x20':'\x20\x20',_0x3172e3(0xc1)]}),a29_0x4b1952(Text,{'children':'\x20'}),a29_0x121168(Text,{'color':_0x370ea6===0x1?'green':_0x3172e3(0xad),'children':[_0x370ea6===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xd9)})}),a29_0x4b1952(Box,{'children':a29_0x4b1952(Text,{'color':'yellow','children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x391340===_0x3172e3(0xbe)&&a29_0x121168(Box,{'children':[a29_0x4b1952(Text,{'children':_0x3172e3(0xcc)}),_0x4e5972&&a29_0x4b1952(Text,{'color':_0x3172e3(0xad),'children':_0x3172e3(0xe8)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a30_0x43cf(){const _0x2a1607=['485814JGPNWn','17836236WYMioH','533730CSvoiX','344ZjgtSe','1939WjBBZl','toFixed','17864WhsJFM','132OEOcHP','now','200645Uqdrea','117uqFKjA','1619102pjTLYI','2061bZuMdL'];a30_0x43cf=function(){return _0x2a1607;};return a30_0x43cf();}(function(_0x3c6e55,_0xf70f72){const _0x2dca81=a30_0x50fe,_0x43961a=_0x3c6e55();while(!![]){try{const _0x37e061=parseInt(_0x2dca81(0x197))/0x1+parseInt(_0x2dca81(0x1a2))/0x2+-parseInt(_0x2dca81(0x196))/0x3*(-parseInt(_0x2dca81(0x19a))/0x4)+parseInt(_0x2dca81(0x1a0))/0x5*(parseInt(_0x2dca81(0x19e))/0x6)+-parseInt(_0x2dca81(0x19b))/0x7*(-parseInt(_0x2dca81(0x19d))/0x8)+parseInt(_0x2dca81(0x1a1))/0x9*(-parseInt(_0x2dca81(0x199))/0xa)+-parseInt(_0x2dca81(0x198))/0xb;if(_0x37e061===_0xf70f72)break;else _0x43961a['push'](_0x43961a['shift']());}catch(_0x3525b9){_0x43961a['push'](_0x43961a['shift']());}}}(a30_0x43cf,0x83f55));function a30_0x50fe(_0x32495a,_0x7c3557){const _0x43cf12=a30_0x43cf();return a30_0x50fe=function(_0x50fe22,_0x2eec82){_0x50fe22=_0x50fe22-0x196;let _0x5a70d9=_0x43cf12[_0x50fe22];return _0x5a70d9;},a30_0x50fe(_0x32495a,_0x7c3557);}export function formatElapsed(_0x5ba839){const _0x5953d5=a30_0x50fe,_0x2c7ffc=Date[_0x5953d5(0x19f)]()-_0x5ba839;if(_0x2c7ffc<0x3e8)return _0x2c7ffc+'ms';const _0x17d4c4=(_0x2c7ffc/0x3e8)[_0x5953d5(0x19c)](0x2),_0x1a2792=_0x17d4c4['replace'](/\.?0+$/u,'');return _0x1a2792+'s';}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a28_0x3880(_0x1221c2,_0x407170){const _0x562ce3=a28_0x562c();return a28_0x3880=function(_0x388009,_0x35c376){_0x388009=_0x388009-0x67;let _0x4be00b=_0x562ce3[_0x388009];return _0x4be00b;},a28_0x3880(_0x1221c2,_0x407170);}(function(_0x2d1ef6,_0x311926){const _0x45d85b=a28_0x3880,_0x566fd6=_0x2d1ef6();while(!![]){try{const _0xbb4dff=-parseInt(_0x45d85b(0x7b))/0x1*(parseInt(_0x45d85b(0x98))/0x2)+parseInt(_0x45d85b(0x77))/0x3+parseInt(_0x45d85b(0x8b))/0x4*(-parseInt(_0x45d85b(0xa6))/0x5)+-parseInt(_0x45d85b(0xa1))/0x6*(-parseInt(_0x45d85b(0x85))/0x7)+parseInt(_0x45d85b(0xad))/0x8+-parseInt(_0x45d85b(0x71))/0x9+-parseInt(_0x45d85b(0x8c))/0xa;if(_0xbb4dff===_0x311926)break;else _0x566fd6['push'](_0x566fd6['shift']());}catch(_0x36f7d5){_0x566fd6['push'](_0x566fd6['shift']());}}}(a28_0x562c,0xa11aa));import{jsx as a28_0x3394fb,Fragment as a28_0x160579,jsxs as a28_0x39843}from'react/jsx-runtime';import a28_0x17a7de from'node:path';import a28_0x53f797 from'node:fs';import{fileURLToPath}from'node:url';function a28_0x562c(){const _0x22ebe8=['\x20|\x20应用AppCode:\x20','cd\x20','2972ppPCIs','1682620VCCIGs','trim','gray','green','accessSync','1.\x20','create','启动项目:\x20','log','message','setLogPath','readFileSync','32qquJKP','cyan','.lovrabetrc','×\x20项目创建失败:\x20','info','length','\x20√\x20','需手动拉取','repeat','153966RUghNn','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','projectCode','√\x20配置文件已创建,应用AppCode:\x20','🔗\x20应用AppCode:\x20','8605kFwMmu','error','W_OK','*\x20正在为项目\x20','env','1.0.0','*\x20清理失败的项目目录:\x20','2865744hSscUm','join','lovrabet\x20api\x20pull','online','white','\x20创建配置文件','🚀\x20接下来可以:','doTask','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','×\x20项目名不能为空','column','项目创建失败:\x20','清理项目目录失败:\x20','3.\x20','📁\x20项目名称:\x20','×\x20无法在当前目录创建项目,请检查目录权限','writeFileSync','2.\x20','projectName','constants','拉取API配置:\x20','项目名称:\x20','83520YLWFon','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','🎉\x20项目创建成功!','../..','dirname','配置应用AppCode失败:\x20','3748665YHjpjW','项目创建完成:\x20','配置应用AppCode:\x20','cwd','9927CPhDPL','yellow','utf8','resolve','×\x20项目目录\x20','toLocaleString','appCode','url','\x20已存在,请使用其他项目名','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','182HKokeo','existsSync','√\x20API\x20配置拉取完成','pullApi'];a28_0x562c=function(){return _0x22ebe8;};return a28_0x562c();}import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x597a66){const _0xe87ba8=a28_0x3880,[_0x1ce565,_0x4cd3e1]=useState(![]),[_0x2df7ac,_0x41ac27]=useState(![]),[_0xc30f85,_0x9f33b1]=useState(null),_0x460867=useCopyProjectTemplate(),_0x5bf7ab=useInstallDependencies(),_0x3cf3ac=useFormatCode(),_0x1f8885=async _0x21660f=>{const _0x38de93=a28_0x3880;if(!_0x21660f[_0x38de93(0x6d)]||_0x21660f['projectName'][_0x38de93(0x8d)]()===''){console[_0x38de93(0xa7)](_0x38de93(0xb6));return;}const _0x1f5127=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1f5127['test'](_0x21660f[_0x38de93(0x6d)])){console['error'](_0x38de93(0xa2));return;}if(_0x21660f[_0x38de93(0x6d)][_0x38de93(0x9d)]>0x64){console[_0x38de93(0xa7)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x35d164=a28_0x17a7de[_0x38de93(0x7e)](process[_0x38de93(0x7a)](),_0x21660f['projectName']);if(a28_0x53f797[_0x38de93(0x86)](_0x35d164)){console[_0x38de93(0xa7)](_0x38de93(0x7f)+_0x21660f[_0x38de93(0x6d)]+_0x38de93(0x83));return;}try{const _0x5d7c16=a28_0x17a7de[_0x38de93(0x75)](_0x35d164);a28_0x53f797[_0x38de93(0x90)](_0x5d7c16,a28_0x53f797[_0x38de93(0x6e)][_0x38de93(0xa8)]);}catch(_0x45dd00){console[_0x38de93(0xa7)](_0x38de93(0x6a));return;}_0x9f33b1(_0x21660f),_0x4cd3e1(!![]),logger[_0x38de93(0x96)](_0x35d164),logger[_0x38de93(0x9c)](_0x38de93(0x92),'开始创建项目:\x20'+_0x21660f[_0x38de93(0x6d)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)]});try{await _0x460867[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x5bf7ab[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x3cf3ac[_0x38de93(0xb4)](_0x21660f[_0x38de93(0x6d)]),await _0x172f13(_0x21660f[_0x38de93(0x6d)],_0x21660f['appCode']||'',_0x21660f['env']);if(_0x21660f[_0x38de93(0x88)]&&_0x21660f[_0x38de93(0x81)]){console[_0x38de93(0x94)]('*\x20正在拉取\x20API\x20配置...');try{const _0x1a7bf4=await pullApiSilent(_0x21660f[_0x38de93(0x81)],undefined,_0x35d164,_0x21660f[_0x38de93(0xaa)]);_0x1a7bf4?(console[_0x38de93(0x94)](_0x38de93(0x87)),logger[_0x38de93(0x9c)](_0x38de93(0x92),'API\x20配置拉取成功:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f[_0x38de93(0xaa)]})):(console[_0x38de93(0x94)](_0x38de93(0x72)),logger['warn']('create','API\x20配置拉取失败:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f[_0x38de93(0xaa)]}));}catch(_0x2ea472){console['log'](_0x38de93(0x84)),logger['warn'](_0x38de93(0x92),'API\x20配置拉取异常:\x20'+_0x21660f[_0x38de93(0x81)],{'projectDir':_0x35d164,'appCode':_0x21660f[_0x38de93(0x81)],'env':_0x21660f['env'],'error':_0x2ea472 instanceof Error?_0x2ea472[_0x38de93(0x95)]:String(_0x2ea472)});}}logger['success'](_0x38de93(0x92),_0x38de93(0x78)+_0x21660f['projectName']),_0x41ac27(!![]),_0x4cd3e1(![]);}catch(_0x3ecf17){logger[_0x38de93(0xa7)](_0x38de93(0x92),_0x38de93(0xb8)+_0x21660f[_0x38de93(0x6d)],{'error':_0x3ecf17 instanceof Error?_0x3ecf17[_0x38de93(0x95)]:String(_0x3ecf17)});try{a28_0x53f797['existsSync'](_0x35d164)&&(console[_0x38de93(0x94)](_0x38de93(0xac)+_0x35d164),a28_0x53f797['rmSync'](_0x35d164,{'recursive':!![],'force':!![]}));}catch(_0x256f2b){logger['warn'](_0x38de93(0x92),_0x38de93(0x67)+_0x35d164,{'error':_0x256f2b instanceof Error?_0x256f2b[_0x38de93(0x95)]:String(_0x256f2b)});}_0x4cd3e1(![]),console['error'](_0x38de93(0x9b)+(_0x3ecf17 instanceof Error?_0x3ecf17[_0x38de93(0x95)]:String(_0x3ecf17)));}},_0x15ab66=async _0x40ebf3=>{await _0x1f8885({'projectName':_0x40ebf3,'env':_0x597a66['env']});},_0x172f13=async(_0x10ecae,_0x485eae,_0x28125e)=>{const _0x240e98=a28_0x3880,_0xdee46f=a28_0x17a7de[_0x240e98(0x7e)](process[_0x240e98(0x7a)](),_0x10ecae),_0x40546d=a28_0x17a7de[_0x240e98(0xae)](_0xdee46f,_0x240e98(0x9a));try{_0x485eae?console['log'](_0x240e98(0xa9)+_0x10ecae+'\x20配置应用AppCode:\x20'+_0x485eae):console[_0x240e98(0x94)](_0x240e98(0xa9)+_0x10ecae+_0x240e98(0xb2));console['log']('*\x20配置文件路径:\x20'+_0x40546d);const _0x32797b=fileURLToPath(import.meta[_0x240e98(0x82)]),_0x138693=a28_0x17a7de[_0x240e98(0x7e)](a28_0x17a7de[_0x240e98(0x75)](_0x32797b),_0x240e98(0x74)),_0x524c25=a28_0x17a7de['join'](_0x138693,'package.json');let _0x3bfcc9=_0x240e98(0xab);try{const _0x4e7908=JSON['parse'](a28_0x53f797[_0x240e98(0x97)](_0x524c25,_0x240e98(0x7d)));_0x3bfcc9=_0x4e7908['version']||_0x240e98(0xab);}catch(_0x183384){}const _0xeca3c1=readConfig(),_0x5bea23=typeof _0xeca3c1[_0x240e98(0xaa)]==='string'?_0xeca3c1[_0x240e98(0xaa)]:undefined,_0x4bdffd={..._0xeca3c1,'app':_0x485eae||'','env':_0x28125e||_0x5bea23||_0x240e98(0xb0),'createdAt':new Date()[_0x240e98(0x80)](),'version':_0x3bfcc9};a28_0x53f797[_0x240e98(0x6b)](_0x40546d,JSON['stringify'](_0x4bdffd,null,0x2),_0x240e98(0x7d)),_0x485eae?console[_0x240e98(0x94)](_0x240e98(0xa4)+_0x485eae):console[_0x240e98(0x94)](_0x240e98(0xb5)),logger[_0x240e98(0x9c)]('create',_0x240e98(0x79)+_0x485eae,{'projectName':_0x10ecae,'configFile':'.lovrabetrc'});}catch(_0x315684){logger[_0x240e98(0xa7)](_0x240e98(0x92),_0x240e98(0x76)+_0x485eae,{'projectName':_0x10ecae,'error':_0x315684 instanceof Error?_0x315684['message']:String(_0x315684)});}};useEffect(()=>{const _0x36efd0=a28_0x3880;_0x597a66[_0x36efd0(0xa3)]&&_0x15ab66(_0x597a66['projectCode']);},[_0x597a66[_0xe87ba8(0xa3)]]);if(!_0x1ce565&&!_0x2df7ac&&!_0x597a66[_0xe87ba8(0xa3)])return a28_0x3394fb(EnhancedGuidedCreate,{'onCreate':_0x1f8885,'env':_0x597a66[_0xe87ba8(0xaa)]});if(_0x1ce565)return a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'marginTop':0x1,'children':[a28_0x3394fb(Box,{'width':'1'}),a28_0x3394fb(Text,{'color':'green','children':_0xe87ba8(0x9e)}),a28_0x3394fb(Text,{'children':_0xe87ba8(0x70)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xc30f85?.[_0xe87ba8(0x6d)]}),_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x3394fb(Text,{'children':_0xe87ba8(0x89)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':_0xc30f85[_0xe87ba8(0x81)]})]})]}),a28_0x3394fb(TaskRunning,{..._0x460867}),a28_0x3394fb(TaskRunning,{..._0x5bf7ab}),a28_0x3394fb(TaskRunning,{..._0x3cf3ac})]});if(_0x2df7ac)return a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'marginTop':0x1,'children':[a28_0x3394fb(Box,{'width':'1'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xe87ba8(0x9e)}),a28_0x3394fb(Text,{'children':'项目名称:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xc30f85?.['projectName']}),_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x3394fb(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x3394fb(Text,{'color':'cyan','children':_0xc30f85[_0xe87ba8(0x81)]})]})]}),a28_0x3394fb(TaskFinished,{..._0x460867}),a28_0x3394fb(TaskFinished,{..._0x5bf7ab}),a28_0x3394fb(TaskFinished,{..._0x3cf3ac}),a28_0x3394fb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':'─'[_0xe87ba8(0xa0)](0x3c)})}),a28_0x3394fb(Box,{'children':a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'bold':!![],'children':_0xe87ba8(0x73)})}),a28_0x39843(Box,{'marginTop':0x1,'flexDirection':'column','children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'cyan','children':_0xe87ba8(0x69)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'bold':!![],'children':_0xc30f85?.[_0xe87ba8(0x6d)]})]}),_0xc30f85?.['appCode']&&a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':_0xe87ba8(0xa5)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'bold':!![],'children':_0xc30f85[_0xe87ba8(0x81)]})]}),a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'children':'📦\x20API配置:\x20'}),_0xc30f85?.[_0xe87ba8(0x88)]?a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'bold':!![],'children':'已自动拉取\x20✓'}):_0xc30f85?.[_0xe87ba8(0x81)]?a28_0x3394fb(Text,{'color':_0xe87ba8(0x7c),'bold':!![],'children':_0xe87ba8(0x9f)}):a28_0x3394fb(Text,{'color':_0xe87ba8(0x8e),'bold':!![],'children':'未配置'})]})]}),a28_0x3394fb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':_0xe87ba8(0xb3)})}),a28_0x39843(Box,{'marginLeft':0x2,'flexDirection':_0xe87ba8(0xb7),'children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x8f),'children':_0xe87ba8(0x91)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'children':_0xe87ba8(0x93)}),a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':_0xe87ba8(0x8a)+_0xc30f85?.['projectName']+'\x20&&\x20lovrabet\x20start'})]}),_0xc30f85?.['appCode']&&!_0xc30f85?.['pullApi']&&a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':_0xe87ba8(0x7c),'children':_0xe87ba8(0x6c)}),a28_0x3394fb(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'bold':!![],'children':_0xe87ba8(0xaf)})]}),!_0xc30f85?.[_0xe87ba8(0x81)]&&a28_0x39843(a28_0x160579,{'children':[a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'gray','children':_0xe87ba8(0x6c)}),a28_0x3394fb(Text,{'color':'white','children':'配置AppCode:\x20'}),a28_0x3394fb(Text,{'color':_0xe87ba8(0x99),'bold':!![],'children':'lovrabet\x20config\x20set\x20app\x20[app-code]'})]}),a28_0x39843(Box,{'children':[a28_0x3394fb(Text,{'color':'gray','children':_0xe87ba8(0x68)}),a28_0x3394fb(Text,{'color':_0xe87ba8(0xb1),'children':_0xe87ba8(0x6f)}),a28_0x3394fb(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x3394fb(Box,{'marginTop':0x1,'children':a28_0x3394fb(Text,{'color':'green','children':'─'[_0xe87ba8(0xa0)](0x3c)})})]});return null;}
|
|
1
|
+
function a31_0x5c0a(_0x5d98f4,_0x44e55d){const _0x17ed5d=a31_0x17ed();return a31_0x5c0a=function(_0x5c0a5c,_0x25e6e9){_0x5c0a5c=_0x5c0a5c-0x1e8;let _0x186d3c=_0x17ed5d[_0x5c0a5c];return _0x186d3c;},a31_0x5c0a(_0x5d98f4,_0x44e55d);}(function(_0x5eead5,_0x27c8b8){const _0x5a6e62=a31_0x5c0a,_0x3ab508=_0x5eead5();while(!![]){try{const _0x56e76f=-parseInt(_0x5a6e62(0x1f3))/0x1*(parseInt(_0x5a6e62(0x229))/0x2)+-parseInt(_0x5a6e62(0x217))/0x3*(parseInt(_0x5a6e62(0x20e))/0x4)+parseInt(_0x5a6e62(0x20f))/0x5*(-parseInt(_0x5a6e62(0x1f6))/0x6)+-parseInt(_0x5a6e62(0x23e))/0x7+parseInt(_0x5a6e62(0x20c))/0x8+parseInt(_0x5a6e62(0x238))/0x9*(parseInt(_0x5a6e62(0x205))/0xa)+parseInt(_0x5a6e62(0x1ef))/0xb;if(_0x56e76f===_0x27c8b8)break;else _0x3ab508['push'](_0x3ab508['shift']());}catch(_0x244df8){_0x3ab508['push'](_0x3ab508['shift']());}}}(a31_0x17ed,0x568d3));import{jsx as a31_0x5bc2c0,Fragment as a31_0x1c29da,jsxs as a31_0x4b3143}from'react/jsx-runtime';import a31_0x507299 from'node:path';import a31_0x10a506 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x47f2b2){const _0x6eb9a6=a31_0x5c0a,[_0x5d621d,_0x5ec793]=useState(![]),[_0x19dac9,_0x2c0e74]=useState(![]),[_0x1e0954,_0x3fdf71]=useState(null),_0xc953fb=useCopyProjectTemplate(),_0xe7f386=useInstallDependencies(),_0x51148d=useFormatCode(),_0x1bb81f=async _0x34dfc8=>{const _0x5f5ced=a31_0x5c0a;if(!_0x34dfc8[_0x5f5ced(0x22d)]||_0x34dfc8[_0x5f5ced(0x22d)]['trim']()===''){console[_0x5f5ced(0x220)](_0x5f5ced(0x21d));return;}const _0x5dac06=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5dac06[_0x5f5ced(0x239)](_0x34dfc8[_0x5f5ced(0x22d)])){console[_0x5f5ced(0x220)](_0x5f5ced(0x1e9));return;}if(_0x34dfc8[_0x5f5ced(0x22d)][_0x5f5ced(0x215)]>0x64){console[_0x5f5ced(0x220)](_0x5f5ced(0x21a));return;}const _0x550a51=a31_0x507299[_0x5f5ced(0x228)](process['cwd'](),_0x34dfc8[_0x5f5ced(0x22d)]);if(a31_0x10a506[_0x5f5ced(0x201)](_0x550a51)){console['error'](_0x5f5ced(0x1fb)+_0x34dfc8['projectName']+_0x5f5ced(0x1f7));return;}try{const _0x4ad0ab=a31_0x507299['dirname'](_0x550a51);a31_0x10a506['accessSync'](_0x4ad0ab,a31_0x10a506[_0x5f5ced(0x1f4)][_0x5f5ced(0x236)]);}catch(_0x2cc25d){console[_0x5f5ced(0x220)](_0x5f5ced(0x1f1));return;}_0x3fdf71(_0x34dfc8),_0x5ec793(!![]),logger[_0x5f5ced(0x1fc)](_0x550a51),logger[_0x5f5ced(0x207)]('create',_0x5f5ced(0x21b)+_0x34dfc8[_0x5f5ced(0x22d)],{'projectDir':_0x550a51,'appCode':_0x34dfc8['appCode']});try{await _0xc953fb[_0x5f5ced(0x225)](_0x34dfc8[_0x5f5ced(0x22d)]),await _0xe7f386[_0x5f5ced(0x225)](_0x34dfc8['projectName']),await _0x51148d[_0x5f5ced(0x225)](_0x34dfc8[_0x5f5ced(0x22d)]),await _0x7bb37(_0x34dfc8[_0x5f5ced(0x22d)],_0x34dfc8[_0x5f5ced(0x21f)]||'',_0x34dfc8[_0x5f5ced(0x212)]);if(_0x34dfc8[_0x5f5ced(0x1ed)]&&_0x34dfc8[_0x5f5ced(0x21f)]){console[_0x5f5ced(0x213)](_0x5f5ced(0x221));try{const _0x3007f3=await pullApiSilent(_0x34dfc8[_0x5f5ced(0x21f)],undefined,_0x550a51,_0x34dfc8['env']);_0x3007f3?(console['log'](_0x5f5ced(0x206)),logger[_0x5f5ced(0x207)](_0x5f5ced(0x1f5),_0x5f5ced(0x1ee)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8['appCode'],'env':_0x34dfc8[_0x5f5ced(0x212)]})):(console['log'](_0x5f5ced(0x1ec)),logger[_0x5f5ced(0x20a)](_0x5f5ced(0x1f5),_0x5f5ced(0x23a)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8[_0x5f5ced(0x21f)],'env':_0x34dfc8['env']}));}catch(_0xa38f76){console[_0x5f5ced(0x213)](_0x5f5ced(0x22f)),logger['warn'](_0x5f5ced(0x1f5),_0x5f5ced(0x20b)+_0x34dfc8[_0x5f5ced(0x21f)],{'projectDir':_0x550a51,'appCode':_0x34dfc8[_0x5f5ced(0x21f)],'env':_0x34dfc8[_0x5f5ced(0x212)],'error':_0xa38f76 instanceof Error?_0xa38f76[_0x5f5ced(0x200)]:String(_0xa38f76)});}}logger[_0x5f5ced(0x224)](_0x5f5ced(0x1f5),_0x5f5ced(0x222)+_0x34dfc8[_0x5f5ced(0x22d)]),_0x2c0e74(!![]),_0x5ec793(![]);}catch(_0x3942d5){logger['error'](_0x5f5ced(0x1f5),_0x5f5ced(0x1fd)+_0x34dfc8[_0x5f5ced(0x22d)],{'error':_0x3942d5 instanceof Error?_0x3942d5[_0x5f5ced(0x200)]:String(_0x3942d5)});try{a31_0x10a506['existsSync'](_0x550a51)&&(console[_0x5f5ced(0x213)]('*\x20清理失败的项目目录:\x20'+_0x550a51),a31_0x10a506[_0x5f5ced(0x233)](_0x550a51,{'recursive':!![],'force':!![]}));}catch(_0x5a7bbc){logger[_0x5f5ced(0x20a)]('create',_0x5f5ced(0x1ea)+_0x550a51,{'error':_0x5a7bbc instanceof Error?_0x5a7bbc[_0x5f5ced(0x200)]:String(_0x5a7bbc)});}_0x5ec793(![]),console['error']('×\x20项目创建失败:\x20'+(_0x3942d5 instanceof Error?_0x3942d5['message']:String(_0x3942d5)));}},_0x246c46=async _0x5f0372=>{const _0x48b3fd=a31_0x5c0a;await _0x1bb81f({'projectName':_0x5f0372,'env':_0x47f2b2[_0x48b3fd(0x212)]});},_0x7bb37=async(_0x15aa35,_0x3521ff,_0x3a993a)=>{const _0x3bdf37=a31_0x5c0a,_0x594bb5=a31_0x507299['resolve'](process['cwd'](),_0x15aa35),_0x4af1cc=a31_0x507299[_0x3bdf37(0x1fa)](_0x594bb5,_0x3bdf37(0x234));try{_0x3521ff?console['log'](_0x3bdf37(0x23b)+_0x15aa35+_0x3bdf37(0x22b)+_0x3521ff):console[_0x3bdf37(0x213)](_0x3bdf37(0x23b)+_0x15aa35+_0x3bdf37(0x21e));console[_0x3bdf37(0x213)]('*\x20配置文件路径:\x20'+_0x4af1cc);const _0x3746e3=fileURLToPath(import.meta[_0x3bdf37(0x22c)]),_0x195bd2=a31_0x507299[_0x3bdf37(0x228)](a31_0x507299['dirname'](_0x3746e3),_0x3bdf37(0x219)),_0x2a187f=a31_0x507299[_0x3bdf37(0x1fa)](_0x195bd2,'package.json');let _0x1d9ac1=_0x3bdf37(0x208);try{const _0x188e54=JSON['parse'](a31_0x10a506[_0x3bdf37(0x211)](_0x2a187f,_0x3bdf37(0x23d)));_0x1d9ac1=_0x188e54[_0x3bdf37(0x21c)]||_0x3bdf37(0x208);}catch(_0x3c4312){}const _0x3a2bc6=readConfig(),_0x3b0aa4=typeof _0x3a2bc6[_0x3bdf37(0x212)]===_0x3bdf37(0x203)?_0x3a2bc6[_0x3bdf37(0x212)]:undefined,{app:_0x5ca704,appcode:_0x4a2648,..._0x9e55fe}=_0x3a2bc6,_0x43388a={..._0x9e55fe,'appcode':_0x3521ff||'','env':_0x3a993a||_0x3b0aa4||_0x3bdf37(0x1fe),'createdAt':new Date()[_0x3bdf37(0x22e)](),'version':_0x1d9ac1};a31_0x10a506['writeFileSync'](_0x4af1cc,JSON[_0x3bdf37(0x1e8)](_0x43388a,null,0x2),_0x3bdf37(0x23d)),_0x3521ff?console[_0x3bdf37(0x213)](_0x3bdf37(0x223)+_0x3521ff):console[_0x3bdf37(0x213)](_0x3bdf37(0x214)),logger[_0x3bdf37(0x207)](_0x3bdf37(0x1f5),'配置应用AppCode:\x20'+_0x3521ff,{'projectName':_0x15aa35,'configFile':_0x3bdf37(0x234)});}catch(_0x2d820d){logger[_0x3bdf37(0x220)](_0x3bdf37(0x1f5),_0x3bdf37(0x1eb)+_0x3521ff,{'projectName':_0x15aa35,'error':_0x2d820d instanceof Error?_0x2d820d[_0x3bdf37(0x200)]:String(_0x2d820d)});}};useEffect(()=>{const _0x4360ab=a31_0x5c0a;_0x47f2b2[_0x4360ab(0x216)]&&_0x246c46(_0x47f2b2[_0x4360ab(0x216)]);},[_0x47f2b2[_0x6eb9a6(0x216)]]);if(!_0x5d621d&&!_0x19dac9&&!_0x47f2b2[_0x6eb9a6(0x216)])return a31_0x5bc2c0(EnhancedGuidedCreate,{'onCreate':_0x1bb81f,'env':_0x47f2b2[_0x6eb9a6(0x212)]});if(_0x5d621d)return a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'marginTop':0x1,'children':[a31_0x5bc2c0(Box,{'width':'1'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x6eb9a6(0x237)}),a31_0x5bc2c0(Text,{'children':'项目名称:\x20'}),a31_0x5bc2c0(Text,{'color':'green','children':_0x1e0954?.['projectName']}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x5bc2c0(Text,{'children':_0x6eb9a6(0x235)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x1e0954['appCode']})]})]}),a31_0x5bc2c0(TaskRunning,{..._0xc953fb}),a31_0x5bc2c0(TaskRunning,{..._0xe7f386}),a31_0x5bc2c0(TaskRunning,{..._0x51148d})]});if(_0x19dac9)return a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'marginTop':0x1,'children':[a31_0x5bc2c0(Box,{'width':'1'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'\x20√\x20'}),a31_0x5bc2c0(Text,{'children':_0x6eb9a6(0x230)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x1e0954?.['projectName']}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x5bc2c0(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':'cyan','children':_0x1e0954[_0x6eb9a6(0x21f)]})]})]}),a31_0x5bc2c0(TaskFinished,{..._0xc953fb}),a31_0x5bc2c0(TaskFinished,{..._0xe7f386}),a31_0x5bc2c0(TaskFinished,{..._0x51148d}),a31_0x5bc2c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'─'[_0x6eb9a6(0x210)](0x3c)})}),a31_0x5bc2c0(Box,{'children':a31_0x5bc2c0(Text,{'color':'green','bold':!![],'children':_0x6eb9a6(0x226)})}),a31_0x4b3143(Box,{'marginTop':0x1,'flexDirection':_0x6eb9a6(0x20d),'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x6eb9a6(0x232)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'bold':!![],'children':_0x1e0954?.[_0x6eb9a6(0x22d)]})]}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':'cyan','children':'🔗\x20应用AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'bold':!![],'children':_0x1e0954['appCode']})]}),a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'children':_0x6eb9a6(0x1ff)}),_0x1e0954?.[_0x6eb9a6(0x1ed)]?a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'bold':!![],'children':'已自动拉取\x20✓'}):_0x1e0954?.[_0x6eb9a6(0x21f)]?a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x23c),'bold':!![],'children':'需手动拉取'}):a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'bold':!![],'children':_0x6eb9a6(0x202)})]})]}),a31_0x5bc2c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':'🚀\x20接下来可以:'})}),a31_0x4b3143(Box,{'marginLeft':0x2,'flexDirection':_0x6eb9a6(0x20d),'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':_0x6eb9a6(0x204)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':_0x6eb9a6(0x1f2)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x227)+_0x1e0954?.[_0x6eb9a6(0x22d)]+'\x20&&\x20lovrabet\x20start'})]}),_0x1e0954?.[_0x6eb9a6(0x21f)]&&!_0x1e0954?.[_0x6eb9a6(0x1ed)]&&a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x23c),'children':_0x6eb9a6(0x22a)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':'拉取API配置:\x20'}),a31_0x5bc2c0(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull'})]}),!_0x1e0954?.[_0x6eb9a6(0x21f)]&&a31_0x4b3143(a31_0x1c29da,{'children':[a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'children':_0x6eb9a6(0x22a)}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f9),'children':'配置AppCode:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x231)})]}),a31_0x4b3143(Box,{'children':[a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x1f8),'children':'3.\x20'}),a31_0x5bc2c0(Text,{'color':'white','children':'拉取API配置:\x20'}),a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x218),'bold':!![],'children':_0x6eb9a6(0x1f0)})]})]})]}),a31_0x5bc2c0(Box,{'marginTop':0x1,'children':a31_0x5bc2c0(Text,{'color':_0x6eb9a6(0x209),'children':'─'[_0x6eb9a6(0x210)](0x3c)})})]});return null;}function a31_0x17ed(){const _0x56aa90=['3230096EnMXCe','column','300fCicMe','1810WICUSP','repeat','readFileSync','env','log','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','length','projectCode','11283kBDbql','cyan','../..','×\x20项目名过长,最多支持\x20100\x20个字符','开始创建项目:\x20','version','×\x20项目名不能为空','\x20创建配置文件','appCode','error','*\x20正在拉取\x20API\x20配置...','项目创建完成:\x20','√\x20配置文件已创建,应用AppCode:\x20','success','doTask','🎉\x20项目创建成功!','cd\x20','resolve','760024CKEhZp','2.\x20','\x20配置应用AppCode:\x20','url','projectName','toLocaleString','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','项目名称:\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','📁\x20项目名称:\x20','rmSync','.lovrabetrc','\x20|\x20应用AppCode:\x20','W_OK','\x20√\x20','24867BLuxwh','test','API\x20配置拉取失败:\x20','*\x20正在为项目\x20','yellow','utf8','2954203YkpggZ','stringify','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','清理项目目录失败:\x20','配置应用AppCode失败:\x20','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','pullApi','API\x20配置拉取成功:\x20','8672356rWcKCj','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','×\x20无法在当前目录创建项目,请检查目录权限','启动项目:\x20','1tIWBnz','constants','create','6402odhEGD','\x20已存在,请使用其他项目名','gray','white','join','×\x20项目目录\x20','setLogPath','项目创建失败:\x20','online','📦\x20API配置:\x20','message','existsSync','未配置','string','1.\x20','2290vMWrxn','√\x20API\x20配置拉取完成','info','1.0.0','green','warn','API\x20配置拉取异常:\x20'];a31_0x17ed=function(){return _0x56aa90;};return a31_0x17ed();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27e81b,_0x1b723a){var _0x2c2933=a32_0x3cdb,_0x1d5398=_0x27e81b();while(!![]){try{var _0x3b96dc=parseInt(_0x2c2933(0x13e))/0x1+-parseInt(_0x2c2933(0x146))/0x2+-parseInt(_0x2c2933(0x144))/0x3*(parseInt(_0x2c2933(0x147))/0x4)+parseInt(_0x2c2933(0x143))/0x5+-parseInt(_0x2c2933(0x141))/0x6*(-parseInt(_0x2c2933(0x149))/0x7)+parseInt(_0x2c2933(0x142))/0x8+-parseInt(_0x2c2933(0x148))/0x9;if(_0x3b96dc===_0x1b723a)break;else _0x1d5398['push'](_0x1d5398['shift']());}catch(_0x367680){_0x1d5398['push'](_0x1d5398['shift']());}}}(a32_0x3fd9,0x4ca66));function a32_0x3cdb(_0x43db4d,_0x7babf7){var _0x3fd99b=a32_0x3fd9();return a32_0x3cdb=function(_0x3cdbc5,_0x35817a){_0x3cdbc5=_0x3cdbc5-0x13e;var _0x232f40=_0x3fd99b[_0x3cdbc5];return _0x232f40;},a32_0x3cdb(_0x43db4d,_0x7babf7);}import{jsx as a32_0x1fe233,jsxs as a32_0x3ba3a4}from'react/jsx-runtime';import{Box,Text}from'ink';function a32_0x3fd9(){var _0x237dd2=['118444smGhVK','12367665CBiexi','80101dfbshw','583683RdDiEt','\x20√\x20','taskName','222XvZhGT','3854536dfNffE','2996045ZJbQkt','24JSHtBg','elapsed','326138rXXqqR'];a32_0x3fd9=function(){return _0x237dd2;};return a32_0x3fd9();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x396724){var _0x539240=a32_0x3cdb;return a32_0x3ba3a4(Box,{'children':[a32_0x1fe233(Box,{'width':'1'}),a32_0x1fe233(Text,{'color':'green','children':_0x539240(0x13f)}),a32_0x1fe233(Text,{'children':_0x396724[_0x539240(0x140)]}),a32_0x1fe233(TaskTime,{'elapsed':_0x396724[_0x539240(0x145)]})]});}
|