@lovrabet/cli 1.3.2-beta.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/ai-setup/AISetupUI.js +1 -1
- package/lib/ai-setup/config.js +1 -1
- package/lib/api/api-doc-ui.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/app-menu/app-menu-sync-ui.js +1 -1
- package/lib/app-menu/create-menu.js +1 -1
- package/lib/app-menu/get-local-pages.js +1 -1
- package/lib/app-menu/get-online-menu-list.js +1 -1
- package/lib/app-menu/use-get-online-menu-list.js +1 -1
- package/lib/app-menu/utils.js +1 -1
- package/lib/app-menu/valid-url.js +1 -1
- package/lib/app-menu-update-cdn/current-content.js +1 -1
- package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
- package/lib/app-menu-update-cdn/main.js +1 -1
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.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/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/SkillInstallUI.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/skill-install-non-interactive.js +1 -1
- package/lib/skills/skill-installer.js +1 -1
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.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/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a26_0x33b7(){const _0x2719ae=['⚠️\x20\x20无法自动打开浏览器','address','error','listen','https://g.yuntooai.com/cert/lovrabet-dev.json','76385iIwElb','✅\x20浏览器已自动打开,请在浏览器中完成登录','object','cookie','start\x20\x22\x22\x20\x22','🔗\x20请手动复制登录地址到浏览器:','platform','2zeeTIM','<!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>','208VkaFmQ','text/html;\x20charset=utf-8','isAuth','writeHead','9fZspaY','25593RKeHVj','6918920vdmUap','https://dev.lovrabet.com:','log','📍\x20登录地址:','61158mOeCKM','5286694JXTwVC','Auth\x20server\x20error:','🌐\x20正在尝试自动打开浏览器...','204OOYLfd','15600904ToBMwc','6557944KCBsWt','then','session','port','win32','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','json','end','utf-8','darwin'];a26_0x33b7=function(){return _0x2719ae;};return a26_0x33b7();}const a26_0x43dc44=a26_0x2839;(function(_0x1f683e,_0x1f606f){const _0x1463b1=a26_0x2839,_0x329495=_0x1f683e();while(!![]){try{const _0x15c45c=-parseInt(_0x1463b1(0x166))/0x1*(-parseInt(_0x1463b1(0x187))/0x2)+-parseInt(_0x1463b1(0x16b))/0x3*(parseInt(_0x1463b1(0x189))/0x4)+parseInt(_0x1463b1(0x180))/0x5*(-parseInt(_0x1463b1(0x16f))/0x6)+-parseInt(_0x1463b1(0x16c))/0x7+-parseInt(_0x1463b1(0x171))/0x8*(-parseInt(_0x1463b1(0x18d))/0x9)+parseInt(_0x1463b1(0x167))/0xa+parseInt(_0x1463b1(0x170))/0xb;if(_0x15c45c===_0x1f606f)break;else _0x329495['push'](_0x329495['shift']());}catch(_0x5751d1){_0x329495['push'](_0x329495['shift']());}}}(a26_0x33b7,0x978d8));function a26_0x2839(_0x52d3db,_0x4f44c4){_0x52d3db=_0x52d3db-0x166;const _0x33b785=a26_0x33b7();let _0x283938=_0x33b785[_0x52d3db];return _0x283938;}import{writeFileSync}from'node:fs';import a26_0x471170 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x49ed90){const _0x5b3922=a26_0x2839,_0x5ee821=_0x49ed90?.['silent']||![];if(await getIsSessionValid())return!![];const _0xb4aa01=await(await fetch(_0x5b3922(0x17f)))['json']();return new Promise(async(_0x314119,_0x4bec15)=>{const _0x43bb91=_0x5b3922;let _0x1edcd4=0x0;const _0x4c5786=a26_0x471170['createServer'](_0xb4aa01,async(_0x365844,_0x8f6ae9)=>{const _0x2bfa9b=a26_0x2839,_0x3798ab=getUserDomain(),_0xbb498a=_0x365844['headers'][_0x2bfa9b(0x183)]||'',_0xaaf12c=await fetch(_0x3798ab+'/api/auth/get-session',{'headers':{'cookie':_0xbb498a}})[_0x2bfa9b(0x172)](_0x2177a3=>_0x2177a3[_0x2bfa9b(0x177)]()),_0x58859a=_0xaaf12c&&_0xaaf12c[_0x2bfa9b(0x173)]&&_0xaaf12c['user'];if(_0x58859a){writeFileSync(cookieFile,_0xbb498a,_0x2bfa9b(0x179)),_0x314119(!![]);const _0x3b02db=_0x2bfa9b(0x188);_0x8f6ae9[_0x2bfa9b(0x18c)](0xc8,{'Content-Type':_0x2bfa9b(0x18a)}),_0x8f6ae9['end'](_0x3b02db),_0x4c5786['close']();}else{const _0x40e4e7=''+encodeURIComponent(_0x2bfa9b(0x168)+_0x1edcd4);_0x8f6ae9['writeHead'](0x12e,{'location':_0x3798ab+'/sign-in?redirect='+_0x40e4e7}),_0x8f6ae9[_0x2bfa9b(0x178)]();return;}});_0x4c5786[_0x43bb91(0x17e)](0x0,'127.0.0.1',()=>{const _0x1cc2ce=_0x43bb91,_0x3fffa8=_0x4c5786[_0x1cc2ce(0x17c)]();_0x1edcd4=typeof _0x3fffa8===_0x1cc2ce(0x182)&&_0x3fffa8?_0x3fffa8[_0x1cc2ce(0x174)]:Number(_0x3fffa8);const _0x3a021c=_0x1cc2ce(0x168)+_0x1edcd4;!_0x5ee821&&(console[_0x1cc2ce(0x169)]('🔐\x20正在启动登录服务...'),console['log'](_0x1cc2ce(0x16a),_0x3a021c),console[_0x1cc2ce(0x169)](_0x1cc2ce(0x16e)),console[_0x1cc2ce(0x169)](''),console[_0x1cc2ce(0x169)](_0x1cc2ce(0x176)),console[_0x1cc2ce(0x169)]('')),openInBrowser(_0x3a021c)['then'](_0x2c57b9=>{const _0x5b202a=_0x1cc2ce;!_0x5ee821&&(_0x2c57b9?console['log'](_0x5b202a(0x181)):(console[_0x5b202a(0x169)](_0x5b202a(0x17b)),console[_0x5b202a(0x169)](_0x5b202a(0x185),_0x3a021c)),console['log'](''));})['catch'](()=>{const _0x33eb48=_0x1cc2ce;!_0x5ee821&&(console['log'](_0x33eb48(0x17b)),console[_0x33eb48(0x169)](_0x33eb48(0x185),_0x3a021c),console['log'](''));});}),_0x4c5786['on']('error',_0x43d905=>{const _0x1aff22=_0x43bb91;!_0x5ee821&&console[_0x1aff22(0x17d)](_0x1aff22(0x16d),_0x43d905),_0x4bec15(_0x43d905);});});}function openInBrowser(_0x1adcdd){return new Promise(_0x3fcdd4=>{const _0xde7e62=a26_0x2839,_0x32647b=process[_0xde7e62(0x186)];let _0x28a5f0;if(_0x32647b===_0xde7e62(0x175))_0x28a5f0=_0xde7e62(0x184)+_0x1adcdd+'\x22';else _0x32647b===_0xde7e62(0x17a)?_0x28a5f0='open\x20\x22'+_0x1adcdd+'\x22':_0x28a5f0='xdg-open\x20\x22'+_0x1adcdd+'\x22';exec(_0x28a5f0,_0x23bf5b=>{_0x23bf5b?_0x3fcdd4(![]):_0x3fcdd4(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x43dc44(0x169)](a26_0x43dc44(0x18b),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x2b2326=a27_0x3c8b;function a27_0x3c8b(_0x4e419a,_0x28d8c6){_0x4e419a=_0x4e419a-0x112;const _0x5e5442=a27_0x5e54();let _0x3c8ba7=_0x5e5442[_0x4e419a];return _0x3c8ba7;}(function(_0x16392c,_0x23fe86){const _0x51b45d=a27_0x3c8b,_0x49502e=_0x16392c();while(!![]){try{const _0x5f2368=-parseInt(_0x51b45d(0x114))/0x1*(parseInt(_0x51b45d(0x116))/0x2)+parseInt(_0x51b45d(0x118))/0x3+-parseInt(_0x51b45d(0x11a))/0x4+parseInt(_0x51b45d(0x117))/0x5*(parseInt(_0x51b45d(0x113))/0x6)+parseInt(_0x51b45d(0x119))/0x7+parseInt(_0x51b45d(0x11b))/0x8*(-parseInt(_0x51b45d(0x112))/0x9)+parseInt(_0x51b45d(0x11d))/0xa*(parseInt(_0x51b45d(0x115))/0xb);if(_0x5f2368===_0x23fe86)break;else _0x49502e['push'](_0x49502e['shift']());}catch(_0x3d0517){_0x49502e['push'](_0x49502e['shift']());}}}(a27_0x5e54,0x60f7a));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a27_0x2b2326(0x11c);export const cookieFile=configDir+a27_0x2b2326(0x11e);mkdirSync(configDir,{'recursive':!![]});function a27_0x5e54(){const _0x76ae5e=['1562388EPMsKY','88RNcwir','/.lovrabet','160ZfOTZk','/cookie','328239AcgSfZ','78cKhkQs','8PXnMjF','172535uMsWVN','134084EBptQQ','122885BWTOjM','1642881dyKAYh','4250428HCtcnT'];a27_0x5e54=function(){return _0x76ae5e;};return a27_0x5e54();}
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x309d(){var _0x39a473=['12226599CYxjuK','utf-8','91ftjIgF','20Plxvaq','16617260IKDSYN','40664WRcPjx','9xrvLlF','162684IaJDWo','196320Ylotwp','973nTpImT','7544xAgnFC','1733790encMyI','69tMJhmq','25VSpxeM'];a28_0x309d=function(){return _0x39a473;};return a28_0x309d();}(function(_0x117098,_0x12aebc){var _0x2b46d7=a28_0x21ca,_0x2e88dc=_0x117098();while(!![]){try{var _0x308cc8=-parseInt(_0x2b46d7(0x1c9))/0x1*(parseInt(_0x2b46d7(0x1cb))/0x2)+-parseInt(_0x2b46d7(0x1c4))/0x3*(parseInt(_0x2b46d7(0x1cd))/0x4)+parseInt(_0x2b46d7(0x1c5))/0x5*(parseInt(_0x2b46d7(0x1c3))/0x6)+-parseInt(_0x2b46d7(0x1cf))/0x7*(-parseInt(_0x2b46d7(0x1d0))/0x8)+parseInt(_0x2b46d7(0x1cc))/0x9*(parseInt(_0x2b46d7(0x1ca))/0xa)+-parseInt(_0x2b46d7(0x1c6))/0xb+parseInt(_0x2b46d7(0x1ce))/0xc*(parseInt(_0x2b46d7(0x1c8))/0xd);if(_0x308cc8===_0x12aebc)break;else _0x2e88dc['push'](_0x2e88dc['shift']());}catch(_0x6ffd04){_0x2e88dc['push'](_0x2e88dc['shift']());}}}(a28_0x309d,0xdb606));function a28_0x21ca(_0x361326,_0x2a475a){_0x361326=_0x361326-0x1c3;var _0x309d4e=a28_0x309d();var _0x21ca5f=_0x309d4e[_0x361326];return _0x21ca5f;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0xf18ef8=a28_0x21ca;try{return readFileSync(cookieFile,_0xf18ef8(0x1c7));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b4e63,_0x6144c7){const _0x59e88b=a29_0x3b32,_0x538cbd=_0x4b4e63();while(!![]){try{const _0x397347=-parseInt(_0x59e88b(0xf0))/0x1+-parseInt(_0x59e88b(0xf7))/0x2*(-parseInt(_0x59e88b(0xfb))/0x3)+parseInt(_0x59e88b(0xf6))/0x4+-parseInt(_0x59e88b(0xee))/0x5*(parseInt(_0x59e88b(0xf1))/0x6)+-parseInt(_0x59e88b(0xf4))/0x7+parseInt(_0x59e88b(0xf3))/0x8+parseInt(_0x59e88b(0xf8))/0x9;if(_0x397347===_0x6144c7)break;else _0x538cbd['push'](_0x538cbd['shift']());}catch(_0x15389c){_0x538cbd['push'](_0x538cbd['shift']());}}}(a29_0x3367,0x91255));function a29_0x3367(){const _0xfbe53f=['session','3Advhti','4830765iDIkyg','/api/auth/get-session','418378EbzyvV','6ysJemL','utf-8','8427984XfCSmj','7363615lRngVh','then','1448504bCOvUD','931886RGNGPt','10344834btnOmT','user'];a29_0x3367=function(){return _0xfbe53f;};return a29_0x3367();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a29_0x3b32(_0x2d4ff5,_0xdced7e){_0x2d4ff5=_0x2d4ff5-0xee;const _0x3367a7=a29_0x3367();let _0x3b327a=_0x3367a7[_0x2d4ff5];return _0x3b327a;}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xc32a75=a29_0x3b32;try{if(!existsSync(cookieFile))return![];const _0x479684=readFileSync(cookieFile,_0xc32a75(0xf2)),_0x3b9e50=await fetch(getUserDomain()+_0xc32a75(0xef),{'headers':{'cookie':_0x479684}})[_0xc32a75(0xf5)](_0x20474e=>_0x20474e['json']());return _0x3b9e50&&_0x3b9e50[_0xc32a75(0xfa)]&&_0x3b9e50[_0xc32a75(0xf9)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1dfd05,_0x5ef246){var _0x588ac3=a30_0x5bbe,_0x234a83=_0x1dfd05();while(!![]){try{var _0x5ca011=parseInt(_0x588ac3(0x72))/0x1*(parseInt(_0x588ac3(0x74))/0x2)+-parseInt(_0x588ac3(0x75))/0x3+-parseInt(_0x588ac3(0x76))/0x4*(parseInt(_0x588ac3(0x79))/0x5)+-parseInt(_0x588ac3(0x77))/0x6*(-parseInt(_0x588ac3(0x73))/0x7)+parseInt(_0x588ac3(0x7b))/0x8+parseInt(_0x588ac3(0x7a))/0x9*(-parseInt(_0x588ac3(0x78))/0xa)+-parseInt(_0x588ac3(0x70))/0xb;if(_0x5ca011===_0x5ef246)break;else _0x234a83['push'](_0x234a83['shift']());}catch(_0x3bb4df){_0x234a83['push'](_0x234a83['shift']());}}}(a30_0x19a1,0xae58f));function a30_0x5bbe(_0x4b3a7e,_0xcb2329){_0x4b3a7e=_0x4b3a7e-0x70;var _0x19a167=a30_0x19a1();var _0x5bbe9f=_0x19a167[_0x4b3a7e];return _0x5bbe9f;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x5ecfbe=a30_0x5bbe;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5ecfbe(0x71)](_0x5ecfbe(0x7c))):console[_0x5ecfbe(0x71)]('!\x20当前未登录');}function a30_0x19a1(){var _0x12594f=['14JuUvrF','634378LWmney','956193vmQZjV','5106292ocvwPr','3773418QIrjzn','230XlmJbO','5WLzzqN','76023cvxvUX','10621992WapaxH','✓\x20已退出登录','4389352ocTQbV','log','1dYjSWL'];a30_0x19a1=function(){return _0x12594f;};return a30_0x19a1();}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a31_0x23c084=a31_0x5ad8;function a31_0x5ad8(_0x24321e,_0x2efd11){_0x24321e=_0x24321e-0xb9;const _0x56c995=a31_0x56c9();let _0x5ad810=_0x56c995[_0x24321e];return _0x5ad810;}(function(_0x1f84b6,_0xd9bb4){const _0x58b0b9=a31_0x5ad8,_0x15808d=_0x1f84b6();while(!![]){try{const _0x47fec1=parseInt(_0x58b0b9(0xc2))/0x1+-parseInt(_0x58b0b9(0xc0))/0x2*(-parseInt(_0x58b0b9(0xc5))/0x3)+parseInt(_0x58b0b9(0xbf))/0x4*(parseInt(_0x58b0b9(0xbb))/0x5)+parseInt(_0x58b0b9(0xc6))/0x6*(-parseInt(_0x58b0b9(0xbd))/0x7)+parseInt(_0x58b0b9(0xc3))/0x8*(-parseInt(_0x58b0b9(0xc1))/0x9)+parseInt(_0x58b0b9(0xb9))/0xa*(-parseInt(_0x58b0b9(0xba))/0xb)+-parseInt(_0x58b0b9(0xbc))/0xc*(-parseInt(_0x58b0b9(0xbe))/0xd);if(_0x47fec1===_0xd9bb4)break;else _0x15808d['push'](_0x15808d['shift']());}catch(_0x1e5a34){_0x15808d['push'](_0x15808d['shift']());}}}(a31_0x56c9,0x44267));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a31_0x23c084(0xc4)}};function a31_0x56c9(){const _0x674d99=['259cAvVbR','25272LfBiol','1564iSbZxI','180710eeFKxW','116307ghIQIW','52681KziYch','264Qebtib','boolean','18Bqvtzf','43248pfOtdP','10whYGsx','1024738wHrnyc','2215XQpcSv','1836gFRodw'];a31_0x56c9=function(){return _0x674d99;};return a31_0x56c9();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a32_0xdfb557=a32_0x3843;(function(_0x2448e5,_0x29948c){const _0xedf56f=a32_0x3843,_0x3733c=_0x2448e5();while(!![]){try{const _0x4753dc=-parseInt(_0xedf56f(0xf2))/0x1*(-parseInt(_0xedf56f(0x110))/0x2)+parseInt(_0xedf56f(0xfb))/0x3*(parseInt(_0xedf56f(0xfc))/0x4)+-parseInt(_0xedf56f(0xdb))/0x5*(parseInt(_0xedf56f(0xe1))/0x6)+parseInt(_0xedf56f(0xf1))/0x7*(parseInt(_0xedf56f(0xd3))/0x8)+-parseInt(_0xedf56f(0xee))/0x9*(parseInt(_0xedf56f(0xd1))/0xa)+parseInt(_0xedf56f(0xf3))/0xb*(parseInt(_0xedf56f(0xc7))/0xc)+-parseInt(_0xedf56f(0x108))/0xd;if(_0x4753dc===_0x29948c)break;else _0x3733c['push'](_0x3733c['shift']());}catch(_0x1dc6d6){_0x3733c['push'](_0x3733c['shift']());}}}(a32_0x24e8,0x62897));import{jsx as a32_0x3a6eca}from'react/jsx-runtime';import a32_0x5b9511 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';function a32_0x3843(_0x3a20bd,_0x2c30ec){_0x3a20bd=_0x3a20bd-0xc5;const _0x24e88b=a32_0x24e8();let _0x384364=_0x24e88b[_0x3a20bd];return _0x384364;}import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a32_0xdfb557(0xce)))[a32_0xdfb557(0xeb)];}catch{}function a32_0x24e8(){const _0x22b2b9=['antigravity','codex','help','./skills/main.js','flags','codebuddy','trae','windsurf','qoder','logs','执行配置\x20MCP\x20命令','8580364fHZxGX','length','cwd','create','boolean','clear','opencode','input','20392wQlBcf','argv','agent','执行预览命令','install','exit','mcpClaude','menu-update-cdn','cline','trim','error','336jzWqxz','lovrabet\x20','LOVRABET_CI','./mcp/mcp-install-non-interactive.js','preview','api','watch','./cli-flags.js','cursor','other','7268900DVbCZr','true','1428008UMGKau','env','执行安装技能包命令','setLogPath','push','mcp','add-page','info','2325hQbDlp','logout','执行添加页面命令','add','mcpOther','page','1206HnbSnS','auth','start','stdout','skill-install','mcpCursor','join','menu','执行启动命令','init','dynamicCliFlags','./skills/skill-install-non-interactive.js','--help','9mbLVhE','claude','同步菜单命令','7PmGUIr','59iCeXhN','315799BksFlh','非交互模式创建项目:\x20','string','all','build','setRawCommand','isTTY','\x20(监听模式)','900219jFeGYw','4vSIWdk'];a32_0x24e8=function(){return _0x22b2b9;};return a32_0x24e8();}const mergedFlags={...dynamicCliFlags||{}};function isNonInteractiveMode(_0x1dd6cc){const _0x3b15ca=a32_0xdfb557;return!!(_0x1dd6cc['nonInteractive']||_0x1dd6cc['ci']||process[_0x3b15ca(0xd4)][_0x3b15ca(0xc9)]===_0x3b15ca(0xd2)||process[_0x3b15ca(0xd4)]['CI']===_0x3b15ca(0xd2)||!process[_0x3b15ca(0xe4)][_0x3b15ca(0xf9)]);}const cli=a32_0x5b9511('\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20//\x20包含\x20Backend\x20Function\x20同步工作流\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a',{'importMeta':import.meta,'flags':{'name':{'type':a32_0xdfb557(0xf5)},'clear':{'type':a32_0xdfb557(0x10c)},'env':{'type':a32_0xdfb557(0xf5)},'watch':{'type':a32_0xdfb557(0x10c)},'help':{'type':'boolean'},'appcode':{'type':a32_0xdfb557(0xf5)},'output':{'type':a32_0xdfb557(0xf5)},'params':{'type':a32_0xdfb557(0xf5)},'datasetcode':{'type':'string'},'mcpCursor':{'type':a32_0xdfb557(0x10c)},'mcpClaude':{'type':a32_0xdfb557(0x10c)},'mcpOther':{'type':'boolean'},'cursor':{'type':a32_0xdfb557(0x10c)},'windsurf':{'type':a32_0xdfb557(0x10c)},'claude':{'type':a32_0xdfb557(0x10c)},'cline':{'type':a32_0xdfb557(0x10c)},'codex':{'type':a32_0xdfb557(0x10c)},'opencode':{'type':a32_0xdfb557(0x10c)},'qoder':{'type':a32_0xdfb557(0x10c)},'codebuddy':{'type':'boolean'},'trae':{'type':a32_0xdfb557(0x10c)},'agent':{'type':a32_0xdfb557(0x10c)},'antigravity':{'type':a32_0xdfb557(0x10c)},'all':{'type':a32_0xdfb557(0x10c)},'nonInteractive':{'type':'boolean'},'ci':{'type':'boolean'},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x19bd63=a32_0xdfb557,_0x31145d=cli['input'][0x0],_0x3ab621=cli[_0x19bd63(0x10f)][0x1],_0x3b5db1=cli[_0x19bd63(0x10f)][0x2],_0x323719=(_0x19bd63(0xc8)+process[_0x19bd63(0x111)]['slice'](0x2)[_0x19bd63(0xe7)]('\x20'))[_0x19bd63(0xc5)]();logger[_0x19bd63(0xf8)](_0x323719);switch(_0x31145d){case _0x19bd63(0xea):{const _0x323987=cli['flags']['appcode'],_0x3de812=cli[_0x19bd63(0x101)][_0x19bd63(0xd4)];logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0xea),'执行初始化配置命令'),render(a32_0x3a6eca(Init,{'appcode':_0x323987,'env':_0x3de812}));break;}case _0x19bd63(0x10b):{const _0x13062b=cli[_0x19bd63(0x10f)][0x1]?.[_0x19bd63(0xc5)](),_0x4186e2=cli[_0x19bd63(0x101)]['env'],_0xe550b0=isNonInteractiveMode(cli['flags']);if(_0xe550b0&&_0x13062b){logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0x10b),_0x19bd63(0xf4)+_0x13062b);const {createProjectNonInteractive:_0x1d0b99}=await import('./create-app/non-interactive.js');await _0x1d0b99(_0x13062b,_0x4186e2);}else render(a32_0x3a6eca(CreateApp,{'projectCode':_0x13062b,'env':_0x4186e2}));break;}case _0x19bd63(0xde):{cli[_0x19bd63(0x10f)][0x1]===_0x19bd63(0xe0)&&(logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xd9),_0x19bd63(0xdd)),render(a32_0x3a6eca(AddPage,{})));break;}case _0x19bd63(0xe3):{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xe3),_0x19bd63(0xe9)),await runStart();}catch(_0x40c901){console[_0x19bd63(0xc6)](_0x40c901),process[_0x19bd63(0x115)](0x1);}break;}case'build':{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xf7),'执行构建命令'),await runBuild();}catch(_0x5f4e08){console[_0x19bd63(0xc6)](_0x5f4e08),process[_0x19bd63(0x115)](0x1);}break;}case _0x19bd63(0xcb):{const _0x25c2cb=cli[_0x19bd63(0x101)][_0x19bd63(0xcd)];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0xcb),_0x19bd63(0x113)+(_0x25c2cb?_0x19bd63(0xfa):''));if(_0x25c2cb)try{await Promise[_0x19bd63(0xf6)]([runBuildWatch(),runPreview()]);}catch(_0x18c42b){console['error'](_0x18c42b),process[_0x19bd63(0x115)](0x1);}else try{await runPreview();}catch(_0x582c1){console[_0x19bd63(0xc6)](_0x582c1),process[_0x19bd63(0x115)](0x1);}break;}case'config':{render(a32_0x3a6eca(Config,{'cli':cli}));break;}case _0x19bd63(0xcc):{await apiCli(cli);break;}case _0x19bd63(0xe2):{render(a32_0x3a6eca(AuthServer,{}));break;}case _0x19bd63(0xe8):{if(_0x3ab621==='update'){logger['setLogPath'](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0x117),'执行更新菜单\x20CDN\x20资源命令'),render(a32_0x3a6eca(AppMenuUpdateCdn,{}));break;}else logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)]('menu-sync',_0x19bd63(0xf0)),render(a32_0x3a6eca(AppMenuSyncUI,{}));break;}case _0x19bd63(0xdc):{logout();break;}case _0x19bd63(0xd8):{const _0x3d8877=cli[_0x19bd63(0x10f)][0x1];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]());if(_0x3d8877==='install'){const _0x1e7add=[];if(cli[_0x19bd63(0x101)][_0x19bd63(0xe6)]||cli['flags']['cursor'])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x116)]||cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xef));if(cli['flags'][_0x19bd63(0xdf)])_0x1e7add['push'](_0x19bd63(0xd0));logger['info']('mcp-install',_0x19bd63(0x107),{'preselected':_0x1e7add});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x1e7add[_0x19bd63(0x109)]>0x0){const {installMcpNonInteractive:_0x1b98a7}=await import(_0x19bd63(0xca));await _0x1b98a7(_0x1e7add);}else render(a32_0x3a6eca(McpInstallUI,{'preselectedIDEs':_0x1e7add}));}else _0x3d8877===_0x19bd63(0xed)||cli[_0x19bd63(0x101)]['help']?await mcpCommand(_0x3d8877,[],{'help':!![]}):await mcpCommand(_0x3d8877,[],cli[_0x19bd63(0x101)]);break;}case'skill':{const _0x1f2ade=cli[_0x19bd63(0x10f)][0x1];logger['setLogPath'](process[_0x19bd63(0x10a)]());if(_0x1f2ade===_0x19bd63(0x114)){const _0x4899bf=[];if(cli[_0x19bd63(0x101)]['all'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf),_0x19bd63(0x104),'claude','cline','codex',_0x19bd63(0x10e),_0x19bd63(0x105),_0x19bd63(0x102),'trae',_0x19bd63(0x112),_0x19bd63(0xfd));else{if(cli['flags']['cursor'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x104)])_0x4899bf[_0x19bd63(0xd7)]('windsurf');if(cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x4899bf['push'](_0x19bd63(0xef));if(cli[_0x19bd63(0x101)][_0x19bd63(0x118)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x118));if(cli['flags'][_0x19bd63(0xfe)])_0x4899bf[_0x19bd63(0xd7)]('codex');if(cli[_0x19bd63(0x101)][_0x19bd63(0x10e)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x10e));if(cli[_0x19bd63(0x101)][_0x19bd63(0x105)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x105));if(cli['flags'][_0x19bd63(0x102)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x102));if(cli[_0x19bd63(0x101)][_0x19bd63(0x103)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x103));if(cli['flags'][_0x19bd63(0x112)])_0x4899bf['push'](_0x19bd63(0x112));if(cli[_0x19bd63(0x101)][_0x19bd63(0xfd)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xfd));}const {getAllProvidedFlags:_0x44ed30}=await import(_0x19bd63(0x100)),_0x492303=_0x44ed30(cli[_0x19bd63(0x101)]);logger[_0x19bd63(0xda)](_0x19bd63(0xe5),_0x19bd63(0xd5),{'preselected':_0x4899bf,'providedFlags':_0x492303});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x4899bf[_0x19bd63(0x109)]>0x0){const {installSkillsNonInteractive:_0x146b12}=await import(_0x19bd63(0xec));await _0x146b12(_0x4899bf,_0x492303);}else render(a32_0x3a6eca(SkillInstallUI,{'preselectedIDEs':_0x4899bf,'providedFlags':_0x492303}));}else _0x1f2ade==='--help'||cli['flags'][_0x19bd63(0xff)]?await skillsCommand(_0x1f2ade,[],{'help':!![]}):await skillsCommand(_0x1f2ade,[],cli[_0x19bd63(0x101)]);break;}case _0x19bd63(0x106):{cli['flags'][_0x19bd63(0x10d)]?clearLogs():showLogs();break;}default:render(a32_0x3a6eca(Help,{}));break;}}
|
|
2
|
+
const a32_0x271113=a32_0x15eb;(function(_0x1f9862,_0x573cc9){const _0x23f479=a32_0x15eb,_0x7f73f8=_0x1f9862();while(!![]){try{const _0x10575a=-parseInt(_0x23f479(0x15f))/0x1+parseInt(_0x23f479(0x184))/0x2+parseInt(_0x23f479(0x17b))/0x3*(parseInt(_0x23f479(0x175))/0x4)+-parseInt(_0x23f479(0x171))/0x5*(-parseInt(_0x23f479(0x15c))/0x6)+-parseInt(_0x23f479(0x18e))/0x7*(-parseInt(_0x23f479(0x153))/0x8)+-parseInt(_0x23f479(0x172))/0x9+-parseInt(_0x23f479(0x156))/0xa;if(_0x10575a===_0x573cc9)break;else _0x7f73f8['push'](_0x7f73f8['shift']());}catch(_0x4175f3){_0x7f73f8['push'](_0x7f73f8['shift']());}}}(a32_0x467e,0x6884c));import{jsx as a32_0x5dfcd7}from'react/jsx-runtime';import a32_0x52e7aa from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';function a32_0x15eb(_0xde451a,_0x567a19){_0xde451a=_0xde451a-0x140;const _0x467e95=a32_0x467e();let _0x15ebab=_0x467e95[_0xde451a];return _0x15ebab;}import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a32_0x271113(0x18b)))['dynamicCliFlags'];}catch{}const mergedFlags={...dynamicCliFlags||{}};function isNonInteractiveMode(_0xa712df){const _0x4f5a20=a32_0x271113;return!!(_0xa712df[_0x4f5a20(0x145)]||_0xa712df['ci']||process['env']['LOVRABET_CI']==='true'||process[_0x4f5a20(0x185)]['CI']===_0x4f5a20(0x181)||!process[_0x4f5a20(0x16a)][_0x4f5a20(0x16e)]);}const cli=a32_0x52e7aa(a32_0x271113(0x191),{'importMeta':import.meta,'flags':{'name':{'type':a32_0x271113(0x157)},'clear':{'type':'boolean'},'env':{'type':a32_0x271113(0x157)},'watch':{'type':a32_0x271113(0x143)},'help':{'type':a32_0x271113(0x143)},'appcode':{'type':a32_0x271113(0x157)},'output':{'type':a32_0x271113(0x157)},'params':{'type':'string'},'datasetcode':{'type':a32_0x271113(0x157)},'mcpCursor':{'type':a32_0x271113(0x143)},'mcpClaude':{'type':a32_0x271113(0x143)},'mcpOther':{'type':a32_0x271113(0x143)},'cursor':{'type':a32_0x271113(0x143)},'windsurf':{'type':a32_0x271113(0x143)},'claude':{'type':a32_0x271113(0x143)},'cline':{'type':a32_0x271113(0x143)},'codex':{'type':'boolean'},'opencode':{'type':a32_0x271113(0x143)},'qoder':{'type':'boolean'},'codebuddy':{'type':'boolean'},'trae':{'type':a32_0x271113(0x143)},'agent':{'type':a32_0x271113(0x143)},'antigravity':{'type':a32_0x271113(0x143)},'all':{'type':'boolean'},'nonInteractive':{'type':a32_0x271113(0x143)},'ci':{'type':a32_0x271113(0x143)},...mergedFlags},'autoVersion':!![]});function a32_0x467e(){const _0x14e7ef=['claude','执行预览命令','15035nhnOCZ','join','./create-app/non-interactive.js','input','mcpClaude','非交互模式创建项目:\x20','menu-update-cdn','执行配置\x20MCP\x20命令','preview','cline','qoder','stdout','\x20(监听模式)','start','./mcp/mcp-install-non-interactive.js','isTTY','info','opencode','1303465kynRSM','3189492iBOxui','执行启动命令','trim','7220gdHjzE','agent','setLogPath','trae','flags','mcpOther','1083mCdmuV','logs','cursor','setRawCommand','clear','push','true','appcode','all','37060CqMOUS','env','help','api','config','menu-sync','other','./cli-flags.js','./skills/skill-install-non-interactive.js','codex','7yiiXfc','create','menu','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20//\x20包含\x20Backend\x20Function\x20同步工作流\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','update','antigravity','slice','auth','boolean','执行添加页面命令','nonInteractive','同步菜单命令','--help','windsurf','add-page','install','lovrabet\x20','exit','build','logout','page','skill','mcp','cwd','1919032YQUnWU','add','执行更新菜单\x20CDN\x20资源命令','6338690KCzLRB','string','codebuddy','length','mcpCursor','error','12UatZlk'];a32_0x467e=function(){return _0x14e7ef;};return a32_0x467e();}await run();async function run(){const _0x40238f=a32_0x271113,_0x9288b3=cli[_0x40238f(0x162)][0x0],_0x373d39=cli[_0x40238f(0x162)][0x1],_0x138a6a=cli['input'][0x2],_0x494a84=(_0x40238f(0x14b)+process['argv'][_0x40238f(0x141)](0x2)[_0x40238f(0x160)]('\x20'))[_0x40238f(0x174)]();logger[_0x40238f(0x17e)](_0x494a84);switch(_0x9288b3){case'init':{const _0x5398c8=cli['flags'][_0x40238f(0x182)],_0x145b78=cli[_0x40238f(0x179)][_0x40238f(0x185)];logger[_0x40238f(0x177)](process[_0x40238f(0x152)]()),logger[_0x40238f(0x16f)]('init','执行初始化配置命令'),render(a32_0x5dfcd7(Init,{'appcode':_0x5398c8,'env':_0x145b78}));break;}case _0x40238f(0x18f):{const _0x3e77bd=cli[_0x40238f(0x162)][0x1]?.[_0x40238f(0x174)](),_0x24a330=cli[_0x40238f(0x179)][_0x40238f(0x185)],_0x2649c5=isNonInteractiveMode(cli[_0x40238f(0x179)]);if(_0x2649c5&&_0x3e77bd){logger['setLogPath'](process[_0x40238f(0x152)]()),logger[_0x40238f(0x16f)]('create',_0x40238f(0x164)+_0x3e77bd);const {createProjectNonInteractive:_0x1acbcd}=await import(_0x40238f(0x161));await _0x1acbcd(_0x3e77bd,_0x24a330);}else render(a32_0x5dfcd7(CreateApp,{'projectCode':_0x3e77bd,'env':_0x24a330}));break;}case _0x40238f(0x154):{cli[_0x40238f(0x162)][0x1]===_0x40238f(0x14f)&&(logger[_0x40238f(0x177)](process[_0x40238f(0x152)]()),logger[_0x40238f(0x16f)](_0x40238f(0x149),_0x40238f(0x144)),render(a32_0x5dfcd7(AddPage,{})));break;}case _0x40238f(0x16c):{try{logger[_0x40238f(0x177)](process['cwd']()),logger['info'](_0x40238f(0x16c),_0x40238f(0x173)),await runStart();}catch(_0x18be36){console[_0x40238f(0x15b)](_0x18be36),process['exit'](0x1);}break;}case _0x40238f(0x14d):{try{logger[_0x40238f(0x177)](process[_0x40238f(0x152)]()),logger['info'](_0x40238f(0x14d),'执行构建命令'),await runBuild();}catch(_0x10826a){console[_0x40238f(0x15b)](_0x10826a),process[_0x40238f(0x14c)](0x1);}break;}case _0x40238f(0x167):{const _0x2d5cb9=cli['flags']['watch'];logger[_0x40238f(0x177)](process[_0x40238f(0x152)]()),logger[_0x40238f(0x16f)](_0x40238f(0x167),_0x40238f(0x15e)+(_0x2d5cb9?_0x40238f(0x16b):''));if(_0x2d5cb9)try{await Promise[_0x40238f(0x183)]([runBuildWatch(),runPreview()]);}catch(_0x4173af){console[_0x40238f(0x15b)](_0x4173af),process[_0x40238f(0x14c)](0x1);}else try{await runPreview();}catch(_0x1ebe68){console['error'](_0x1ebe68),process[_0x40238f(0x14c)](0x1);}break;}case _0x40238f(0x188):{render(a32_0x5dfcd7(Config,{'cli':cli}));break;}case _0x40238f(0x187):{await apiCli(cli);break;}case _0x40238f(0x142):{render(a32_0x5dfcd7(AuthServer,{}));break;}case _0x40238f(0x190):{if(_0x373d39===_0x40238f(0x192)){logger[_0x40238f(0x177)](process['cwd']()),logger[_0x40238f(0x16f)](_0x40238f(0x165),_0x40238f(0x155)),render(a32_0x5dfcd7(AppMenuUpdateCdn,{}));break;}else logger[_0x40238f(0x177)](process['cwd']()),logger[_0x40238f(0x16f)](_0x40238f(0x189),_0x40238f(0x146)),render(a32_0x5dfcd7(AppMenuSyncUI,{}));break;}case _0x40238f(0x14e):{logout();break;}case _0x40238f(0x151):{const _0x2a8de8=cli[_0x40238f(0x162)][0x1];logger[_0x40238f(0x177)](process[_0x40238f(0x152)]());if(_0x2a8de8===_0x40238f(0x14a)){const _0x27caa6=[];if(cli[_0x40238f(0x179)][_0x40238f(0x15a)]||cli[_0x40238f(0x179)][_0x40238f(0x17d)])_0x27caa6[_0x40238f(0x180)](_0x40238f(0x17d));if(cli[_0x40238f(0x179)][_0x40238f(0x163)]||cli['flags']['claude'])_0x27caa6[_0x40238f(0x180)]('claude');if(cli[_0x40238f(0x179)][_0x40238f(0x17a)])_0x27caa6[_0x40238f(0x180)](_0x40238f(0x18a));logger[_0x40238f(0x16f)]('mcp-install',_0x40238f(0x166),{'preselected':_0x27caa6});if(isNonInteractiveMode(cli['flags'])&&_0x27caa6[_0x40238f(0x159)]>0x0){const {installMcpNonInteractive:_0x1b9b71}=await import(_0x40238f(0x16d));await _0x1b9b71(_0x27caa6);}else render(a32_0x5dfcd7(McpInstallUI,{'preselectedIDEs':_0x27caa6}));}else _0x2a8de8===_0x40238f(0x147)||cli[_0x40238f(0x179)][_0x40238f(0x186)]?await mcpCommand(_0x2a8de8,[],{'help':!![]}):await mcpCommand(_0x2a8de8,[],cli[_0x40238f(0x179)]);break;}case _0x40238f(0x150):{const _0x4e041d=cli['input'][0x1];logger[_0x40238f(0x177)](process[_0x40238f(0x152)]());if(_0x4e041d==='install'){const _0x2f9767=[];if(cli[_0x40238f(0x179)]['all'])_0x2f9767['push'](_0x40238f(0x17d),_0x40238f(0x148),_0x40238f(0x15d),_0x40238f(0x168),'codex',_0x40238f(0x170),_0x40238f(0x169),_0x40238f(0x158),_0x40238f(0x178),_0x40238f(0x176),_0x40238f(0x140));else{if(cli['flags'][_0x40238f(0x17d)])_0x2f9767['push']('cursor');if(cli[_0x40238f(0x179)][_0x40238f(0x148)])_0x2f9767[_0x40238f(0x180)]('windsurf');if(cli['flags'][_0x40238f(0x15d)])_0x2f9767['push'](_0x40238f(0x15d));if(cli[_0x40238f(0x179)]['cline'])_0x2f9767[_0x40238f(0x180)](_0x40238f(0x168));if(cli[_0x40238f(0x179)][_0x40238f(0x18d)])_0x2f9767['push'](_0x40238f(0x18d));if(cli['flags'][_0x40238f(0x170)])_0x2f9767[_0x40238f(0x180)](_0x40238f(0x170));if(cli['flags']['qoder'])_0x2f9767['push'](_0x40238f(0x169));if(cli['flags'][_0x40238f(0x158)])_0x2f9767[_0x40238f(0x180)](_0x40238f(0x158));if(cli[_0x40238f(0x179)][_0x40238f(0x178)])_0x2f9767['push'](_0x40238f(0x178));if(cli[_0x40238f(0x179)]['agent'])_0x2f9767[_0x40238f(0x180)](_0x40238f(0x176));if(cli[_0x40238f(0x179)][_0x40238f(0x140)])_0x2f9767[_0x40238f(0x180)](_0x40238f(0x140));}const {getAllProvidedFlags:_0x1a2b2d}=await import('./skills/main.js'),_0x3ef788=_0x1a2b2d(cli['flags']);logger[_0x40238f(0x16f)]('skill-install','执行安装技能包命令',{'preselected':_0x2f9767,'providedFlags':_0x3ef788});if(isNonInteractiveMode(cli[_0x40238f(0x179)])&&_0x2f9767[_0x40238f(0x159)]>0x0){const {installSkillsNonInteractive:_0x17d09a}=await import(_0x40238f(0x18c));await _0x17d09a(_0x2f9767,_0x3ef788);}else render(a32_0x5dfcd7(SkillInstallUI,{'preselectedIDEs':_0x2f9767,'providedFlags':_0x3ef788}));}else _0x4e041d===_0x40238f(0x147)||cli[_0x40238f(0x179)][_0x40238f(0x186)]?await skillsCommand(_0x4e041d,[],{'help':!![]}):await skillsCommand(_0x4e041d,[],cli[_0x40238f(0x179)]);break;}case _0x40238f(0x17c):{cli[_0x40238f(0x179)][_0x40238f(0x17f)]?clearLogs():showLogs();break;}default:render(a32_0x5dfcd7(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a33_0x3e16(_0x4fca8,_0xff14ab){_0x4fca8=_0x4fca8-0x70;const _0x292a96=a33_0x292a();let _0x3e168d=_0x292a96[_0x4fca8];return _0x3e168d;}(function(_0x1785c2,_0xbe51a4){const _0x2de650=a33_0x3e16,_0x1a86c5=_0x1785c2();while(!![]){try{const _0x23f6fd=parseInt(_0x2de650(0x74))/0x1*(parseInt(_0x2de650(0x70))/0x2)+-parseInt(_0x2de650(0x72))/0x3*(parseInt(_0x2de650(0x7a))/0x4)+-parseInt(_0x2de650(0x7b))/0x5*(parseInt(_0x2de650(0x80))/0x6)+parseInt(_0x2de650(0x7e))/0x7*(-parseInt(_0x2de650(0x77))/0x8)+-parseInt(_0x2de650(0x7c))/0x9+parseInt(_0x2de650(0x82))/0xa+parseInt(_0x2de650(0x84))/0xb;if(_0x23f6fd===_0xbe51a4)break;else _0x1a86c5['push'](_0x1a86c5['shift']());}catch(_0x178980){_0x1a86c5['push'](_0x1a86c5['shift']());}}}(a33_0x292a,0xeb2f6));function a33_0x292a(){const _0x4c6b06=['1208001cffMzG','--watch','2uIrpke','close','npm\x20run\x20build\x20exited\x20with\x20code\x20','2299808SFwXEQ','PATH','cwd','8QFGTHh','5KxLikf','8152128tjmVVw','vite','7AatetT','node_modules','11234352jjQXbY','build','13862000zCYhxJ','error','23240514WqcLEM','env','1335338WRcBbk','inherit'];a33_0x292a=function(){return _0x4c6b06;};return a33_0x292a();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x30671d,_0x148477)=>{const _0x16b74a=a33_0x3e16,_0x401a1f=spawn(_0x16b74a(0x7d),[_0x16b74a(0x81),_0x16b74a(0x73)],{'stdio':_0x16b74a(0x71),'shell':!![],'env':{...process[_0x16b74a(0x85)],'PATH':''+join(process[_0x16b74a(0x79)](),_0x16b74a(0x7f),'.bin')+delimiter+process[_0x16b74a(0x85)][_0x16b74a(0x78)]}});_0x401a1f['on'](_0x16b74a(0x75),_0x47a9b8=>{const _0x5798dd=_0x16b74a;if(_0x47a9b8===0x0||_0x47a9b8===null)_0x30671d();else _0x148477(new Error(_0x5798dd(0x76)+_0x47a9b8));}),_0x401a1f['on'](_0x16b74a(0x83),_0x148477);});}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14b039,_0x3b1aae){const _0x1c9e65=a34_0x5c79,_0x103da7=_0x14b039();while(!![]){try{const _0x4a7050=-parseInt(_0x1c9e65(0x81))/0x1+parseInt(_0x1c9e65(0x73))/0x2+parseInt(_0x1c9e65(0x71))/0x3+parseInt(_0x1c9e65(0x82))/0x4+parseInt(_0x1c9e65(0x83))/0x5*(-parseInt(_0x1c9e65(0x75))/0x6)+-parseInt(_0x1c9e65(0x74))/0x7+parseInt(_0x1c9e65(0x79))/0x8;if(_0x4a7050===_0x3b1aae)break;else _0x103da7['push'](_0x103da7['shift']());}catch(_0x464345){_0x103da7['push'](_0x103da7['shift']());}}}(a34_0x2ab8,0xa718b));import{delimiter,join}from'node:path';function a34_0x5c79(_0x16ac7f,_0x20c314){_0x16ac7f=_0x16ac7f-0x6a;const _0x2ab83a=a34_0x2ab8();let _0x5c796b=_0x2ab83a[_0x16ac7f];return _0x5c796b;}function a34_0x2ab8(){const _0x1fed47=['run','node_modules','info','close','项目构建出错','项目构建成功','error','1203947UKVNff','466872cBioCA','167070ljhQJD','cwd','开始构建项目','trim','message','npm','env','toString','inherit','stderr','success','npm\x20run\x20build','2385072nqdSdm','npm\x20run\x20build\x20exited\x20with\x20code\x20','1897246VsIyXz','7876673nuNKLX','138TwvgUw','项目构建失败','now','build','15374160lEwQWd'];a34_0x2ab8=function(){return _0x1fed47;};return a34_0x2ab8();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x4335ef,_0x2d1e26)=>{const _0x28c15f=a34_0x5c79,_0x1bf7fd=Date[_0x28c15f(0x77)]();logger[_0x28c15f(0x7c)](_0x28c15f(0x78),_0x28c15f(0x85),{'command':_0x28c15f(0x70)});let _0x45fc35='';const _0x40fd45=spawn(_0x28c15f(0x6a),[_0x28c15f(0x7a),_0x28c15f(0x78)],{'stdio':[_0x28c15f(0x6d),_0x28c15f(0x6d),'pipe'],'shell':!![],'env':{...process[_0x28c15f(0x6b)],'PATH':''+join(process[_0x28c15f(0x84)](),_0x28c15f(0x7b),'.bin')+delimiter+process[_0x28c15f(0x6b)]['PATH']}});_0x40fd45[_0x28c15f(0x6e)]?.['on']('data',_0x485ac0=>{const _0x49167e=_0x28c15f;_0x45fc35+=_0x485ac0[_0x49167e(0x6c)]();}),_0x40fd45['on'](_0x28c15f(0x7d),_0x2212ff=>{const _0x21ee09=_0x28c15f,_0x29735c=Date['now']()-_0x1bf7fd;if(_0x2212ff===0x0||_0x2212ff===null)logger[_0x21ee09(0x6f)](_0x21ee09(0x78),_0x21ee09(0x7f),_0x29735c),_0x4335ef();else{const _0xad7ebd={'exitCode':_0x2212ff,'duration':_0x29735c,'command':'npm\x20run\x20build','cwd':process['cwd']()};_0x45fc35[_0x21ee09(0x86)]()&&(_0xad7ebd[_0x21ee09(0x6e)]=_0x45fc35[_0x21ee09(0x86)]()),logger[_0x21ee09(0x80)](_0x21ee09(0x78),_0x21ee09(0x76),_0xad7ebd),_0x2d1e26(new Error(_0x21ee09(0x72)+_0x2212ff));}}),_0x40fd45['on'](_0x28c15f(0x80),_0x4ed1ee=>{const _0x42170d=_0x28c15f,_0x4f4464=Date[_0x42170d(0x77)]()-_0x1bf7fd;logger[_0x42170d(0x80)](_0x42170d(0x78),_0x42170d(0x7e),{'error':_0x4ed1ee[_0x42170d(0x87)],'duration':_0x4f4464,'stderr':_0x45fc35[_0x42170d(0x86)]()||undefined}),_0x2d1e26(_0x4ed1ee);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4485dc,_0x52e62f){const _0xc682fd=a35_0x1d49,_0x5cadfd=_0x4485dc();while(!![]){try{const _0x457e2a=-parseInt(_0xc682fd(0x17e))/0x1+parseInt(_0xc682fd(0x182))/0x2+-parseInt(_0xc682fd(0x185))/0x3+-parseInt(_0xc682fd(0x192))/0x4+-parseInt(_0xc682fd(0x189))/0x5*(parseInt(_0xc682fd(0x195))/0x6)+parseInt(_0xc682fd(0x184))/0x7+-parseInt(_0xc682fd(0x194))/0x8*(-parseInt(_0xc682fd(0x18b))/0x9);if(_0x457e2a===_0x52e62f)break;else _0x5cadfd['push'](_0x5cadfd['shift']());}catch(_0x2de34c){_0x5cadfd['push'](_0x5cadfd['shift']());}}}(a35_0x4168,0x96b60));import{logger}from'../utils/logger.js';export function showLogs(){const _0x4fe9a6=a35_0x1d49;logger['setLogPath'](process[_0x4fe9a6(0x18f)]());const _0x43f67a=logger[_0x4fe9a6(0x18c)]();if(_0x43f67a[_0x4fe9a6(0x17f)]===0x0){console['log'](_0x4fe9a6(0x196));return;}console[_0x4fe9a6(0x18a)](_0x4fe9a6(0x197)),_0x43f67a[_0x4fe9a6(0x181)]((_0xad944b,_0x18c69e)=>{const _0x653fde=_0x4fe9a6,_0x5c06c3=new Date(_0xad944b[_0x653fde(0x186)])['toLocaleString'](_0x653fde(0x188)),_0x4206f6=_0xad944b[_0x653fde(0x180)]===_0x653fde(0x193)?'√':_0xad944b[_0x653fde(0x180)]===_0x653fde(0x18d)?'×':_0xad944b[_0x653fde(0x180)]==='warn'?'!':'i';console[_0x653fde(0x18a)](_0x18c69e+0x1+'.\x20'+_0x4206f6+'\x20['+_0xad944b[_0x653fde(0x17d)]+']\x20'+_0xad944b[_0x653fde(0x190)]),console['log'](_0x653fde(0x191)+_0x5c06c3),_0xad944b[_0x653fde(0x187)]&&console['log']('\x20\x20\x20耗时:\x20'+_0xad944b[_0x653fde(0x187)]+'ms'),_0xad944b[_0x653fde(0x18e)]&&Object['keys'](_0xad944b['details'])['length']>0x0&&console['log']('\x20\x20\x20详情:\x20'+JSON[_0x653fde(0x183)](_0xad944b[_0x653fde(0x18e)],null,0x2)),console[_0x653fde(0x18a)]('');});}export function clearLogs(){const _0x3b2d2c=a35_0x1d49;logger[_0x3b2d2c(0x198)](process[_0x3b2d2c(0x18f)]()),logger['clearLogs'](),console[_0x3b2d2c(0x18a)](_0x3b2d2c(0x199));}function a35_0x1d49(_0x6dc5d,_0x118ef8){_0x6dc5d=_0x6dc5d-0x17d;const _0x4168ff=a35_0x4168();let _0x1d4903=_0x4168ff[_0x6dc5d];return _0x1d4903;}function a35_0x4168(){const _0x26a656=['3534270SrcPFg','timestamp','duration','zh-CN','138155oXRoGC','log','1398726VqCums','readLogs','error','details','cwd','message','\x20\x20\x20时间:\x20','327108QJPAvb','success','144mPAQWE','246IJAxet','*\x20暂无日志记录','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','setLogPath','*\x20日志已清空','command','154716pPlSbF','length','level','forEach','362040vDzopF','stringify','1304058pcvdAX'];a35_0x4168=function(){return _0x26a656;};return a35_0x4168();}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bdd50,_0x1e5bdd){const _0x193830=a36_0x37ec,_0x434608=_0x4bdd50();while(!![]){try{const _0x15b6af=parseInt(_0x193830(0x13c))/0x1*(-parseInt(_0x193830(0x133))/0x2)+-parseInt(_0x193830(0x13e))/0x3*(parseInt(_0x193830(0x13f))/0x4)+-parseInt(_0x193830(0x146))/0x5+parseInt(_0x193830(0x14b))/0x6+parseInt(_0x193830(0x144))/0x7*(parseInt(_0x193830(0x148))/0x8)+-parseInt(_0x193830(0x147))/0x9+parseInt(_0x193830(0x14c))/0xa;if(_0x15b6af===_0x1e5bdd)break;else _0x434608['push'](_0x434608['shift']());}catch(_0x27ffd8){_0x434608['push'](_0x434608['shift']());}}}(a36_0x3dba,0xea82f));function a36_0x37ec(_0x148fcd,_0x370ed9){_0x148fcd=_0x148fcd-0x12a;const _0x3dbabc=a36_0x3dba();let _0x37ec8c=_0x3dbabc[_0x148fcd];return _0x37ec8c;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a36_0x3dba(){const _0x20a11b=['启动预览服务器','cwd','toString','预览服务器启动成功','431025zbqCtq','vite\x20preview\x20exited\x20with\x20code\x20','2362075rsiGYC','12286926BnTTfU','40cRjbta','error','pipe','9732156DwNsnh','33261000wNVfDQ','close','vite','now','预览服务器启动出错','预览服务器启动失败','env','vite\x20preview','preview','node_modules','15834bntxXw','data','stderr','success','info','.bin','PATH','trim','inherit','123cOmrBc','message','3DdvzXx','5936088zPBsRe'];a36_0x3dba=function(){return _0x20a11b;};return a36_0x3dba();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x2e8aff,_0xa5ee10)=>{const _0x50c06e=a36_0x37ec,_0x4dd57a=Date['now']();logger[_0x50c06e(0x137)](_0x50c06e(0x131),_0x50c06e(0x140),{'command':_0x50c06e(0x130)});let _0x24743f='';const _0x528235=spawn(_0x50c06e(0x12b),['preview'],{'stdio':[_0x50c06e(0x13b),_0x50c06e(0x13b),_0x50c06e(0x14a)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x50c06e(0x141)](),_0x50c06e(0x132),_0x50c06e(0x138))+delimiter+process[_0x50c06e(0x12f)][_0x50c06e(0x139)]}});_0x528235[_0x50c06e(0x135)]?.['on'](_0x50c06e(0x134),_0xa5a062=>{const _0x48a919=_0x50c06e;_0x24743f+=_0xa5a062[_0x48a919(0x142)]();}),_0x528235['on'](_0x50c06e(0x12a),_0x99ba6c=>{const _0x480837=_0x50c06e,_0x2b5238=Date[_0x480837(0x12c)]()-_0x4dd57a;if(_0x99ba6c===0x0||_0x99ba6c===null)logger[_0x480837(0x136)](_0x480837(0x131),_0x480837(0x143),_0x2b5238),_0x2e8aff();else{const _0x1aa758={'exitCode':_0x99ba6c,'duration':_0x2b5238,'command':'vite\x20preview','cwd':process[_0x480837(0x141)]()};_0x24743f[_0x480837(0x13a)]()&&(_0x1aa758[_0x480837(0x135)]=_0x24743f['trim']()),logger[_0x480837(0x149)](_0x480837(0x131),_0x480837(0x12e),_0x1aa758),_0xa5ee10(new Error(_0x480837(0x145)+_0x99ba6c));}}),_0x528235['on'](_0x50c06e(0x149),_0x34251b=>{const _0x5215fb=_0x50c06e,_0x1ed430=Date[_0x5215fb(0x12c)]()-_0x4dd57a;logger[_0x5215fb(0x149)](_0x5215fb(0x131),_0x5215fb(0x12d),{'error':_0x34251b[_0x5215fb(0x13d)],'duration':_0x1ed430,'stderr':_0x24743f[_0x5215fb(0x13a)]()||undefined}),_0xa5ee10(_0x34251b);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30c546,_0x37cf01){const _0x3a2b85=a37_0x20da,_0x3a9c43=_0x30c546();while(!![]){try{const _0x38d523=parseInt(_0x3a2b85(0x150))/0x1+parseInt(_0x3a2b85(0x151))/0x2*(parseInt(_0x3a2b85(0x166))/0x3)+-parseInt(_0x3a2b85(0x14c))/0x4*(-parseInt(_0x3a2b85(0x157))/0x5)+parseInt(_0x3a2b85(0x155))/0x6+-parseInt(_0x3a2b85(0x156))/0x7*(-parseInt(_0x3a2b85(0x144))/0x8)+parseInt(_0x3a2b85(0x149))/0x9+-parseInt(_0x3a2b85(0x15e))/0xa;if(_0x38d523===_0x37cf01)break;else _0x3a9c43['push'](_0x3a9c43['shift']());}catch(_0x4f57c4){_0x3a9c43['push'](_0x3a9c43['shift']());}}}(a37_0x393d,0x6ee38));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a37_0x393d(){const _0x8f3e2b=['pipe','PATH','144099TOOsol','开发服务器启动成功','CLI\x20版本有更新','16wiUAYw','start','env','stderr','554969QLUsWB','5062VEciPz','version','vite','warn','5104134AuwtBd','7noLPbO','940mekCNn','inherit','close','success','data','now','SDK\x20版本有更新','14825310tiOlMg','cwd','trim','node_modules','.bin','开发服务器启动出错','stableVersion','开发服务器启动失败','69HzzuYu','info','3648776lancYf','write','启动开发服务器'];a37_0x393d=function(){return _0x8f3e2b;};return a37_0x393d();}import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a37_0x20da(_0x3abc26,_0x2c129a){_0x3abc26=_0x3abc26-0x144;const _0x393dab=a37_0x393d();let _0x20da6a=_0x393dab[_0x3abc26];return _0x20da6a;}import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x138048){const _0x77c89d=a37_0x20da,_0x457319=Date[_0x77c89d(0x15c)](),_0x3a42db=_0x138048||process[_0x77c89d(0x15f)](),_0x2e71e6=await checkCliVersion();_0x2e71e6['needsUpgrade']&&(printCliUpgradeWarning(_0x2e71e6),logger[_0x77c89d(0x154)]('start',_0x77c89d(0x14b),{'currentVersion':_0x2e71e6['currentVersion'],'stableVersion':_0x2e71e6[_0x77c89d(0x164)]}));const _0x400580=await checkSdkVersion(_0x3a42db);_0x400580['needsUpgrade']&&(printSdkUpgradeWarning(_0x400580),logger['warn'](_0x77c89d(0x14d),_0x77c89d(0x15d),{'currentVersion':_0x400580[_0x77c89d(0x152)],'stableVersion':_0x400580['stableVersion']}));logger[_0x77c89d(0x167)](_0x77c89d(0x14d),_0x77c89d(0x146),{'command':_0x77c89d(0x153),'cwd':_0x3a42db});let _0x7272e3='';const _0x482849=spawn(_0x77c89d(0x153),{'stdio':[_0x77c89d(0x158),'inherit',_0x77c89d(0x147)],'shell':!![],'cwd':_0x3a42db,'env':{...process[_0x77c89d(0x14e)],'PATH':''+join(_0x3a42db,_0x77c89d(0x161),_0x77c89d(0x162))+delimiter+process[_0x77c89d(0x14e)][_0x77c89d(0x148)]}});return _0x482849['stderr']?.['on'](_0x77c89d(0x15b),_0xd53a20=>{const _0x2a0a3a=_0x77c89d,_0x466c09=_0xd53a20['toString']();_0x7272e3+=_0x466c09,process[_0x2a0a3a(0x14f)][_0x2a0a3a(0x145)](_0x466c09);}),new Promise((_0xf38e97,_0x5d74bf)=>{const _0x58d8e5=_0x77c89d;_0x482849['on'](_0x58d8e5(0x159),_0x53f58d=>{const _0x19c344=_0x58d8e5,_0x27c8ea=Date['now']()-_0x457319;if(_0x53f58d===0x0||_0x53f58d===null)logger[_0x19c344(0x15a)](_0x19c344(0x14d),_0x19c344(0x14a),_0x27c8ea),_0xf38e97();else{const _0x4f2382={'exitCode':_0x53f58d,'duration':_0x27c8ea,'command':_0x19c344(0x153),'cwd':_0x3a42db};_0x7272e3[_0x19c344(0x160)]()&&(_0x4f2382[_0x19c344(0x14f)]=_0x7272e3[_0x19c344(0x160)]()),logger['error']('start',_0x19c344(0x165),_0x4f2382),_0x5d74bf(new Error('vite\x20exited\x20with\x20code\x20'+_0x53f58d));}}),_0x482849['on']('error',_0x249c36=>{const _0x42dde3=_0x58d8e5,_0x498d82=Date[_0x42dde3(0x15c)]()-_0x457319,_0x3fc5a3={'error':_0x249c36['message'],'duration':_0x498d82,'command':_0x42dde3(0x153),'cwd':_0x3a42db};_0x7272e3[_0x42dde3(0x160)]()&&(_0x3fc5a3[_0x42dde3(0x14f)]=_0x7272e3[_0x42dde3(0x160)]()),logger['error'](_0x42dde3(0x14d),_0x42dde3(0x163),_0x3fc5a3),_0x5d74bf(_0x249c36);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52d4f9,_0x565f05){const _0x2f5520=a38_0x4a60,_0x5d8482=_0x52d4f9();while(!![]){try{const _0x3c9092=parseInt(_0x2f5520(0x8f))/0x1*(parseInt(_0x2f5520(0x97))/0x2)+parseInt(_0x2f5520(0x96))/0x3*(parseInt(_0x2f5520(0xa4))/0x4)+-parseInt(_0x2f5520(0xa5))/0x5*(-parseInt(_0x2f5520(0x9b))/0x6)+-parseInt(_0x2f5520(0x9a))/0x7+parseInt(_0x2f5520(0xa6))/0x8*(-parseInt(_0x2f5520(0x9f))/0x9)+-parseInt(_0x2f5520(0x9d))/0xa+-parseInt(_0x2f5520(0xa7))/0xb*(-parseInt(_0x2f5520(0x99))/0xc);if(_0x3c9092===_0x565f05)break;else _0x5d8482['push'](_0x5d8482['shift']());}catch(_0x1af934){_0x5d8482['push'](_0x5d8482['shift']());}}}(a38_0x5011,0x225a3));function a38_0x5011(){const _0x4f8088=['44152SasJnD','2509177AXdYed','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description','获取配置项','设置环境\x20(online/daily)','1iDsVpY','gray','column','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','map','80196uPOYPT','431754MGHRaU','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','12sVlAhd','1406531RcBrWi','138CFrzEC','列出所有配置项','1025400QYRtrL','配置当前项目的\x20App\x20Code','207FjRdZI','无效的命令,可用命令如下:','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','command','设置配置项','8acuvwP','16015jztNbE'];a38_0x5011=function(){return _0x4f8088;};return a38_0x5011();}function a38_0x4a60(_0xbc1698,_0x44961c){_0xbc1698=_0xbc1698-0x8c;const _0x50116b=a38_0x5011();let _0x4a607c=_0x50116b[_0xbc1698];return _0x4a607c;}import{jsxs as a38_0x4c4790,jsx as a38_0x3d84e2}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2c914e=a38_0x4a60,_0x252fe0=[{'command':_0x2c914e(0xa8),'description':_0x2c914e(0xa3)},{'command':_0x2c914e(0x98),'description':_0x2c914e(0x8d)},{'command':_0x2c914e(0x93),'description':_0x2c914e(0x9c)}],_0x2ff052=[{'command':_0x2c914e(0xa1),'description':_0x2c914e(0x9e)},{'command':_0x2c914e(0x92),'description':_0x2c914e(0x8e)}];return a38_0x4c4790(Box,{'flexDirection':_0x2c914e(0x91),'marginTop':0x1,'marginBottom':0x1,'children':[a38_0x3d84e2(Box,{'marginBottom':0x1,'children':a38_0x4c4790(Text,{'color':_0x2c914e(0x90),'children':['\x20!','\x20\x20',_0x2c914e(0xa0)]})}),_0x252fe0['map'](_0x6a0506=>a38_0x4c4790(Box,{'children':[a38_0x4c4790(Text,{'children':[_0x2c914e(0x94),_0x6a0506['command']]}),a38_0x3d84e2(Text,{'color':_0x2c914e(0x90),'children':_0x6a0506['description']})]},_0x6a0506[_0x2c914e(0xa2)])),a38_0x3d84e2(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a38_0x3d84e2(Text,{'color':_0x2c914e(0x90),'children':'\x20*\x20配置示例:'})}),_0x2ff052[_0x2c914e(0x95)](_0x4e3283=>a38_0x4c4790(Box,{'children':[a38_0x4c4790(Text,{'children':[_0x2c914e(0x94),_0x4e3283[_0x2c914e(0xa2)]]}),a38_0x3d84e2(Text,{'color':_0x2c914e(0x90),'children':_0x4e3283[_0x2c914e(0x8c)]})]},_0x4e3283[_0x2c914e(0xa2)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3caa0d,_0x1bf2c5){const _0x40bbfa=a39_0x5653,_0x39c9cc=_0x3caa0d();while(!![]){try{const _0x2a45c1=-parseInt(_0x40bbfa(0x19e))/0x1*(-parseInt(_0x40bbfa(0x1a2))/0x2)+parseInt(_0x40bbfa(0x1b4))/0x3*(parseInt(_0x40bbfa(0x191))/0x4)+parseInt(_0x40bbfa(0x194))/0x5*(parseInt(_0x40bbfa(0x1a4))/0x6)+-parseInt(_0x40bbfa(0x1a9))/0x7*(-parseInt(_0x40bbfa(0x1ae))/0x8)+parseInt(_0x40bbfa(0x198))/0x9+parseInt(_0x40bbfa(0x192))/0xa+-parseInt(_0x40bbfa(0x1a3))/0xb;if(_0x2a45c1===_0x1bf2c5)break;else _0x39c9cc['push'](_0x39c9cc['shift']());}catch(_0x21e485){_0x39c9cc['push'](_0x39c9cc['shift']());}}}(a39_0x3b17,0xa777d));import{jsx as a39_0x12bef6,jsxs as a39_0x1de45f}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a39_0x3b17(){const _0x2750eb=['456210RnqIIp','unlinkSync','log','保存配置失败:\x20','get','parse','1EqNOlr','环境配置已设置为:\x20','undefined','includes','1498194TdLeHT','28116737ccNEim','24anYSQq','help','stringify','online','list','210oyItMw','input','red','mkdirSync','utf8','21936JSDuDu','未提供配置值','flags','error','config','length','318LTHgFJ','message','--help','保存配置失败','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','appcode','daily','env','app','25156ccftBE','7232510IQLpeS','.tmp','1212605rNyfjN','renameSync','set','配置值无效或过长'];a39_0x3b17=function(){return _0x2750eb;};return a39_0x3b17();}import a39_0x2f6331 from'node:fs';import a39_0x154508 from'node:path';function a39_0x5653(_0x4eefa1,_0xdc018d){_0x4eefa1=_0x4eefa1-0x18b;const _0x3b17e8=a39_0x3b17();let _0x565395=_0x3b17e8[_0x4eefa1];return _0x565395;}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(_0x577a04){const _0x3e1c13=a39_0x5653,{cli:_0x286dad}=_0x577a04,_0xa106a9=_0x286dad[_0x3e1c13(0x1aa)][0x1],_0x106911=_0x286dad['input'][0x2],_0x2c3aff=[_0x3e1c13(0x196),_0x3e1c13(0x19c)]['includes'](_0xa106a9||''),_0x74c9fd=_0x286dad[_0x3e1c13(0x1aa)]['length']>=0x3;if(_0x106911===_0x3e1c13(0x1b6)||_0x286dad[_0x3e1c13(0x1b0)][_0x3e1c13(0x1a5)])return a39_0x12bef6(ConfigHelp,{});const _0xc591db=readConfig();if(_0xa106a9===_0x3e1c13(0x196)){if(_0x106911){const _0x455c1d=_0x286dad[_0x3e1c13(0x1aa)][0x3];if(typeof _0x455c1d!==_0x3e1c13(0x1a0)){if(_0x106911==='env'&&![_0x3e1c13(0x1a7),_0x3e1c13(0x18e)][_0x3e1c13(0x1a1)](_0x455c1d))return a39_0x12bef6(Box,{'children':a39_0x12bef6(Text,{'color':'red','children':_0x3e1c13(0x18c)})});const _0x4dc118=isInProject(),_0x3686dc=_0x4dc118?projectConfigPath:globalConfigPath;let _0x4a5493={};try{if(existsSync(_0x3686dc)){const _0x453755=readFileSync(_0x3686dc,{'encoding':_0x3e1c13(0x1ad)});_0x453755&&(_0x4a5493=JSON[_0x3e1c13(0x19d)](_0x453755));}}catch(_0x3de8ed){}if(typeof _0x455c1d!=='string'||_0x455c1d[_0x3e1c13(0x1b3)]>0x1f4)return a39_0x12bef6(Box,{'children':a39_0x12bef6(Text,{'color':_0x3e1c13(0x1ab),'children':_0x3e1c13(0x197)})});let _0x14a112=_0x106911;_0x106911==='app'&&(_0x14a112=_0x3e1c13(0x18d),delete _0x4a5493[_0x3e1c13(0x190)]);_0x106911==='appcode'&&delete _0x4a5493[_0x3e1c13(0x190)];_0x4a5493[_0x14a112]=_0x455c1d;try{const _0x2d51fb=a39_0x154508['dirname'](_0x3686dc);!existsSync(_0x2d51fb)&&a39_0x2f6331[_0x3e1c13(0x1ac)](_0x2d51fb,{'recursive':!![]});const _0x117427=_0x3686dc+_0x3e1c13(0x193);writeFileSync(_0x117427,JSON[_0x3e1c13(0x1a6)](_0x4a5493,null,0x2),{'encoding':'utf8','mode':0x180}),a39_0x2f6331[_0x3e1c13(0x195)](_0x117427,_0x3686dc);if(_0x106911===_0x3e1c13(0x18f)){const _0x4161f7=_0x4dc118?'项目':'全局';console[_0x3e1c13(0x19a)]('✓\x20'+_0x4161f7+_0x3e1c13(0x19f)+_0x455c1d);}}catch(_0x2a9573){const _0x2b6b7d=_0x3686dc+_0x3e1c13(0x193);try{existsSync(_0x2b6b7d)&&a39_0x2f6331[_0x3e1c13(0x199)](_0x2b6b7d);}catch(_0x1469ee){}return logger[_0x3e1c13(0x1b1)](_0x3e1c13(0x1b2),_0x3e1c13(0x18b),{'error':_0x2a9573 instanceof Error?_0x2a9573[_0x3e1c13(0x1b5)]:String(_0x2a9573),'configKey':_0x106911,'configValue':_0x455c1d,'targetConfigPath':_0x3686dc}),a39_0x12bef6(Box,{'children':a39_0x1de45f(Text,{'color':_0x3e1c13(0x1ab),'children':[_0x3e1c13(0x19b),_0x2a9573 instanceof Error?_0x2a9573['message']:String(_0x2a9573)]})});}return null;}return a39_0x12bef6(Box,{'children':a39_0x12bef6(Text,{'color':_0x3e1c13(0x1ab),'children':_0x3e1c13(0x1af)})});}}if(_0xa106a9===_0x3e1c13(0x19c)){if(_0x106911){let _0x1e966f=_0x106911;return _0x106911===_0x3e1c13(0x190)&&(_0x1e966f=_0x3e1c13(0x18d)),console[_0x3e1c13(0x19a)](_0xc591db[_0x1e966f]||_0x3e1c13(0x1a0)),null;}return null;}if(_0xa106a9===_0x3e1c13(0x1a8))return console[_0x3e1c13(0x19a)](JSON[_0x3e1c13(0x1a6)](_0xc591db,null,0x2)),null;if(!_0x2c3aff||!_0x74c9fd)return a39_0x12bef6(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a40_0x4983(){const _0x5cc8d5=['39554NvCknw','2375616ModaQr','https://api.lovrabet.com','https://daily-api.lovrabet.com','330FtFoUI','1531458DAovvc','8478BBduAJ','https://user-daily.lovrabet.com','85130mXietR','https://user.lovrabet.com','42ABFHIY','online','8XpBGli','81529sWKgTq','75sutemv','130110eRfXbp','44ljVHFq'];a40_0x4983=function(){return _0x5cc8d5;};return a40_0x4983();}const a40_0x31bac8=a40_0x347d;function a40_0x347d(_0x2f8726,_0x539c11){_0x2f8726=_0x2f8726-0x99;const _0x498334=a40_0x4983();let _0x347d11=_0x498334[_0x2f8726];return _0x347d11;}(function(_0x5c567e,_0x3ccad0){const _0x576037=a40_0x347d,_0x3d5a68=_0x5c567e();while(!![]){try{const _0x416609=-parseInt(_0x576037(0xa0))/0x1+-parseInt(_0x576037(0xa6))/0x2*(-parseInt(_0x576037(0x9d))/0x3)+parseInt(_0x576037(0x9f))/0x4*(parseInt(_0x576037(0x9e))/0x5)+parseInt(_0x576037(0x99))/0x6*(parseInt(_0x576037(0x9c))/0x7)+-parseInt(_0x576037(0x9b))/0x8*(parseInt(_0x576037(0xa5))/0x9)+-parseInt(_0x576037(0xa8))/0xa*(parseInt(_0x576037(0xa4))/0xb)+parseInt(_0x576037(0xa1))/0xc;if(_0x416609===_0x3ccad0)break;else _0x3d5a68['push'](_0x3d5a68['shift']());}catch(_0x48d2ab){_0x3d5a68['push'](_0x3d5a68['shift']());}}}(a40_0x4983,0x32710));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a40_0x31bac8(0x9a)?a40_0x31bac8(0xa9):a40_0x31bac8(0xa7);export const getApiDomain=()=>getEnv()===a40_0x31bac8(0x9a)?a40_0x31bac8(0xa2):a40_0x31bac8(0xa3);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a41_0x49dbac=a41_0x4e6c;function a41_0x55c1(){const _0x253ee7=['388lNNvuA','464583LJdsDu','11685990qaRtvM','1876330MUVoHQ','4939CVynfA','env','356902VwecBD','8tBYZIE','12UcqrcN','LOVRABET_ENV','5485632EYBjgn','4025790qATYxj'];a41_0x55c1=function(){return _0x253ee7;};return a41_0x55c1();}(function(_0x393271,_0x335f19){const _0x1ea3b=a41_0x4e6c,_0xfb3014=_0x393271();while(!![]){try{const _0x1560a6=-parseInt(_0x1ea3b(0x101))/0x1*(parseInt(_0x1ea3b(0xfd))/0x2)+parseInt(_0x1ea3b(0xfe))/0x3*(-parseInt(_0x1ea3b(0x105))/0x4)+parseInt(_0x1ea3b(0x100))/0x5+parseInt(_0x1ea3b(0xfb))/0x6+-parseInt(_0x1ea3b(0x103))/0x7+parseInt(_0x1ea3b(0x104))/0x8*(-parseInt(_0x1ea3b(0xfc))/0x9)+parseInt(_0x1ea3b(0xff))/0xa;if(_0x1560a6===_0x335f19)break;else _0xfb3014['push'](_0xfb3014['shift']());}catch(_0x35daa2){_0xfb3014['push'](_0xfb3014['shift']());}}}(a41_0x55c1,0x83204));let env=process[a41_0x49dbac(0x102)][a41_0x49dbac(0x106)]||'online';export function getEnv(){return env;}function a41_0x4e6c(_0x44d1f2,_0x3d455c){_0x44d1f2=_0x44d1f2-0xfb;const _0x55c1d0=a41_0x55c1();let _0x4e6c8e=_0x55c1d0[_0x44d1f2];return _0x4e6c8e;}export function initEnv(_0x527379){env=_0x527379;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x5e6f98=a42_0x2ebf;(function(_0x1c4b42,_0x2c7a2b){const _0x3c13ad=a42_0x2ebf,_0x51b946=_0x1c4b42();while(!![]){try{const _0x142024=-parseInt(_0x3c13ad(0x1b7))/0x1+parseInt(_0x3c13ad(0x1ca))/0x2*(parseInt(_0x3c13ad(0x1ec))/0x3)+parseInt(_0x3c13ad(0x1aa))/0x4*(parseInt(_0x3c13ad(0x1d4))/0x5)+parseInt(_0x3c13ad(0x1fd))/0x6+-parseInt(_0x3c13ad(0x1e0))/0x7*(-parseInt(_0x3c13ad(0x1c6))/0x8)+-parseInt(_0x3c13ad(0x1b0))/0x9*(-parseInt(_0x3c13ad(0x1b5))/0xa)+-parseInt(_0x3c13ad(0x1d5))/0xb*(parseInt(_0x3c13ad(0x1b6))/0xc);if(_0x142024===_0x2c7a2b)break;else _0x51b946['push'](_0x51b946['shift']());}catch(_0x2e711c){_0x51b946['push'](_0x51b946['shift']());}}}(a42_0x23cd,0xa2887));import{jsx as a42_0x18e0d9,jsxs as a42_0x2d3dcc,Fragment as a42_0x3567db}from'react/jsx-runtime';import{useState}from'react';function a42_0x2ebf(_0x2c4aa9,_0x174090){_0x2c4aa9=_0x2c4aa9-0x1a2;const _0x23cd59=a42_0x23cd();let _0x2ebf9a=_0x23cd59[_0x2c4aa9];return _0x2ebf9a;}import{Text,Box,useInput}from'ink';function a42_0x23cd(){const _0x3bc038=['绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','yellow','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','step','codebuddy','login-process','white','map','size','3758178mWWPBZ','slice','agent','test','\x20个\x20IDE','cyan','\x20+MCP','\x20检查中...','blue','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','app-code','登录失败','creating','green','from','12VHDpSp','*\x20应用AppCode\x20','resolve','length','antigravity','\x20直接回车确认,或输入自定义名称','11658456zSfRnQ','qoder','login-prompt','env','*\x20正在检查登录状态...','10SFMZlt','12QpzDWV','1222803vNrrjw','windsurf','rightArrow','登录状态','cline','add','return','backspace','includes','项目名不合法','leftArrow','*\x20正在创建项目...','confirm-api-pull','trim','应用AppCode','1144PfnWfF','gray','project-name','Yes','3498yCQjty','column','opencode','*\x20是否要自动拉取\x20API\x20配置?','[✓]','online','has','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','delete','未设置','1767515ByJDTV','26237629gTFgEc','trae','upArrow','*\x20项目名:\x20','\x20\x20使用\x20←→\x20选择,回车确认','lovrabet-setup','MCP\x20和\x20Skill','选择要配置的\x20IDE:','login-check','[\x20]','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','59283RhdduQ','string','项目名长度不能超过\x2050\x20个字符','api-pull','[可选]:\x20','lovrabet-setup-selection','red','value','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','login','label','\x22\x20已存在,请使用其他名称','138bnJLTk','cursor','claude','*\x20是否要先登录以便拉取\x20API\x20配置?','my-app','filter','项目名','\x20←\x20'];a42_0x23cd=function(){return _0x3bc038;};return a42_0x23cd();}import{existsSync}from'node:fs';import a42_0x4a9f9c from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{IDE_CONFIGS,MCP_IDES}from'../utils/ai_config.js';const UI_IDE_CONFIGS=IDE_CONFIGS,UI_IDE_LIST=[a42_0x5e6f98(0x1ae),a42_0x5e6f98(0x1ee),a42_0x5e6f98(0x1bb),a42_0x5e6f98(0x1f8),'codex',a42_0x5e6f98(0x1ed),a42_0x5e6f98(0x1cc),a42_0x5e6f98(0x1b1),a42_0x5e6f98(0x1d6),a42_0x5e6f98(0x1b8),a42_0x5e6f98(0x1ff)],UI_MCP_IDES=new Set(Array[a42_0x5e6f98(0x1a9)](MCP_IDES));export function EnhancedGuidedCreate(_0x54d712){const _0x1a21c4=a42_0x5e6f98,{onCreate:_0x2972cf,env:_0xcc856c}=_0x54d712,[_0x33e085,_0x4690d0]=useState(_0x1a21c4(0x1c8)),[_0x47add7,_0x130ebf]=useState(''),[_0x33402f,_0x3fcc32]=useState(''),[_0x77f488,_0x39cf58]=useState(''),[_0x201d0c,_0x38fa1a]=useState(''),[_0x4c8336,_0x1a9e90]=useState([]),[_0xcce10,_0x3a301f]=useState(null),[_0x4ab234,_0x3ee9ed]=useState(![]),[_0xf6e309,_0x179d31]=useState(![]),[_0x418cf7,_0x3df540]=useState(![]),[_0xbcb563,_0x257c4f]=useState(0x0),[_0x365830,_0x28b453]=useState(0x0),[_0x42e343,_0x14ddf0]=useState(0x0),[_0x5e6b15,_0x47e93b]=useState(![]),[_0x260944,_0x395c35]=useState(new Set()),[_0x1f2d71,_0x17ae53]=useState(0x0),[_0xfa22b8,_0x345cc7]=useState(''),_0x4d9251=_0x1a21c4(0x1f0),_0x591456=readConfig(),_0x435003=typeof _0x591456['env']===_0x1a21c4(0x1e1)?_0x591456[_0x1a21c4(0x1b3)]:undefined;function _0x91c92f(_0x57dae7){const _0x25b185=_0x1a21c4,_0x3fd217=_0x57dae7||_0x4d9251,_0x56f161=a42_0x4a9f9c[_0x25b185(0x1ac)](process['cwd'](),_0x3fd217);return existsSync(_0x56f161);}function _0x1d9f1d(_0x1f6344){const _0x1b68b2=_0x1a21c4;if(_0x1f6344['length']>0x32)return{'valid':![],'message':_0x1b68b2(0x1e2)};const _0x31ed7c=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1f6344?.[_0x1b68b2(0x1c4)]()&&!_0x31ed7c[_0x1b68b2(0x200)](_0x1f6344))return{'valid':![],'message':_0x1b68b2(0x1e8)};return{'valid':!![]};}function _0x24cf39(_0x1147c4){const _0x32f058=_0x1a21c4;if(!_0x1147c4['trim']())return{'valid':!![]};if(_0x1147c4[_0x32f058(0x1ad)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0xa5826a=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0xa5826a['test'](_0x1147c4))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x5531e0(){_0x3ee9ed(!![]);try{const _0x5ee85a=await getIsSessionValid();return _0x3a301f(_0x5ee85a),_0x5ee85a;}catch(_0x2d245a){return _0x3a301f(![]),![];}finally{_0x3ee9ed(![]);}}async function _0x57b1d6(){_0x179d31(!![]);try{const _0x2ffbf3=await authServer({'silent':!![]});return _0x3a301f(_0x2ffbf3),_0x2ffbf3;}catch(_0x247c1f){return _0x3a301f(![]),![];}finally{_0x179d31(![]);}}return useInput(async(_0x32b188,_0x15c71d)=>{const _0xa39779=_0x1a21c4;if(_0x15c71d[_0xa39779(0x1c1)]||_0x15c71d[_0xa39779(0x1b9)]){if(_0x33e085===_0xa39779(0x1c3)){_0x257c4f(_0x2fc1de=>_0x2fc1de===0x0?0x1:0x0);return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x14ddf0(_0x5c2d91=>_0x5c2d91===0x0?0x1:0x0);return;}_0x47e93b(![]);return;}if(_0x33e085===_0xa39779(0x1b2)){_0x28b453(_0x2206e0=>_0x2206e0===0x0?0x1:0x0);return;}}if(_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){if(_0x15c71d[_0xa39779(0x1d7)]){_0x17ae53(_0x10820d=>_0x10820d>0x0?_0x10820d-0x1:UI_IDE_LIST[_0xa39779(0x1ad)]-0x1);return;}if(_0x15c71d['downArrow']){_0x17ae53(_0x416095=>_0x416095<UI_IDE_LIST['length']-0x1?_0x416095+0x1:0x0);return;}}if(_0x32b188==='\x20'&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x11f4a4=>{const _0xcf00ab=_0xa39779,_0x3c6595=new Set(_0x11f4a4);return _0x3c6595['has'](_0x1f2d71)?_0x3c6595[_0xcf00ab(0x1d2)](_0x1f2d71):_0x3c6595['add'](_0x1f2d71),_0x3c6595;}),_0x38fa1a('');return;}if((_0x32b188==='a'||_0x32b188==='A')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(new Set(UI_IDE_LIST[_0xa39779(0x1fb)]((_0x5c26db,_0x1ff8db)=>_0x1ff8db))),_0x38fa1a('');return;}if((_0x32b188==='i'||_0x32b188==='I'||_0x32b188==='r'||_0x32b188==='R')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x5b6876=>{const _0x5c2d8d=_0xa39779,_0x2c8fd1=new Set();for(let _0x2ed009=0x0;_0x2ed009<UI_IDE_LIST[_0x5c2d8d(0x1ad)];_0x2ed009++){!_0x5b6876['has'](_0x2ed009)&&_0x2c8fd1[_0x5c2d8d(0x1bc)](_0x2ed009);}return _0x2c8fd1;});return;}if(_0x15c71d[_0xa39779(0x1bd)]){if(_0x33e085===_0xa39779(0x1c8)){const _0x556d6a=_0x77f488['trim']()||_0x4d9251;if(_0x201d0c)return;if(_0x91c92f(_0x556d6a)){_0x345cc7('目录\x20\x22'+_0x556d6a+_0xa39779(0x1eb));return;}_0x130ebf(_0x556d6a),_0x1a9e90([{'step':_0xa39779(0x1c8),'label':_0xa39779(0x1f2),'value':_0x556d6a}]),_0x39cf58(''),_0x38fa1a(''),_0x345cc7(''),_0x4690d0(_0xa39779(0x1a5));return;}if(_0x33e085===_0xa39779(0x1a5)){if(_0x201d0c)return;const _0x18ccce=_0x77f488[_0xa39779(0x1c4)]();_0x3fcc32(_0x18ccce),_0x1a9e90(_0x2b35c7=>[..._0x2b35c7,{'step':_0xa39779(0x1a5),'label':_0xa39779(0x1c5),'value':_0x18ccce||_0xa39779(0x1d3)}]),_0x39cf58(''),_0x38fa1a('');if(_0x18ccce){_0x4690d0('login-check');const _0x54c54c=await _0x5531e0();_0x54c54c?_0x4690d0(_0xa39779(0x1c3)):_0x4690d0(_0xa39779(0x1b2));}else{const _0x3bc0b5=_0xcc856c||_0x435003||'online';_0x2972cf({'projectName':_0x47add7,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x3bc0b5}),_0x4690d0(_0xa39779(0x1a7));}return;}if(_0x33e085===_0xa39779(0x1c3)){const _0x58f6d6=_0xbcb563===0x0;_0x3df540(_0x58f6d6),_0x1a9e90(_0x2977fb=>[..._0x2977fb,{'step':_0xa39779(0x1e3),'label':'拉取API配置','value':_0x58f6d6?'是':'否'}]),_0x4690d0('lovrabet-setup-selection');return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x47e93b(!![]);if(_0x42e343===0x1){_0x1a9e90(_0x4be298=>[..._0x4be298,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':'否'}]);const _0x37eb63=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':![],'selectedIDEs':[],'env':_0x37eb63}),_0x4690d0('creating');}return;}if(_0x260944[_0xa39779(0x1fc)]===0x0){_0x38fa1a('请至少选择一个\x20IDE');return;}const _0x166e02=Array[_0xa39779(0x1a9)](_0x260944)[_0xa39779(0x1fb)](_0x45df90=>UI_IDE_LIST[_0x45df90])[_0xa39779(0x1f1)](_0x198ebd=>_0x198ebd!==undefined);_0x1a9e90(_0x1d2a83=>[..._0x1d2a83,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':_0x166e02['length']+_0xa39779(0x201)}]);const _0x18f2a1=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':!![],'selectedIDEs':_0x166e02,'env':_0x18f2a1}),_0x4690d0(_0xa39779(0x1a7));return;}if(_0x33e085===_0xa39779(0x1b2)){const _0x5e27fc=_0x365830===0x0;if(_0x5e27fc){_0x4690d0(_0xa39779(0x1f9));const _0x3b040b=await _0x57b1d6();_0x3b040b?(_0x1a9e90(_0x3ad2cc=>[..._0x3ad2cc,{'step':_0xa39779(0x1e9),'label':_0xa39779(0x1ba),'value':'已登录'}]),_0x4690d0(_0xa39779(0x1c3))):(_0x1a9e90(_0x355e3a=>[..._0x355e3a,{'step':'login','label':_0xa39779(0x1ba),'value':_0xa39779(0x1a6)}]),_0x4690d0(_0xa39779(0x1e5)));}else _0x1a9e90(_0x2aca9e=>[..._0x2aca9e,{'step':'login','label':_0xa39779(0x1ba),'value':'跳过登录'}]),_0x4690d0(_0xa39779(0x1e5));return;}}if(_0x15c71d[_0xa39779(0x1be)]||_0x15c71d[_0xa39779(0x1d2)]){_0x39cf58(_0x259d20=>{const _0x5452a5=_0xa39779,_0x348b4e=_0x259d20[_0x5452a5(0x1fe)](0x0,-0x1);if(_0x33e085===_0x5452a5(0x1c8)){const {valid:_0xfa10b1,message:_0x20e530}=_0x1d9f1d(_0x348b4e);_0x38fa1a(_0xfa10b1?'':_0x20e530||_0x5452a5(0x1c0));if(_0xfa10b1&&!_0x201d0c){const _0x49e35f=_0x348b4e||_0x4d9251;_0x91c92f(_0x49e35f)?_0x345cc7('目录\x20\x22'+_0x49e35f+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0x5452a5(0x1a5)){const {valid:_0x451bc8,message:_0x4fcfe4}=_0x24cf39(_0x348b4e);_0x38fa1a(_0x451bc8?'':_0x4fcfe4||'应用AppCode不合法');}}return _0x348b4e;});return;}if([_0xa39779(0x1a7),_0xa39779(0x1dd),_0xa39779(0x1f9)][_0xa39779(0x1bf)](_0x33e085))return;if(_0x33e085===_0xa39779(0x1c3)||_0x33e085==='login-prompt'||_0x33e085===_0xa39779(0x1e5))return;_0x39cf58(_0x25b46f=>{const _0xb765c3=_0xa39779,_0x5235bc=_0x25b46f+_0x32b188;if(_0x33e085===_0xb765c3(0x1c8)){const {valid:_0x87d19b,message:_0x21338e}=_0x1d9f1d(_0x5235bc);_0x38fa1a(_0x87d19b?'':_0x21338e||_0xb765c3(0x1c0));if(_0x87d19b&&!_0x201d0c){const _0x4063fe=_0x5235bc||_0x4d9251;_0x91c92f(_0x4063fe)?_0x345cc7('目录\x20\x22'+_0x4063fe+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0xb765c3(0x1a5)){const {valid:_0x554686,message:_0x143bfb}=_0x24cf39(_0x5235bc);_0x38fa1a(_0x554686?'':_0x143bfb||'应用AppCode不合法');}}return _0x5235bc;});}),a42_0x2d3dcc(Box,{'flexDirection':_0x1a21c4(0x1cb),'marginTop':0x1,'children':[_0x4c8336[_0x1a21c4(0x1ad)]===0x0&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':'*\x20创建新项目'})}),_0x4c8336[_0x1a21c4(0x1fb)](_0x378f10=>a42_0x2d3dcc(Box,{'children':[a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1a8),'children':['√\x20',_0x378f10[_0x1a21c4(0x1ea)],':\x20']}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':_0x378f10[_0x1a21c4(0x1e7)]})]},_0x378f10[_0x1a21c4(0x1f7)])),_0x33e085===_0x1a21c4(0x1c8)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d8)}),_0x77f488?a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}):a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x4d9251}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]}),_0xfa22b8&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0xfa22b8]})]}),!_0x201d0c&&!_0xfa22b8&&!_0x77f488&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1af)})})]}),_0x33e085===_0x1a21c4(0x1a5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ab)}),a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1e4)}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]})]}),!_0x201d0c&&a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'color':'gray','children':['\x20',_0x1a21c4(0x1f4)]})})]}),_0x33e085===_0x1a21c4(0x1dd)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1b4)}),_0x4ab234&&a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1a2)})]}),_0x33e085===_0x1a21c4(0x1c3)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':'√\x20检测到有效登录状态'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1cd)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0xbcb563===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0xbcb563===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0xbcb563===0x1?_0x1a21c4(0x1a8):'gray','children':[_0xbcb563===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1d9)})}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1a4)})})]}),_0x33e085===_0x1a21c4(0x1e5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'green','children':'√'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d1)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x42e343===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x42e343===0x0?'▶\x20':'\x20\x20','Yes']}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x42e343===0x1?_0x1a21c4(0x1a8):'gray','children':[_0x42e343===0x1?'▶\x20':'\x20\x20','No']})]}),_0x5e6b15&&_0x42e343===0x0&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1f6)})}),a42_0x2d3dcc(Box,{'marginTop':0x1,'flexDirection':_0x1a21c4(0x1cb),'children':[a42_0x18e0d9(Text,{'bold':!![],'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1dc)}),UI_IDE_LIST['map']((_0x4e8a1a,_0x270c9f)=>{const _0x415f10=_0x1a21c4,_0x14650b=_0x1f2d71===_0x270c9f,_0x391b06=_0x260944[_0x415f10(0x1d0)](_0x270c9f),_0x29aeb0=UI_MCP_IDES['has'](_0x4e8a1a);return a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'backgroundColor':_0x14650b?_0x415f10(0x1a3):undefined,'color':_0x14650b?_0x415f10(0x1fa):undefined,'children':['\x20\x20',_0x391b06?_0x415f10(0x1ce):_0x415f10(0x1de),'\x20',UI_IDE_CONFIGS[_0x4e8a1a]['name'],_0x29aeb0&&a42_0x18e0d9(Text,{'color':_0x14650b?_0x415f10(0x1fa):_0x415f10(0x202),'children':_0x415f10(0x203)}),'\x20',a42_0x2d3dcc(Text,{'color':_0x14650b?_0x415f10(0x1fa):'gray','dimColor':!_0x14650b,'children':['-\x20',UI_IDE_CONFIGS[_0x4e8a1a]['description']]})]})},_0x4e8a1a);}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1c7),'children':['\x20',_0x1a21c4(0x1df)]})})]})]}),!_0x5e6b15&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})}),_0x201d0c&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':['✗\x20',_0x201d0c]})})]}),_0x33e085===_0x1a21c4(0x1b2)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':'!\x20未检测到有效登录'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ef)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x365830===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x365830===0x1?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})})]}),_0x33e085===_0x1a21c4(0x1f9)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0xf6e309&&a42_0x18e0d9(Text,{'color':'gray','children':'\x20登录中...'})]}),_0x33e085===_0x1a21c4(0x1a7)&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x1a21c4(0x1c2)})})]});}
|
|
1
|
+
const a42_0x5423e9=a42_0x1814;(function(_0x37b59f,_0x171d97){const _0x2f42d7=a42_0x1814,_0x5585f0=_0x37b59f();while(!![]){try{const _0x4856bf=parseInt(_0x2f42d7(0x1bf))/0x1+-parseInt(_0x2f42d7(0x189))/0x2*(parseInt(_0x2f42d7(0x1d2))/0x3)+parseInt(_0x2f42d7(0x191))/0x4+parseInt(_0x2f42d7(0x1ad))/0x5*(-parseInt(_0x2f42d7(0x1d3))/0x6)+-parseInt(_0x2f42d7(0x1e0))/0x7+-parseInt(_0x2f42d7(0x1ca))/0x8+parseInt(_0x2f42d7(0x1c0))/0x9;if(_0x4856bf===_0x171d97)break;else _0x5585f0['push'](_0x5585f0['shift']());}catch(_0x1b4c06){_0x5585f0['push'](_0x5585f0['shift']());}}}(a42_0x110e,0x428f5));import{jsx as a42_0x39a007,jsxs as a42_0x106683,Fragment as a42_0x38992f}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';function a42_0x110e(){const _0x339c40=['应用AppCode不合法','*\x20是否要自动拉取\x20API\x20配置?','filter','lovrabet-setup','trim','cursor','add','leftArrow','gray','1716896yGQPza','login-prompt','test','项目名长度不能超过\x2050\x20个字符','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','project-name','from','green','3jpxJDP','22482VbgOMS','*\x20创建新项目','应用AppCode长度不能超过\x20100\x20个字符','cwd','跳过登录','[\x20]','slice','blue','my-app','value','opencode','\x20←\x20','登录失败','650979bficnO','*\x20是否要先登录以便拉取\x20API\x20配置?','\x22\x20已存在,请使用其他名称','description','online','codebuddy','login','*\x20正在检查登录状态...','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','1056722rXGIQU','env','[✓]','login-process','codex','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','登录状态','length','177584HTuNLr','*\x20应用AppCode\x20','MCP\x20和\x20Skill','cyan','\x20\x20使用\x20←→\x20选择,回车确认','confirm-api-pull','red','app-code','*\x20项目名:\x20','has','选择要配置的\x20IDE:','backspace','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','antigravity','agent','api-pull','delete','\x22\x20已存在','login-check','rightArrow','creating','*\x20正在登录,请前往浏览器完成登录...','已登录','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','\x20检查中...','!\x20未检测到有效登录','windsurf','lovrabet-setup-selection','460bOiQss','downArrow','[可选]:\x20','*\x20正在创建项目...','includes','yellow','string','目录\x20\x22','upArrow','map','请至少选择一个\x20IDE','Yes','claude','column','\x20+MCP','拉取API配置','resolve','white','39472rXVGaW','12325095xXDopt'];a42_0x110e=function(){return _0x339c40;};return a42_0x110e();}import{existsSync}from'node:fs';import a42_0x17034e from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a42_0x1814(_0x3b4ba5,_0x4893aa){_0x3b4ba5=_0x3b4ba5-0x181;const _0x110eec=a42_0x110e();let _0x18149c=_0x110eec[_0x3b4ba5];return _0x18149c;}import{readConfig}from'../utils/config.js';import{IDE_CONFIGS,MCP_IDES}from'../utils/ai_config.js';const UI_IDE_CONFIGS=IDE_CONFIGS,UI_IDE_LIST=[a42_0x5423e9(0x19e),a42_0x5423e9(0x1b9),'cline',a42_0x5423e9(0x184),a42_0x5423e9(0x18d),a42_0x5423e9(0x1c6),a42_0x5423e9(0x1dd),'qoder','trae',a42_0x5423e9(0x1ab),a42_0x5423e9(0x19f)],UI_MCP_IDES=new Set(Array[a42_0x5423e9(0x1d0)](MCP_IDES));export function EnhancedGuidedCreate(_0x540ceb){const _0x12b557=a42_0x5423e9,{onCreate:_0x951e1e,env:_0x50dcbd}=_0x540ceb,[_0x2a8a9b,_0x5d3d98]=useState('project-name'),[_0x4f7273,_0x2e880a]=useState(''),[_0x291920,_0x360dd5]=useState(''),[_0x437744,_0x91b738]=useState(''),[_0x3a327a,_0x5dec5f]=useState(''),[_0x361e83,_0x5dcc3a]=useState([]),[_0x27d580,_0x2ffe87]=useState(null),[_0x1a547d,_0x37443b]=useState(![]),[_0x319e0a,_0x57c83b]=useState(![]),[_0x14bd3a,_0x5261f5]=useState(![]),[_0x3e121d,_0x57f607]=useState(0x0),[_0x396b7b,_0x18e727]=useState(0x0),[_0x48ce36,_0x3396f4]=useState(0x0),[_0x132f79,_0x55ac2b]=useState(![]),[_0x39d907,_0x4b7864]=useState(new Set()),[_0x5bf870,_0x23cfd4]=useState(0x0),[_0x5046a7,_0x5976ff]=useState(''),_0x2947ea=_0x12b557(0x1db),_0x5cfa10=readConfig(),_0x1f73d9=typeof _0x5cfa10[_0x12b557(0x18a)]===_0x12b557(0x1b3)?_0x5cfa10[_0x12b557(0x18a)]:undefined;function _0xe4a9de(_0xf6b8d0){const _0xa67f7e=_0x12b557,_0x3acd69=_0xf6b8d0||_0x2947ea,_0x49f24f=a42_0x17034e[_0xa67f7e(0x1bd)](process[_0xa67f7e(0x1d6)](),_0x3acd69);return existsSync(_0x49f24f);}function _0x535b00(_0x450af7){const _0x4e5d9f=_0x12b557;if(_0x450af7[_0x4e5d9f(0x190)]>0x32)return{'valid':![],'message':_0x4e5d9f(0x1cd)};const _0x26d28b=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x450af7?.[_0x4e5d9f(0x1c5)]()&&!_0x26d28b[_0x4e5d9f(0x1cc)](_0x450af7))return{'valid':![],'message':_0x4e5d9f(0x19d)};return{'valid':!![]};}function _0x1c0e58(_0x280be7){const _0x5e9b02=_0x12b557;if(!_0x280be7['trim']())return{'valid':!![]};if(_0x280be7[_0x5e9b02(0x190)]>0x64)return{'valid':![],'message':_0x5e9b02(0x1d5)};const _0x20022e=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x20022e[_0x5e9b02(0x1cc)](_0x280be7))return{'valid':![],'message':_0x5e9b02(0x1ce)};return{'valid':!![]};}async function _0x2829fe(){_0x37443b(!![]);try{const _0xb1e03f=await getIsSessionValid();return _0x2ffe87(_0xb1e03f),_0xb1e03f;}catch(_0x5c9dee){return _0x2ffe87(![]),![];}finally{_0x37443b(![]);}}async function _0x36f8e2(){_0x57c83b(!![]);try{const _0x46c183=await authServer({'silent':!![]});return _0x2ffe87(_0x46c183),_0x46c183;}catch(_0x37cdd5){return _0x2ffe87(![]),![];}finally{_0x57c83b(![]);}}return useInput(async(_0x3ca42d,_0x18b796)=>{const _0x2bea9e=_0x12b557;if(_0x18b796[_0x2bea9e(0x1c8)]||_0x18b796[_0x2bea9e(0x1a4)]){if(_0x2a8a9b===_0x2bea9e(0x196)){_0x57f607(_0x2f0429=>_0x2f0429===0x0?0x1:0x0);return;}if(_0x2a8a9b==='lovrabet-setup-selection'){if(!_0x132f79){_0x3396f4(_0x217c55=>_0x217c55===0x0?0x1:0x0);return;}_0x55ac2b(![]);return;}if(_0x2a8a9b===_0x2bea9e(0x1cb)){_0x18e727(_0x398561=>_0x398561===0x0?0x1:0x0);return;}}if(_0x2a8a9b===_0x2bea9e(0x1ac)&&_0x132f79&&_0x48ce36===0x0){if(_0x18b796[_0x2bea9e(0x1b5)]){_0x23cfd4(_0x5ed403=>_0x5ed403>0x0?_0x5ed403-0x1:UI_IDE_LIST['length']-0x1);return;}if(_0x18b796[_0x2bea9e(0x1ae)]){_0x23cfd4(_0x5f0956=>_0x5f0956<UI_IDE_LIST[_0x2bea9e(0x190)]-0x1?_0x5f0956+0x1:0x0);return;}}if(_0x3ca42d==='\x20'&&_0x2a8a9b===_0x2bea9e(0x1ac)&&_0x132f79&&_0x48ce36===0x0){_0x4b7864(_0x2c7432=>{const _0x529efe=_0x2bea9e,_0x50f14d=new Set(_0x2c7432);return _0x50f14d[_0x529efe(0x19a)](_0x5bf870)?_0x50f14d[_0x529efe(0x1a1)](_0x5bf870):_0x50f14d['add'](_0x5bf870),_0x50f14d;}),_0x5dec5f('');return;}if((_0x3ca42d==='a'||_0x3ca42d==='A')&&_0x2a8a9b===_0x2bea9e(0x1ac)&&_0x132f79&&_0x48ce36===0x0){_0x4b7864(new Set(UI_IDE_LIST['map']((_0x34b166,_0x250fd5)=>_0x250fd5))),_0x5dec5f('');return;}if((_0x3ca42d==='i'||_0x3ca42d==='I'||_0x3ca42d==='r'||_0x3ca42d==='R')&&_0x2a8a9b===_0x2bea9e(0x1ac)&&_0x132f79&&_0x48ce36===0x0){_0x4b7864(_0x3c353c=>{const _0x1ef159=_0x2bea9e,_0x2b8640=new Set();for(let _0x582089=0x0;_0x582089<UI_IDE_LIST[_0x1ef159(0x190)];_0x582089++){!_0x3c353c['has'](_0x582089)&&_0x2b8640[_0x1ef159(0x1c7)](_0x582089);}return _0x2b8640;});return;}if(_0x18b796['return']){if(_0x2a8a9b===_0x2bea9e(0x1cf)){const _0x530ad3=_0x437744[_0x2bea9e(0x1c5)]()||_0x2947ea;if(_0x3a327a)return;if(_0xe4a9de(_0x530ad3)){_0x5976ff(_0x2bea9e(0x1b4)+_0x530ad3+_0x2bea9e(0x181));return;}_0x2e880a(_0x530ad3),_0x5dcc3a([{'step':_0x2bea9e(0x1cf),'label':'项目名','value':_0x530ad3}]),_0x91b738(''),_0x5dec5f(''),_0x5976ff(''),_0x5d3d98(_0x2bea9e(0x198));return;}if(_0x2a8a9b===_0x2bea9e(0x198)){if(_0x3a327a)return;const _0x4087a0=_0x437744[_0x2bea9e(0x1c5)]();_0x360dd5(_0x4087a0),_0x5dcc3a(_0x495729=>[..._0x495729,{'step':_0x2bea9e(0x198),'label':'应用AppCode','value':_0x4087a0||'未设置'}]),_0x91b738(''),_0x5dec5f('');if(_0x4087a0){_0x5d3d98(_0x2bea9e(0x1a3));const _0x5aced8=await _0x2829fe();_0x5aced8?_0x5d3d98(_0x2bea9e(0x196)):_0x5d3d98('login-prompt');}else{const _0x49be4f=_0x50dcbd||_0x1f73d9||_0x2bea9e(0x183);_0x951e1e({'projectName':_0x4f7273,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x49be4f}),_0x5d3d98('creating');}return;}if(_0x2a8a9b===_0x2bea9e(0x196)){const _0x137eb0=_0x3e121d===0x0;_0x5261f5(_0x137eb0),_0x5dcc3a(_0x4effc5=>[..._0x4effc5,{'step':_0x2bea9e(0x1a0),'label':_0x2bea9e(0x1bc),'value':_0x137eb0?'是':'否'}]),_0x5d3d98(_0x2bea9e(0x1ac));return;}if(_0x2a8a9b===_0x2bea9e(0x1ac)){if(!_0x132f79){_0x55ac2b(!![]);if(_0x48ce36===0x1){_0x5dcc3a(_0x222c65=>[..._0x222c65,{'step':'lovrabet-setup','label':_0x2bea9e(0x193),'value':'否'}]);const _0x42c901=_0x50dcbd||_0x1f73d9||_0x2bea9e(0x183);_0x951e1e({'projectName':_0x4f7273,'appCode':_0x291920,'pullApi':_0x14bd3a,'aiSetup':![],'selectedIDEs':[],'env':_0x42c901}),_0x5d3d98(_0x2bea9e(0x1a5));}return;}if(_0x39d907['size']===0x0){_0x5dec5f(_0x2bea9e(0x1b7));return;}const _0x14b94b=Array['from'](_0x39d907)['map'](_0x366075=>UI_IDE_LIST[_0x366075])[_0x2bea9e(0x1c3)](_0x1a4b13=>_0x1a4b13!==undefined);_0x5dcc3a(_0x1aab17=>[..._0x1aab17,{'step':_0x2bea9e(0x1c4),'label':_0x2bea9e(0x193),'value':_0x14b94b[_0x2bea9e(0x190)]+'\x20个\x20IDE'}]);const _0x2ea6fe=_0x50dcbd||_0x1f73d9||'online';_0x951e1e({'projectName':_0x4f7273,'appCode':_0x291920,'pullApi':_0x14bd3a,'aiSetup':!![],'selectedIDEs':_0x14b94b,'env':_0x2ea6fe}),_0x5d3d98('creating');return;}if(_0x2a8a9b===_0x2bea9e(0x1cb)){const _0x18ffb1=_0x396b7b===0x0;if(_0x18ffb1){_0x5d3d98(_0x2bea9e(0x18c));const _0x4979c4=await _0x36f8e2();_0x4979c4?(_0x5dcc3a(_0xce0208=>[..._0xce0208,{'step':_0x2bea9e(0x185),'label':_0x2bea9e(0x18f),'value':_0x2bea9e(0x1a7)}]),_0x5d3d98(_0x2bea9e(0x196))):(_0x5dcc3a(_0x358cc0=>[..._0x358cc0,{'step':_0x2bea9e(0x185),'label':_0x2bea9e(0x18f),'value':_0x2bea9e(0x1df)}]),_0x5d3d98(_0x2bea9e(0x1ac)));}else _0x5dcc3a(_0x28dc17=>[..._0x28dc17,{'step':_0x2bea9e(0x185),'label':'登录状态','value':_0x2bea9e(0x1d7)}]),_0x5d3d98('lovrabet-setup-selection');return;}}if(_0x18b796[_0x2bea9e(0x19c)]||_0x18b796[_0x2bea9e(0x1a1)]){_0x91b738(_0x2974d0=>{const _0x257990=_0x2bea9e,_0x293acc=_0x2974d0[_0x257990(0x1d9)](0x0,-0x1);if(_0x2a8a9b===_0x257990(0x1cf)){const {valid:_0x5dcb20,message:_0x27c61b}=_0x535b00(_0x293acc);_0x5dec5f(_0x5dcb20?'':_0x27c61b||'项目名不合法');if(_0x5dcb20&&!_0x3a327a){const _0x1f7da0=_0x293acc||_0x2947ea;_0xe4a9de(_0x1f7da0)?_0x5976ff(_0x257990(0x1b4)+_0x1f7da0+'\x22\x20已存在'):_0x5976ff('');}}else{if(_0x2a8a9b===_0x257990(0x198)){const {valid:_0x498274,message:_0x253568}=_0x1c0e58(_0x293acc);_0x5dec5f(_0x498274?'':_0x253568||'应用AppCode不合法');}}return _0x293acc;});return;}if([_0x2bea9e(0x1a5),_0x2bea9e(0x1a3),'login-process'][_0x2bea9e(0x1b1)](_0x2a8a9b))return;if(_0x2a8a9b===_0x2bea9e(0x196)||_0x2a8a9b===_0x2bea9e(0x1cb)||_0x2a8a9b===_0x2bea9e(0x1ac))return;_0x91b738(_0x1f6b16=>{const _0x484b7d=_0x2bea9e,_0x1c39a4=_0x1f6b16+_0x3ca42d;if(_0x2a8a9b==='project-name'){const {valid:_0x24daf0,message:_0x1a22bd}=_0x535b00(_0x1c39a4);_0x5dec5f(_0x24daf0?'':_0x1a22bd||'项目名不合法');if(_0x24daf0&&!_0x3a327a){const _0x494e56=_0x1c39a4||_0x2947ea;_0xe4a9de(_0x494e56)?_0x5976ff(_0x484b7d(0x1b4)+_0x494e56+_0x484b7d(0x1a2)):_0x5976ff('');}}else{if(_0x2a8a9b==='app-code'){const {valid:_0xfe3306,message:_0x5814c5}=_0x1c0e58(_0x1c39a4);_0x5dec5f(_0xfe3306?'':_0x5814c5||_0x484b7d(0x1c1));}}return _0x1c39a4;});}),a42_0x106683(Box,{'flexDirection':_0x12b557(0x1ba),'marginTop':0x1,'children':[_0x361e83[_0x12b557(0x190)]===0x0&&a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x194),'children':_0x12b557(0x1d4)})}),_0x361e83[_0x12b557(0x1b6)](_0x57be14=>a42_0x106683(Box,{'children':[a42_0x106683(Text,{'color':'green','children':['√\x20',_0x57be14['label'],':\x20']}),a42_0x39a007(Text,{'color':_0x12b557(0x194),'children':_0x57be14[_0x12b557(0x1dc)]})]},_0x57be14['step'])),_0x2a8a9b===_0x12b557(0x1cf)&&a42_0x106683(a42_0x38992f,{'children':[a42_0x106683(Box,{'children':[a42_0x39a007(Text,{'children':_0x12b557(0x199)}),_0x437744?a42_0x39a007(Text,{'color':'green','children':_0x437744}):a42_0x39a007(Text,{'color':'gray','children':_0x2947ea}),_0x3a327a&&a42_0x106683(Text,{'color':_0x12b557(0x197),'children':[_0x12b557(0x1de),_0x3a327a]}),_0x5046a7&&a42_0x106683(Text,{'color':_0x12b557(0x197),'children':[_0x12b557(0x1de),_0x5046a7]})]}),!_0x3a327a&&!_0x5046a7&&!_0x437744&&a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1c9),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x2a8a9b===_0x12b557(0x198)&&a42_0x106683(a42_0x38992f,{'children':[a42_0x106683(Box,{'children':[a42_0x39a007(Text,{'children':_0x12b557(0x192)}),a42_0x39a007(Text,{'color':_0x12b557(0x1c9),'children':_0x12b557(0x1af)}),a42_0x39a007(Text,{'color':_0x12b557(0x1d1),'children':_0x437744}),_0x3a327a&&a42_0x106683(Text,{'color':_0x12b557(0x197),'children':[_0x12b557(0x1de),_0x3a327a]})]}),!_0x3a327a&&a42_0x39a007(Box,{'children':a42_0x106683(Text,{'color':'gray','children':['\x20',_0x12b557(0x18e)]})})]}),_0x2a8a9b===_0x12b557(0x1a3)&&a42_0x106683(Box,{'children':[a42_0x39a007(Text,{'children':_0x12b557(0x186)}),_0x1a547d&&a42_0x39a007(Text,{'color':_0x12b557(0x1c9),'children':_0x12b557(0x1a9)})]}),_0x2a8a9b===_0x12b557(0x196)&&a42_0x106683(a42_0x38992f,{'children':[a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1d1),'children':'√\x20检测到有效登录状态'})}),a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x39a007(Text,{'children':_0x12b557(0x1c2)})}),a42_0x106683(Box,{'marginLeft':0x2,'children':[a42_0x106683(Text,{'color':_0x3e121d===0x0?_0x12b557(0x1d1):_0x12b557(0x1c9),'children':[_0x3e121d===0x0?'▶\x20':'\x20\x20',_0x12b557(0x1b8)]}),a42_0x39a007(Text,{'children':'\x20'}),a42_0x106683(Text,{'color':_0x3e121d===0x1?_0x12b557(0x1d1):'gray','children':[_0x3e121d===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1b2),'children':_0x12b557(0x1a8)})})]}),_0x2a8a9b===_0x12b557(0x1ac)&&a42_0x106683(a42_0x38992f,{'children':[a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1d1),'children':'√'})}),a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x39a007(Text,{'children':_0x12b557(0x188)})}),a42_0x106683(Box,{'marginLeft':0x2,'children':[a42_0x106683(Text,{'color':_0x48ce36===0x0?_0x12b557(0x1d1):_0x12b557(0x1c9),'children':[_0x48ce36===0x0?'▶\x20':'\x20\x20',_0x12b557(0x1b8)]}),a42_0x39a007(Text,{'children':'\x20'}),a42_0x106683(Text,{'color':_0x48ce36===0x1?_0x12b557(0x1d1):_0x12b557(0x1c9),'children':[_0x48ce36===0x1?'▶\x20':'\x20\x20','No']})]}),_0x132f79&&_0x48ce36===0x0&&a42_0x106683(a42_0x38992f,{'children':[a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x39a007(Text,{'color':_0x12b557(0x1c9),'children':'\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE'})}),a42_0x106683(Box,{'marginTop':0x1,'flexDirection':_0x12b557(0x1ba),'children':[a42_0x39a007(Text,{'bold':!![],'color':_0x12b557(0x1b2),'children':_0x12b557(0x19b)}),UI_IDE_LIST[_0x12b557(0x1b6)]((_0x169a88,_0x19e000)=>{const _0x378aad=_0x12b557,_0x130432=_0x5bf870===_0x19e000,_0x3f759e=_0x39d907['has'](_0x19e000),_0x3207b9=UI_MCP_IDES[_0x378aad(0x19a)](_0x169a88);return a42_0x39a007(Box,{'children':a42_0x106683(Text,{'backgroundColor':_0x130432?_0x378aad(0x1da):undefined,'color':_0x130432?'white':undefined,'children':['\x20\x20',_0x3f759e?_0x378aad(0x18b):_0x378aad(0x1d8),'\x20',UI_IDE_CONFIGS[_0x169a88]['name'],_0x3207b9&&a42_0x39a007(Text,{'color':_0x130432?_0x378aad(0x1be):_0x378aad(0x194),'children':_0x378aad(0x1bb)}),'\x20',a42_0x106683(Text,{'color':_0x130432?_0x378aad(0x1be):_0x378aad(0x1c9),'dimColor':!_0x130432,'children':['-\x20',UI_IDE_CONFIGS[_0x169a88][_0x378aad(0x182)]]})]})},_0x169a88);}),a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x106683(Text,{'color':_0x12b557(0x1c9),'children':['\x20',_0x12b557(0x187)]})})]})]}),!_0x132f79&&a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x39a007(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),_0x3a327a&&a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x106683(Text,{'color':_0x12b557(0x197),'children':['✗\x20',_0x3a327a]})})]}),_0x2a8a9b===_0x12b557(0x1cb)&&a42_0x106683(a42_0x38992f,{'children':[a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1b2),'children':_0x12b557(0x1aa)})}),a42_0x39a007(Box,{'marginTop':0x1,'children':a42_0x39a007(Text,{'children':_0x12b557(0x1e1)})}),a42_0x106683(Box,{'marginLeft':0x2,'children':[a42_0x106683(Text,{'color':_0x396b7b===0x0?'green':'gray','children':[_0x396b7b===0x0?'▶\x20':'\x20\x20','Yes']}),a42_0x39a007(Text,{'children':'\x20'}),a42_0x106683(Text,{'color':_0x396b7b===0x1?_0x12b557(0x1d1):_0x12b557(0x1c9),'children':[_0x396b7b===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':_0x12b557(0x1c9),'children':_0x12b557(0x195)})})]}),_0x2a8a9b==='login-process'&&a42_0x106683(Box,{'children':[a42_0x39a007(Text,{'children':_0x12b557(0x1a6)}),_0x319e0a&&a42_0x39a007(Text,{'color':'gray','children':'\x20登录中...'})]}),_0x2a8a9b==='creating'&&a42_0x39a007(Box,{'children':a42_0x39a007(Text,{'color':'green','children':_0x12b557(0x1b0)})})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5095bd,_0x3e94d4){const _0x28aa7f=a43_0x5411,_0x5b8592=_0x5095bd();while(!![]){try{const _0x43e670=parseInt(_0x28aa7f(0x1b4))/0x1*(parseInt(_0x28aa7f(0x1b0))/0x2)+parseInt(_0x28aa7f(0x1b5))/0x3+parseInt(_0x28aa7f(0x1ad))/0x4*(-parseInt(_0x28aa7f(0x1b7))/0x5)+-parseInt(_0x28aa7f(0x1b3))/0x6*(-parseInt(_0x28aa7f(0x1b2))/0x7)+-parseInt(_0x28aa7f(0x1af))/0x8+parseInt(_0x28aa7f(0x1ac))/0x9+-parseInt(_0x28aa7f(0x1b6))/0xa;if(_0x43e670===_0x3e94d4)break;else _0x5b8592['push'](_0x5b8592['shift']());}catch(_0x7876b9){_0x5b8592['push'](_0x5b8592['shift']());}}}(a43_0x4782,0x8dffc));export function formatElapsed(_0x3bfb22){const _0x51e7cd=a43_0x5411,_0x7504ad=Date[_0x51e7cd(0x1b1)]()-_0x3bfb22;if(_0x7504ad<0x3e8)return _0x7504ad+'ms';const _0x2cb0e1=(_0x7504ad/0x3e8)[_0x51e7cd(0x1ab)](0x2),_0x42dec8=_0x2cb0e1[_0x51e7cd(0x1ae)](/\.?0+$/u,'');return _0x42dec8+'s';}function a43_0x5411(_0x1313ad,_0x4b5810){_0x1313ad=_0x1313ad-0x1ab;const _0x478296=a43_0x4782();let _0x54116e=_0x478296[_0x1313ad];return _0x54116e;}function a43_0x4782(){const _0x50317b=['toFixed','1652085PPPxrz','8KGABLO','replace','3994368bNCsDo','381540EbZBNw','now','798egvbiG','23802RPkpCj','6oSIaxS','1886682BIESEP','2944390iPpjnz','2584885TWlmZI'];a43_0x4782=function(){return _0x50317b;};return a43_0x4782();}
|