@lovrabet/cli 1.2.5-beta.3 → 1.2.5-beta.5
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.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/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/skills/SkillInstallUI.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a31_0xff26ca=a31_0x4b3e;(function(_0x23eaea,_0x47e53b){const _0x23df0b=a31_0x4b3e,_0x132780=_0x23eaea();while(!![]){try{const _0x3b2602=parseInt(_0x23df0b(0x16a))/0x1*(parseInt(_0x23df0b(0x187))/0x2)+parseInt(_0x23df0b(0x16f))/0x3+parseInt(_0x23df0b(0x162))/0x4*(parseInt(_0x23df0b(0x191))/0x5)+parseInt(_0x23df0b(0x177))/0x6+parseInt(_0x23df0b(0x164))/0x7*(-parseInt(_0x23df0b(0x19b))/0x8)+parseInt(_0x23df0b(0x19e))/0x9*(-parseInt(_0x23df0b(0x19c))/0xa)+-parseInt(_0x23df0b(0x1a0))/0xb*(parseInt(_0x23df0b(0x198))/0xc);if(_0x3b2602===_0x47e53b)break;else _0x132780['push'](_0x132780['shift']());}catch(_0x16b63a){_0x132780['push'](_0x132780['shift']());}}}(a31_0xa7bd,0xc87ff));function a31_0x4b3e(_0x5d95d5,_0x428741){_0x5d95d5=_0x5d95d5-0x160;const _0xa7bd82=a31_0xa7bd();let _0x4b3ec9=_0xa7bd82[_0x5d95d5];return _0x4b3ec9;}import{jsx as a31_0x232585}from'react/jsx-runtime';import a31_0x4bb642 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';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';function a31_0xa7bd(){const _0x1af084=['slice','windsurf','执行配置\x20MCP\x20命令','env','323542mlIoFC','执行构建命令','exit','setRawCommand','auth','install','执行安装技能包命令','cwd','all','error','355775LlVOyh','flags','info','trae','mcp','cursor','other','108CVkFFF','\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\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','setLogPath','33224OjrJhH','10tosREr','lovrabet\x20','9756549EDfwJH','create','345972nppiNR','build','init','boolean','input','40zCtigw','执行更新菜单\x20CDN\x20资源命令','518lrFhRw','string','start','trim','codex','page','1sBRLGb','argv','执行启动命令','执行添加页面命令','help','2331864qdkvRq','push','claude','appcode','agent','logout','codebuddy','join','5070534pnnJtl','clear','qoder','opencode','--help','add-page','skill','antigravity','update','add','mcpCursor','mcpOther'];a31_0xa7bd=function(){return _0x1af084;};return a31_0xa7bd();}import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';const cli=a31_0x4bb642(a31_0xff26ca(0x199),{'importMeta':import.meta,'flags':{'name':{'type':a31_0xff26ca(0x165)},'clear':{'type':a31_0xff26ca(0x160)},'env':{'type':a31_0xff26ca(0x165)},'watch':{'type':a31_0xff26ca(0x160)},'help':{'type':'boolean'},'appcode':{'type':'string'},'output':{'type':a31_0xff26ca(0x165)},'params':{'type':a31_0xff26ca(0x165)},'datasetcode':{'type':'string'},'mcpCursor':{'type':a31_0xff26ca(0x160)},'mcpClaude':{'type':a31_0xff26ca(0x160)},'mcpOther':{'type':a31_0xff26ca(0x160)},'cursor':{'type':a31_0xff26ca(0x160)},'windsurf':{'type':'boolean'},'claude':{'type':a31_0xff26ca(0x160)},'codex':{'type':'boolean'},'opencode':{'type':a31_0xff26ca(0x160)},'qoder':{'type':a31_0xff26ca(0x160)},'codebuddy':{'type':a31_0xff26ca(0x160)},'trae':{'type':a31_0xff26ca(0x160)},'agent':{'type':'boolean'},'antigravity':{'type':a31_0xff26ca(0x160)},'all':{'type':a31_0xff26ca(0x160)}},'autoVersion':!![]});await run();async function run(){const _0x49be42=a31_0xff26ca,_0x51db30=cli[_0x49be42(0x161)][0x0],_0x1ddf35=cli[_0x49be42(0x161)][0x1],_0x1f8b24=cli[_0x49be42(0x161)][0x2],_0x504840=(_0x49be42(0x19d)+process[_0x49be42(0x16b)][_0x49be42(0x183)](0x2)[_0x49be42(0x176)]('\x20'))[_0x49be42(0x167)]();logger[_0x49be42(0x18a)](_0x504840);switch(_0x51db30){case'init':{const _0x3d4083=cli[_0x49be42(0x192)][_0x49be42(0x172)],_0x362d36=cli[_0x49be42(0x192)][_0x49be42(0x186)];logger[_0x49be42(0x19a)](process[_0x49be42(0x18e)]()),logger[_0x49be42(0x193)](_0x49be42(0x1a2),'执行初始化配置命令'),render(a31_0x232585(Init,{'appcode':_0x3d4083,'env':_0x362d36}));break;}case _0x49be42(0x19f):{const _0x2fab7a=cli[_0x49be42(0x161)][0x1]?.[_0x49be42(0x167)](),_0x52f17e=cli[_0x49be42(0x192)]['env'];render(a31_0x232585(CreateApp,{'projectCode':_0x2fab7a,'env':_0x52f17e}));break;}case _0x49be42(0x180):{cli['input'][0x1]===_0x49be42(0x169)&&(logger['setLogPath'](process[_0x49be42(0x18e)]()),logger['info'](_0x49be42(0x17c),_0x49be42(0x16d)),render(a31_0x232585(AddPage,{})));break;}case _0x49be42(0x166):{try{logger[_0x49be42(0x19a)](process[_0x49be42(0x18e)]()),logger[_0x49be42(0x193)](_0x49be42(0x166),_0x49be42(0x16c)),await runStart();}catch(_0x1edb2f){console[_0x49be42(0x190)](_0x1edb2f),process[_0x49be42(0x189)](0x1);}break;}case _0x49be42(0x1a1):{try{logger[_0x49be42(0x19a)](process['cwd']()),logger['info'](_0x49be42(0x1a1),_0x49be42(0x188)),await runBuild();}catch(_0x5204fb){console[_0x49be42(0x190)](_0x5204fb),process[_0x49be42(0x189)](0x1);}break;}case'preview':{const _0x260e72=cli[_0x49be42(0x192)]['watch'];logger[_0x49be42(0x19a)](process[_0x49be42(0x18e)]()),logger[_0x49be42(0x193)]('preview','执行预览命令'+(_0x260e72?'\x20(监听模式)':''));if(_0x260e72)try{await Promise[_0x49be42(0x18f)]([runBuildWatch(),runPreview()]);}catch(_0x116e5f){console[_0x49be42(0x190)](_0x116e5f),process[_0x49be42(0x189)](0x1);}else try{await runPreview();}catch(_0x5e8241){console[_0x49be42(0x190)](_0x5e8241),process['exit'](0x1);}break;}case'config':{render(a31_0x232585(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x49be42(0x18b):{render(a31_0x232585(AuthServer,{}));break;}case'menu':{if(_0x1ddf35===_0x49be42(0x17f)){logger[_0x49be42(0x19a)](process[_0x49be42(0x18e)]()),logger[_0x49be42(0x193)]('menu-update-cdn',_0x49be42(0x163)),render(a31_0x232585(AppMenuUpdateCdn,{}));break;}else render(a31_0x232585(AppMenuSyncUI,{}));break;}case _0x49be42(0x174):{logout();break;}case _0x49be42(0x195):{const _0x769a8=cli[_0x49be42(0x161)][0x1];logger[_0x49be42(0x19a)](process['cwd']());if(_0x769a8==='install'){const _0x2890d6=[];if(cli['flags'][_0x49be42(0x181)])_0x2890d6['push']('cursor');if(cli[_0x49be42(0x192)]['mcpClaude'])_0x2890d6[_0x49be42(0x170)](_0x49be42(0x171));if(cli[_0x49be42(0x192)][_0x49be42(0x182)])_0x2890d6['push'](_0x49be42(0x197));logger[_0x49be42(0x193)]('mcp-install',_0x49be42(0x185),{'preselected':_0x2890d6}),render(a31_0x232585(McpInstallUI,{'preselectedIDEs':_0x2890d6}));}else _0x769a8===_0x49be42(0x17b)||cli['flags'][_0x49be42(0x16e)]?await mcpCommand(_0x769a8,[],{'help':!![]}):await mcpCommand(_0x769a8,[],cli[_0x49be42(0x192)]);break;}case _0x49be42(0x17d):{const _0x4baf90=cli[_0x49be42(0x161)][0x1];logger[_0x49be42(0x19a)](process[_0x49be42(0x18e)]());if(_0x4baf90===_0x49be42(0x18c)){const _0x1815c3=[];if(cli[_0x49be42(0x192)][_0x49be42(0x18f)])_0x1815c3[_0x49be42(0x170)]('cursor',_0x49be42(0x184),_0x49be42(0x171),_0x49be42(0x168),_0x49be42(0x17a),_0x49be42(0x179),_0x49be42(0x175),'trae',_0x49be42(0x173),'antigravity');else{if(cli[_0x49be42(0x192)][_0x49be42(0x196)])_0x1815c3[_0x49be42(0x170)]('cursor');if(cli['flags'][_0x49be42(0x184)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x184));if(cli[_0x49be42(0x192)][_0x49be42(0x171)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x171));if(cli[_0x49be42(0x192)][_0x49be42(0x168)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x168));if(cli[_0x49be42(0x192)][_0x49be42(0x17a)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x17a));if(cli[_0x49be42(0x192)][_0x49be42(0x179)])_0x1815c3['push']('qoder');if(cli[_0x49be42(0x192)][_0x49be42(0x175)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x175));if(cli[_0x49be42(0x192)][_0x49be42(0x194)])_0x1815c3[_0x49be42(0x170)]('trae');if(cli[_0x49be42(0x192)]['agent'])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x173));if(cli['flags'][_0x49be42(0x17e)])_0x1815c3[_0x49be42(0x170)](_0x49be42(0x17e));}logger[_0x49be42(0x193)]('skill-install',_0x49be42(0x18d),{'preselected':_0x1815c3}),render(a31_0x232585(SkillInstallUI,{'preselectedIDEs':_0x1815c3}));}else _0x4baf90===_0x49be42(0x17b)||cli[_0x49be42(0x192)][_0x49be42(0x16e)]?await skillsCommand(_0x4baf90,[],{'help':!![]}):await skillsCommand(_0x4baf90,[],cli['flags']);break;}case'logs':{cli['flags'][_0x49be42(0x178)]?clearLogs():showLogs();break;}default:render(a31_0x232585(Help,{}));break;}}
|
|
2
|
+
const a31_0x321d71=a31_0x1234;(function(_0xbec0c0,_0x366268){const _0x6c2b1e=a31_0x1234,_0x53a693=_0xbec0c0();while(!![]){try{const _0x41df83=-parseInt(_0x6c2b1e(0xba))/0x1+-parseInt(_0x6c2b1e(0xb3))/0x2+-parseInt(_0x6c2b1e(0x95))/0x3*(-parseInt(_0x6c2b1e(0xa6))/0x4)+-parseInt(_0x6c2b1e(0x90))/0x5*(parseInt(_0x6c2b1e(0xbe))/0x6)+parseInt(_0x6c2b1e(0xb6))/0x7*(parseInt(_0x6c2b1e(0xc6))/0x8)+parseInt(_0x6c2b1e(0x9a))/0x9*(-parseInt(_0x6c2b1e(0x85))/0xa)+parseInt(_0x6c2b1e(0xa3))/0xb*(-parseInt(_0x6c2b1e(0xb7))/0xc);if(_0x41df83===_0x366268)break;else _0x53a693['push'](_0x53a693['shift']());}catch(_0x212cc8){_0x53a693['push'](_0x53a693['shift']());}}}(a31_0x4456,0x8e393));import{jsx as a31_0x17f143}from'react/jsx-runtime';import a31_0x3da9e3 from'meow';function a31_0x1234(_0x352399,_0x266ddb){_0x352399=_0x352399-0x85;const _0x445620=a31_0x4456();let _0x12341a=_0x445620[_0x352399];return _0x12341a;}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';function a31_0x4456(){const _0x41cc13=['mcp','api','input','info','执行启动命令','12188nWKDft','opencode','logout','79432jnNnps','claude','install','all','update','env','agent','push','other','执行预览命令','string','执行添加页面命令','init','127326NazbJF','setLogPath','menu','175XLALzS','516xhcfvw','auth','trae','77011aZBPuv','执行构建命令','trim','antigravity','696078HtQmHU','windsurf','cwd','--help','logs','cursor','codex','add','248448GOKiAX','setRawCommand','\x20(监听模式)','skill','qoder','698410WEuSNk','lovrabet\x20','skill-install','argv','boolean','exit','build','menu-update-cdn','mcp-install','help','join','25lGNWHz','start','error','add-page','执行更新菜单\x20CDN\x20资源命令','129DLEYHc','同步菜单命令','preview','执行配置\x20MCP\x20命令','codebuddy','36DDQKxi','mcpOther','menu-sync','flags'];a31_0x4456=function(){return _0x41cc13;};return a31_0x4456();}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';const cli=a31_0x3da9e3('\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\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':a31_0x321d71(0xb0)},'clear':{'type':'boolean'},'env':{'type':a31_0x321d71(0xb0)},'watch':{'type':a31_0x321d71(0x89)},'help':{'type':'boolean'},'appcode':{'type':a31_0x321d71(0xb0)},'output':{'type':a31_0x321d71(0xb0)},'params':{'type':a31_0x321d71(0xb0)},'datasetcode':{'type':a31_0x321d71(0xb0)},'mcpCursor':{'type':a31_0x321d71(0x89)},'mcpClaude':{'type':a31_0x321d71(0x89)},'mcpOther':{'type':a31_0x321d71(0x89)},'cursor':{'type':a31_0x321d71(0x89)},'windsurf':{'type':'boolean'},'claude':{'type':'boolean'},'codex':{'type':a31_0x321d71(0x89)},'opencode':{'type':a31_0x321d71(0x89)},'qoder':{'type':'boolean'},'codebuddy':{'type':a31_0x321d71(0x89)},'trae':{'type':a31_0x321d71(0x89)},'agent':{'type':a31_0x321d71(0x89)},'antigravity':{'type':'boolean'},'all':{'type':a31_0x321d71(0x89)}},'autoVersion':!![]});await run();async function run(){const _0x329f=a31_0x321d71,_0x57bf87=cli[_0x329f(0xa0)][0x0],_0x32e102=cli[_0x329f(0xa0)][0x1],_0x59f4ea=cli[_0x329f(0xa0)][0x2],_0x40b89c=(_0x329f(0x86)+process[_0x329f(0x88)]['slice'](0x2)[_0x329f(0x8f)]('\x20'))['trim']();logger[_0x329f(0xc7)](_0x40b89c);switch(_0x57bf87){case'init':{const _0x20e0d0=cli[_0x329f(0x9d)]['appcode'],_0x3b77d7=cli[_0x329f(0x9d)][_0x329f(0xab)];logger[_0x329f(0xb4)](process[_0x329f(0xc0)]()),logger[_0x329f(0xa1)](_0x329f(0xb2),'执行初始化配置命令'),render(a31_0x17f143(Init,{'appcode':_0x20e0d0,'env':_0x3b77d7}));break;}case'create':{const _0x26c9bd=cli['input'][0x1]?.[_0x329f(0xbc)](),_0x2c8896=cli[_0x329f(0x9d)][_0x329f(0xab)];render(a31_0x17f143(CreateApp,{'projectCode':_0x26c9bd,'env':_0x2c8896}));break;}case _0x329f(0xc5):{cli[_0x329f(0xa0)][0x1]==='page'&&(logger[_0x329f(0xb4)](process[_0x329f(0xc0)]()),logger[_0x329f(0xa1)](_0x329f(0x93),_0x329f(0xb1)),render(a31_0x17f143(AddPage,{})));break;}case _0x329f(0x91):{try{logger[_0x329f(0xb4)](process['cwd']()),logger[_0x329f(0xa1)](_0x329f(0x91),_0x329f(0xa2)),await runStart();}catch(_0xd6370b){console[_0x329f(0x92)](_0xd6370b),process['exit'](0x1);}break;}case _0x329f(0x8b):{try{logger['setLogPath'](process[_0x329f(0xc0)]()),logger[_0x329f(0xa1)]('build',_0x329f(0xbb)),await runBuild();}catch(_0x47003a){console[_0x329f(0x92)](_0x47003a),process['exit'](0x1);}break;}case'preview':{const _0x34a251=cli[_0x329f(0x9d)]['watch'];logger[_0x329f(0xb4)](process['cwd']()),logger[_0x329f(0xa1)](_0x329f(0x97),_0x329f(0xaf)+(_0x34a251?_0x329f(0xc8):''));if(_0x34a251)try{await Promise[_0x329f(0xa9)]([runBuildWatch(),runPreview()]);}catch(_0xe893a5){console[_0x329f(0x92)](_0xe893a5),process[_0x329f(0x8a)](0x1);}else try{await runPreview();}catch(_0x20ad5b){console[_0x329f(0x92)](_0x20ad5b),process[_0x329f(0x8a)](0x1);}break;}case'config':{render(a31_0x17f143(Config,{'cli':cli}));break;}case _0x329f(0x9f):{await apiCli(cli);break;}case _0x329f(0xb8):{render(a31_0x17f143(AuthServer,{}));break;}case _0x329f(0xb5):{if(_0x32e102===_0x329f(0xaa)){logger[_0x329f(0xb4)](process[_0x329f(0xc0)]()),logger[_0x329f(0xa1)](_0x329f(0x8c),_0x329f(0x94)),render(a31_0x17f143(AppMenuUpdateCdn,{}));break;}else logger[_0x329f(0xb4)](process[_0x329f(0xc0)]()),logger[_0x329f(0xa1)](_0x329f(0x9c),_0x329f(0x96)),render(a31_0x17f143(AppMenuSyncUI,{}));break;}case _0x329f(0xa5):{logout();break;}case _0x329f(0x9e):{const _0x26134b=cli[_0x329f(0xa0)][0x1];logger[_0x329f(0xb4)](process[_0x329f(0xc0)]());if(_0x26134b===_0x329f(0xa8)){const _0x44d7bc=[];if(cli[_0x329f(0x9d)]['mcpCursor'])_0x44d7bc[_0x329f(0xad)]('cursor');if(cli[_0x329f(0x9d)]['mcpClaude'])_0x44d7bc[_0x329f(0xad)](_0x329f(0xa7));if(cli[_0x329f(0x9d)][_0x329f(0x9b)])_0x44d7bc[_0x329f(0xad)](_0x329f(0xae));logger['info'](_0x329f(0x8d),_0x329f(0x98),{'preselected':_0x44d7bc}),render(a31_0x17f143(McpInstallUI,{'preselectedIDEs':_0x44d7bc}));}else _0x26134b===_0x329f(0xc1)||cli[_0x329f(0x9d)][_0x329f(0x8e)]?await mcpCommand(_0x26134b,[],{'help':!![]}):await mcpCommand(_0x26134b,[],cli['flags']);break;}case _0x329f(0xc9):{const _0x15593e=cli['input'][0x1];logger[_0x329f(0xb4)](process['cwd']());if(_0x15593e===_0x329f(0xa8)){const _0x5ae421=[];if(cli[_0x329f(0x9d)][_0x329f(0xa9)])_0x5ae421['push'](_0x329f(0xc3),_0x329f(0xbf),_0x329f(0xa7),_0x329f(0xc4),_0x329f(0xa4),_0x329f(0xca),_0x329f(0x99),_0x329f(0xb9),_0x329f(0xac),_0x329f(0xbd));else{if(cli[_0x329f(0x9d)][_0x329f(0xc3)])_0x5ae421['push'](_0x329f(0xc3));if(cli['flags'][_0x329f(0xbf)])_0x5ae421[_0x329f(0xad)](_0x329f(0xbf));if(cli[_0x329f(0x9d)][_0x329f(0xa7)])_0x5ae421[_0x329f(0xad)]('claude');if(cli[_0x329f(0x9d)][_0x329f(0xc4)])_0x5ae421['push']('codex');if(cli['flags'][_0x329f(0xa4)])_0x5ae421[_0x329f(0xad)]('opencode');if(cli[_0x329f(0x9d)][_0x329f(0xca)])_0x5ae421['push']('qoder');if(cli[_0x329f(0x9d)][_0x329f(0x99)])_0x5ae421[_0x329f(0xad)](_0x329f(0x99));if(cli[_0x329f(0x9d)][_0x329f(0xb9)])_0x5ae421['push'](_0x329f(0xb9));if(cli['flags'][_0x329f(0xac)])_0x5ae421['push'](_0x329f(0xac));if(cli['flags'][_0x329f(0xbd)])_0x5ae421[_0x329f(0xad)]('antigravity');}logger[_0x329f(0xa1)](_0x329f(0x87),'执行安装技能包命令',{'preselected':_0x5ae421}),render(a31_0x17f143(SkillInstallUI,{'preselectedIDEs':_0x5ae421}));}else _0x15593e===_0x329f(0xc1)||cli[_0x329f(0x9d)][_0x329f(0x8e)]?await skillsCommand(_0x15593e,[],{'help':!![]}):await skillsCommand(_0x15593e,[],cli[_0x329f(0x9d)]);break;}case _0x329f(0xc2):{cli[_0x329f(0x9d)]['clear']?clearLogs():showLogs();break;}default:render(a31_0x17f143(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13ff1b,_0x7302be){const _0x953168=a32_0x4b0c,_0xb059f3=_0x13ff1b();while(!![]){try{const _0x167bc8=-parseInt(_0x953168(0x8a))/0x1*(-parseInt(_0x953168(0x90))/0x2)+-parseInt(_0x953168(0x96))/0x3*(-parseInt(_0x953168(0x8d))/0x4)+parseInt(_0x953168(0x9d))/0x5+-parseInt(_0x953168(0x8f))/0x6*(-parseInt(_0x953168(0x94))/0x7)+parseInt(_0x953168(0x86))/0x8*(-parseInt(_0x953168(0x9a))/0x9)+parseInt(_0x953168(0x9c))/0xa*(-parseInt(_0x953168(0x8e))/0xb)+parseInt(_0x953168(0x9b))/0xc*(-parseInt(_0x953168(0x87))/0xd);if(_0x167bc8===_0x7302be)break;else _0xb059f3['push'](_0xb059f3['shift']());}catch(_0x438df7){_0xb059f3['push'](_0xb059f3['shift']());}}}(a32_0x490c,0x61611));function a32_0x490c(){const _0x1bc158=['87006brtTqD','10460NwXvRN','npm\x20run\x20build\x20exited\x20with\x20code\x20','inherit','node_modules','7WbAisS','.bin','18VeHZjG','build','--watch','close','9DUKpDT','11604oYyVgk','70JmmfEw','2913095LuPRyw','1677272QezAHF','18213wJdwSo','error','PATH','136GVpegS','env','vite','527776huAKov','214929tULyxT'];a32_0x490c=function(){return _0x1bc158;};return a32_0x490c();}import{spawn}from'node:child_process';function a32_0x4b0c(_0x37ba4e,_0x5aacc2){_0x37ba4e=_0x37ba4e-0x86;const _0x490cc2=a32_0x490c();let _0x4b0c41=_0x490cc2[_0x37ba4e];return _0x4b0c41;}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x4c197c,_0x5ed287)=>{const _0x6f961a=a32_0x4b0c,_0xb16851=spawn(_0x6f961a(0x8c),[_0x6f961a(0x97),_0x6f961a(0x98)],{'stdio':_0x6f961a(0x92),'shell':!![],'env':{...process[_0x6f961a(0x8b)],'PATH':''+join(process['cwd'](),_0x6f961a(0x93),_0x6f961a(0x95))+delimiter+process['env'][_0x6f961a(0x89)]}});_0xb16851['on'](_0x6f961a(0x99),_0x5032ae=>{const _0x5c4dfb=_0x6f961a;if(_0x5032ae===0x0||_0x5032ae===null)_0x4c197c();else _0x5ed287(new Error(_0x5c4dfb(0x91)+_0x5032ae));}),_0xb16851['on'](_0x6f961a(0x88),_0x5ed287);});}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22eb2e,_0x212195){const _0x5cef7c=a33_0x1f5c,_0xe6dbda=_0x22eb2e();while(!![]){try{const _0x4392bf=-parseInt(_0x5cef7c(0x123))/0x1+-parseInt(_0x5cef7c(0x11e))/0x2*(-parseInt(_0x5cef7c(0x129))/0x3)+-parseInt(_0x5cef7c(0x12f))/0x4+parseInt(_0x5cef7c(0x11f))/0x5+-parseInt(_0x5cef7c(0x126))/0x6*(parseInt(_0x5cef7c(0x122))/0x7)+-parseInt(_0x5cef7c(0x121))/0x8+parseInt(_0x5cef7c(0x11b))/0x9;if(_0x4392bf===_0x212195)break;else _0xe6dbda['push'](_0xe6dbda['shift']());}catch(_0x153fa7){_0xe6dbda['push'](_0xe6dbda['shift']());}}}(a33_0x1339,0x9526b));function a33_0x1f5c(_0x5c0e2c,_0x3bfa2e){_0x5c0e2c=_0x5c0e2c-0x11a;const _0x1339ea=a33_0x1339();let _0x1f5c6b=_0x1339ea[_0x5c0e2c];return _0x1f5c6b;}import{delimiter,join}from'node:path';function a33_0x1339(){const _0x53ade3=['info','npm','stderr','540696rzxJjr','trim','now','error','close','toString','node_modules','inherit','20657070MMmyoc','cwd','data','2XEFtHv','1482085sxoDqE','build','7456448dJGBac','35psAfNp','693148nZehyT','npm\x20run\x20build','env','279498KhmXtg','PATH','message','37707PnZBMp','.bin','run'];a33_0x1339=function(){return _0x53ade3;};return a33_0x1339();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0xc525cb,_0x40333d)=>{const _0x30bb0f=a33_0x1f5c,_0x51c957=Date[_0x30bb0f(0x131)]();logger[_0x30bb0f(0x12c)](_0x30bb0f(0x120),'开始构建项目',{'command':_0x30bb0f(0x124)});let _0x4fb075='';const _0x4add62=spawn(_0x30bb0f(0x12d),[_0x30bb0f(0x12b),_0x30bb0f(0x120)],{'stdio':[_0x30bb0f(0x11a),_0x30bb0f(0x11a),'pipe'],'shell':!![],'env':{...process[_0x30bb0f(0x125)],'PATH':''+join(process[_0x30bb0f(0x11c)](),_0x30bb0f(0x135),_0x30bb0f(0x12a))+delimiter+process[_0x30bb0f(0x125)][_0x30bb0f(0x127)]}});_0x4add62[_0x30bb0f(0x12e)]?.['on'](_0x30bb0f(0x11d),_0x367b7f=>{const _0x171c22=_0x30bb0f;_0x4fb075+=_0x367b7f[_0x171c22(0x134)]();}),_0x4add62['on'](_0x30bb0f(0x133),_0x2944a6=>{const _0x111125=_0x30bb0f,_0x3424c4=Date[_0x111125(0x131)]()-_0x51c957;if(_0x2944a6===0x0||_0x2944a6===null)logger['success']('build','项目构建成功',_0x3424c4),_0xc525cb();else{const _0x5a848c={'exitCode':_0x2944a6,'duration':_0x3424c4,'command':'npm\x20run\x20build','cwd':process[_0x111125(0x11c)]()};_0x4fb075[_0x111125(0x130)]()&&(_0x5a848c[_0x111125(0x12e)]=_0x4fb075['trim']()),logger['error'](_0x111125(0x120),'项目构建失败',_0x5a848c),_0x40333d(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x2944a6));}}),_0x4add62['on'](_0x30bb0f(0x132),_0x35498f=>{const _0x1e0207=_0x30bb0f,_0xb8956a=Date['now']()-_0x51c957;logger[_0x1e0207(0x132)]('build','项目构建出错',{'error':_0x35498f[_0x1e0207(0x128)],'duration':_0xb8956a,'stderr':_0x4fb075[_0x1e0207(0x130)]()||undefined}),_0x40333d(_0x35498f);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a34_0x44ac(){const _0x4673d2=['*\x20Lovrabet\x20CLI\x20日志记录:\x0a','level','20430hRZRYW','839118fSqBFJ','log','1557070wNvrmD','length','command','toLocaleString','6QYimtg','cwd','1410328PaxFtr','2154447ZQcAtq','duration','235723NjptgZ','143116OcBrdl','details','keys','stringify','timestamp','warn','clearLogs','forEach','readLogs','\x20\x20\x20详情:\x20','error','zh-CN','setLogPath','*\x20日志已清空','100ADyrTF'];a34_0x44ac=function(){return _0x4673d2;};return a34_0x44ac();}(function(_0x3d1e28,_0xcdd71d){const _0x48ca12=a34_0x122d,_0x2f1141=_0x3d1e28();while(!![]){try{const _0x2355fa=-parseInt(_0x48ca12(0x1a2))/0x1+parseInt(_0x48ca12(0x1a3))/0x2+parseInt(_0x48ca12(0x1b4))/0x3*(-parseInt(_0x48ca12(0x1b1))/0x4)+-parseInt(_0x48ca12(0x199))/0x5*(-parseInt(_0x48ca12(0x19d))/0x6)+parseInt(_0x48ca12(0x1b5))/0x7+-parseInt(_0x48ca12(0x19f))/0x8+parseInt(_0x48ca12(0x1a0))/0x9;if(_0x2355fa===_0xcdd71d)break;else _0x2f1141['push'](_0x2f1141['shift']());}catch(_0x362c25){_0x2f1141['push'](_0x2f1141['shift']());}}}(a34_0x44ac,0x270dd));import{logger}from'../utils/logger.js';export function showLogs(){const _0x24c5ee=a34_0x122d;logger['setLogPath'](process['cwd']());const _0x201e56=logger[_0x24c5ee(0x1ab)]();if(_0x201e56[_0x24c5ee(0x19a)]===0x0){console[_0x24c5ee(0x1b6)]('*\x20暂无日志记录');return;}console[_0x24c5ee(0x1b6)](_0x24c5ee(0x1b2)),_0x201e56[_0x24c5ee(0x1aa)]((_0x3129e8,_0x2f2e61)=>{const _0x1ff1a5=_0x24c5ee,_0x55555e=new Date(_0x3129e8[_0x1ff1a5(0x1a7)])[_0x1ff1a5(0x19c)](_0x1ff1a5(0x1ae)),_0x5d8793=_0x3129e8[_0x1ff1a5(0x1b3)]==='success'?'√':_0x3129e8[_0x1ff1a5(0x1b3)]===_0x1ff1a5(0x1ad)?'×':_0x3129e8[_0x1ff1a5(0x1b3)]===_0x1ff1a5(0x1a8)?'!':'i';console[_0x1ff1a5(0x1b6)](_0x2f2e61+0x1+'.\x20'+_0x5d8793+'\x20['+_0x3129e8[_0x1ff1a5(0x19b)]+']\x20'+_0x3129e8['message']),console[_0x1ff1a5(0x1b6)]('\x20\x20\x20时间:\x20'+_0x55555e),_0x3129e8[_0x1ff1a5(0x1a1)]&&console[_0x1ff1a5(0x1b6)]('\x20\x20\x20耗时:\x20'+_0x3129e8[_0x1ff1a5(0x1a1)]+'ms'),_0x3129e8['details']&&Object[_0x1ff1a5(0x1a5)](_0x3129e8[_0x1ff1a5(0x1a4)])['length']>0x0&&console['log'](_0x1ff1a5(0x1ac)+JSON[_0x1ff1a5(0x1a6)](_0x3129e8[_0x1ff1a5(0x1a4)],null,0x2)),console['log']('');});}function a34_0x122d(_0x3aded1,_0x7dbd7e){_0x3aded1=_0x3aded1-0x199;const _0x44aca5=a34_0x44ac();let _0x122d3e=_0x44aca5[_0x3aded1];return _0x122d3e;}export function clearLogs(){const _0x3bc1e8=a34_0x122d;logger[_0x3bc1e8(0x1af)](process[_0x3bc1e8(0x19e)]()),logger[_0x3bc1e8(0x1a9)](),console[_0x3bc1e8(0x1b6)](_0x3bc1e8(0x1b0));}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bbeee,_0x4065ae){const _0x2901bf=a35_0xa637,_0x23088b=_0x4bbeee();while(!![]){try{const _0x13105d=parseInt(_0x2901bf(0x1b9))/0x1+-parseInt(_0x2901bf(0x1ae))/0x2*(parseInt(_0x2901bf(0x1b6))/0x3)+-parseInt(_0x2901bf(0x1a7))/0x4*(-parseInt(_0x2901bf(0x1bb))/0x5)+-parseInt(_0x2901bf(0x1c2))/0x6+-parseInt(_0x2901bf(0x1b2))/0x7+parseInt(_0x2901bf(0x1be))/0x8+parseInt(_0x2901bf(0x1bc))/0x9;if(_0x13105d===_0x4065ae)break;else _0x23088b['push'](_0x23088b['shift']());}catch(_0x1ea0bb){_0x23088b['push'](_0x23088b['shift']());}}}(a35_0x5964,0x2ae2b));function a35_0x5964(){const _0x20e4c9=['1418868OaBkjC','env','727564EzfePu','cwd','.bin','error','预览服务器启动失败','vite\x20preview','PATH','250066wjLNCN','preview','now','message','304416PINYCP','vite','stderr','inherit','3pzoMCA','pipe','info','184007CbhjGP','预览服务器启动出错','5ZThmXk','1597905iBsyGX','node_modules','297720zQGkaQ','预览服务器启动成功','vite\x20preview\x20exited\x20with\x20code\x20','trim'];a35_0x5964=function(){return _0x20e4c9;};return a35_0x5964();}import{delimiter,join}from'node:path';function a35_0xa637(_0x353a3d,_0x399456){_0x353a3d=_0x353a3d-0x1a7;const _0x5964eb=a35_0x5964();let _0xa637e3=_0x5964eb[_0x353a3d];return _0xa637e3;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x4e4157,_0x5d8c4b)=>{const _0x3ba1af=a35_0xa637,_0xc7a9ff=Date[_0x3ba1af(0x1b0)]();logger[_0x3ba1af(0x1b8)](_0x3ba1af(0x1af),'启动预览服务器',{'command':_0x3ba1af(0x1ac)});let _0x41201c='';const _0x259c3a=spawn(_0x3ba1af(0x1b3),['preview'],{'stdio':['inherit',_0x3ba1af(0x1b5),_0x3ba1af(0x1b7)],'shell':!![],'env':{...process[_0x3ba1af(0x1c3)],'PATH':''+join(process[_0x3ba1af(0x1a8)](),_0x3ba1af(0x1bd),_0x3ba1af(0x1a9))+delimiter+process[_0x3ba1af(0x1c3)][_0x3ba1af(0x1ad)]}});_0x259c3a['stderr']?.['on']('data',_0xa12c51=>{_0x41201c+=_0xa12c51['toString']();}),_0x259c3a['on']('close',_0xd0bdba=>{const _0xe2fef5=_0x3ba1af,_0x16ecab=Date['now']()-_0xc7a9ff;if(_0xd0bdba===0x0||_0xd0bdba===null)logger['success'](_0xe2fef5(0x1af),_0xe2fef5(0x1bf),_0x16ecab),_0x4e4157();else{const _0x437cca={'exitCode':_0xd0bdba,'duration':_0x16ecab,'command':_0xe2fef5(0x1ac),'cwd':process[_0xe2fef5(0x1a8)]()};_0x41201c['trim']()&&(_0x437cca[_0xe2fef5(0x1b4)]=_0x41201c[_0xe2fef5(0x1c1)]()),logger[_0xe2fef5(0x1aa)](_0xe2fef5(0x1af),_0xe2fef5(0x1ab),_0x437cca),_0x5d8c4b(new Error(_0xe2fef5(0x1c0)+_0xd0bdba));}}),_0x259c3a['on'](_0x3ba1af(0x1aa),_0x46b1a5=>{const _0x34b844=_0x3ba1af,_0x34d496=Date['now']()-_0xc7a9ff;logger[_0x34b844(0x1aa)](_0x34b844(0x1af),_0x34b844(0x1ba),{'error':_0x46b1a5[_0x34b844(0x1b1)],'duration':_0x34d496,'stderr':_0x41201c[_0x34b844(0x1c1)]()||undefined}),_0x5d8c4b(_0x46b1a5);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a36_0x4e43(){const _0x1e87bb=['3192faTcjc','info','minVersion','stderr','开发服务器启动出错','555138SMuiiW','needsUpgrade','20EyuSwb','173015BGPJRF','启动开发服务器','4248DxcSBk','187318OTINKb','toString','node_modules','4977138XJxale','trim','data','10cjkIIP','vite\x20exited\x20with\x20code\x20','.bin','env','40cxduTp','warn','pipe','PATH','write','1224245HyQJfi','4933656KZznkQ','cwd','version','error','inherit','vite','start','close'];a36_0x4e43=function(){return _0x1e87bb;};return a36_0x4e43();}(function(_0x2b24b2,_0x10f75a){const _0x1236dd=a36_0x5a36,_0x478825=_0x2b24b2();while(!![]){try{const _0x36bc86=parseInt(_0x1236dd(0x133))/0x1*(-parseInt(_0x1236dd(0x139))/0x2)+-parseInt(_0x1236dd(0x12d))/0x3+-parseInt(_0x1236dd(0x13d))/0x4*(-parseInt(_0x1236dd(0x130))/0x5)+parseInt(_0x1236dd(0x136))/0x6+parseInt(_0x1236dd(0x128))/0x7*(parseInt(_0x1236dd(0x132))/0x8)+parseInt(_0x1236dd(0x143))/0x9+-parseInt(_0x1236dd(0x12f))/0xa*(parseInt(_0x1236dd(0x142))/0xb);if(_0x36bc86===_0x10f75a)break;else _0x478825['push'](_0x478825['shift']());}catch(_0x2332b7){_0x478825['push'](_0x478825['shift']());}}}(a36_0x4e43,0x97c4f));import{delimiter,join}from'node:path';function a36_0x5a36(_0x4c4eb4,_0x904ff8){_0x4c4eb4=_0x4c4eb4-0x127;const _0x4e43e1=a36_0x4e43();let _0x5a361c=_0x4e43e1[_0x4c4eb4];return _0x5a361c;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x3920cc){return new Promise((_0x2938ca,_0xc0e103)=>{const _0x4ee42f=a36_0x5a36,_0x40c276=Date['now'](),_0x2d1ee4=_0x3920cc||process[_0x4ee42f(0x144)](),_0x222917=checkSdkVersion(_0x2d1ee4);_0x222917[_0x4ee42f(0x12e)]&&(printSdkUpgradeWarning(_0x222917),logger[_0x4ee42f(0x13e)]('start','SDK\x20版本低于推荐版本',{'currentVersion':_0x222917[_0x4ee42f(0x145)],'minVersion':_0x222917[_0x4ee42f(0x12a)]}));logger[_0x4ee42f(0x129)]('start',_0x4ee42f(0x131),{'command':_0x4ee42f(0x148),'cwd':_0x2d1ee4});let _0x3b9511='';const _0x2dcfe9=spawn(_0x4ee42f(0x148),{'stdio':[_0x4ee42f(0x147),'inherit',_0x4ee42f(0x13f)],'shell':!![],'cwd':_0x2d1ee4,'env':{...process[_0x4ee42f(0x13c)],'PATH':''+join(_0x2d1ee4,_0x4ee42f(0x135),_0x4ee42f(0x13b))+delimiter+process[_0x4ee42f(0x13c)][_0x4ee42f(0x140)]}});_0x2dcfe9['stderr']?.['on'](_0x4ee42f(0x138),_0x70280c=>{const _0x207397=_0x4ee42f,_0x379b45=_0x70280c[_0x207397(0x134)]();_0x3b9511+=_0x379b45,process['stderr'][_0x207397(0x141)](_0x379b45);}),_0x2dcfe9['on'](_0x4ee42f(0x127),_0x5baf30=>{const _0x4d01e6=_0x4ee42f,_0x5768e7=Date['now']()-_0x40c276;if(_0x5baf30===0x0||_0x5baf30===null)logger['success'](_0x4d01e6(0x149),'开发服务器启动成功',_0x5768e7),_0x2938ca();else{const _0x5a7afa={'exitCode':_0x5baf30,'duration':_0x5768e7,'command':_0x4d01e6(0x148),'cwd':_0x2d1ee4};_0x3b9511['trim']()&&(_0x5a7afa[_0x4d01e6(0x12b)]=_0x3b9511['trim']()),logger['error'](_0x4d01e6(0x149),'开发服务器启动失败',_0x5a7afa),_0xc0e103(new Error(_0x4d01e6(0x13a)+_0x5baf30));}}),_0x2dcfe9['on'](_0x4ee42f(0x146),_0x19f55d=>{const _0x361244=_0x4ee42f,_0x54f4d2=Date['now']()-_0x40c276,_0x11de4f={'error':_0x19f55d['message'],'duration':_0x54f4d2,'command':_0x361244(0x148),'cwd':_0x2d1ee4};_0x3b9511[_0x361244(0x137)]()&&(_0x11de4f[_0x361244(0x12b)]=_0x3b9511[_0x361244(0x137)]()),logger['error'](_0x361244(0x149),_0x361244(0x12c),_0x11de4f),_0xc0e103(_0x19f55d);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc83808,_0x4fca52){const _0x355e86=a37_0x5c8f,_0xf29520=_0xc83808();while(!![]){try{const _0x55f9df=parseInt(_0x355e86(0x1f2))/0x1*(-parseInt(_0x355e86(0x1ee))/0x2)+-parseInt(_0x355e86(0x1f7))/0x3+parseInt(_0x355e86(0x1e8))/0x4+parseInt(_0x355e86(0x1f6))/0x5+parseInt(_0x355e86(0x1e9))/0x6*(-parseInt(_0x355e86(0x1f5))/0x7)+parseInt(_0x355e86(0x1f9))/0x8+parseInt(_0x355e86(0x1f0))/0x9;if(_0x55f9df===_0x4fca52)break;else _0xf29520['push'](_0xf29520['shift']());}catch(_0x10089f){_0xf29520['push'](_0xf29520['shift']());}}}(a37_0x5bc4,0x79bf0));function a37_0x5bc4(){const _0x39de98=['description','\x20\x20\x20\x20','列出所有配置项','获取配置项','gray','2192260aHvCDU','2558118GZHHiN','column','设置环境\x20(online/daily)','无效的命令,可用命令如下:','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','14djaHKQ','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','5054265BjOQyW','\x20*\x20配置示例:','14799SZunRh','map','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','14gVNUIY','3352390qUlbnv','2652033uOtLdt','command','4470832UMyisX','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a37_0x5bc4=function(){return _0x39de98;};return a37_0x5bc4();}function a37_0x5c8f(_0x22719f,_0x3f2fe5){_0x22719f=_0x22719f-0x1e6;const _0x5bc408=a37_0x5bc4();let _0x5c8fcc=_0x5bc408[_0x22719f];return _0x5c8fcc;}import{jsxs as a37_0x5262bd,jsx as a37_0x1530e7}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x4b57a5=a37_0x5c8f,_0x156a02=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':'设置配置项'},{'command':_0x4b57a5(0x1fa),'description':_0x4b57a5(0x1e6)},{'command':_0x4b57a5(0x1ef),'description':_0x4b57a5(0x1fd)}],_0x29e392=[{'command':_0x4b57a5(0x1ed),'description':'配置当前项目的\x20App\x20Code'},{'command':_0x4b57a5(0x1f4),'description':_0x4b57a5(0x1eb)}];return a37_0x5262bd(Box,{'flexDirection':_0x4b57a5(0x1ea),'marginTop':0x1,'marginBottom':0x1,'children':[a37_0x1530e7(Box,{'marginBottom':0x1,'children':a37_0x5262bd(Text,{'color':_0x4b57a5(0x1e7),'children':['\x20!','\x20\x20',_0x4b57a5(0x1ec)]})}),_0x156a02[_0x4b57a5(0x1f3)](_0x413875=>a37_0x5262bd(Box,{'children':[a37_0x5262bd(Text,{'children':[_0x4b57a5(0x1fc),_0x413875['command']]}),a37_0x1530e7(Text,{'color':_0x4b57a5(0x1e7),'children':_0x413875[_0x4b57a5(0x1fb)]})]},_0x413875[_0x4b57a5(0x1f8)])),a37_0x1530e7(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a37_0x1530e7(Text,{'color':'gray','children':_0x4b57a5(0x1f1)})}),_0x29e392['map'](_0x161d59=>a37_0x5262bd(Box,{'children':[a37_0x5262bd(Text,{'children':[_0x4b57a5(0x1fc),_0x161d59[_0x4b57a5(0x1f8)]]}),a37_0x1530e7(Text,{'color':_0x4b57a5(0x1e7),'children':_0x161d59[_0x4b57a5(0x1fb)]})]},_0x161d59[_0x4b57a5(0x1f8)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4daa23,_0x102764){const _0x991d70=a38_0x2a14,_0x47c229=_0x4daa23();while(!![]){try{const _0x49a8f4=-parseInt(_0x991d70(0x146))/0x1*(parseInt(_0x991d70(0x145))/0x2)+-parseInt(_0x991d70(0x13b))/0x3*(-parseInt(_0x991d70(0x147))/0x4)+parseInt(_0x991d70(0x135))/0x5+-parseInt(_0x991d70(0x12d))/0x6+-parseInt(_0x991d70(0x12f))/0x7+parseInt(_0x991d70(0x141))/0x8*(-parseInt(_0x991d70(0x140))/0x9)+-parseInt(_0x991d70(0x143))/0xa*(-parseInt(_0x991d70(0x142))/0xb);if(_0x49a8f4===_0x102764)break;else _0x47c229['push'](_0x47c229['shift']());}catch(_0x3e42f5){_0x47c229['push'](_0x47c229['shift']());}}}(a38_0x3ac7,0xa8eaa));import{jsx as a38_0x2a7ecc,jsxs as a38_0x2f7efd}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a38_0x41060d from'node:fs';import a38_0x3f449f from'node:path';function a38_0x2a14(_0x59a57f,_0x3c4caa){_0x59a57f=_0x59a57f-0x128;const _0x3ac7d9=a38_0x3ac7();let _0x2a1467=_0x3ac7d9[_0x59a57f];return _0x2a1467;}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';function a38_0x3ac7(){const _0x384f31=['log','.tmp','保存配置失败','red','unlinkSync','4310280TDlRVa','app','undefined','utf8','length','保存配置失败:\x20','1137066pkTVzv','env','appcode','flags','stringify','10128609IuniCp','8YJHzaY','446578pDMGpy','760ApcTFW','message','2SubukZ','1293561uyqjJj','4PkUfXT','input','daily','includes','配置值无效或过长','error','1340946qUjUhS','get','6945337cqQcAY'];a38_0x3ac7=function(){return _0x384f31;};return a38_0x3ac7();}export function Config(_0x594fb8){const _0x1c3a13=a38_0x2a14,{cli:_0x4241c6}=_0x594fb8,_0x3a5009=_0x4241c6[_0x1c3a13(0x128)][0x1],_0x4b226f=_0x4241c6[_0x1c3a13(0x128)][0x2],_0x4b27be=['set',_0x1c3a13(0x12e)][_0x1c3a13(0x12a)](_0x3a5009||''),_0x566313=_0x4241c6[_0x1c3a13(0x128)][_0x1c3a13(0x139)]>=0x3;if(_0x4b226f==='--help'||_0x4241c6[_0x1c3a13(0x13e)]['help'])return a38_0x2a7ecc(ConfigHelp,{});const _0x3f1414=readConfig();if(_0x3a5009==='set'){if(_0x4b226f){const _0x4df0ef=_0x4241c6[_0x1c3a13(0x128)][0x3];if(typeof _0x4df0ef!=='undefined'){if(_0x4b226f==='env'&&!['online',_0x1c3a13(0x129)]['includes'](_0x4df0ef))return a38_0x2a7ecc(Box,{'children':a38_0x2a7ecc(Text,{'color':_0x1c3a13(0x133),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x3b33a5=isInProject(),_0x46d182=_0x3b33a5?projectConfigPath:globalConfigPath;let _0x9f0856={};try{if(existsSync(_0x46d182)){const _0x2b3231=readFileSync(_0x46d182,{'encoding':'utf8'});_0x2b3231&&(_0x9f0856=JSON['parse'](_0x2b3231));}}catch(_0x488fed){}if(typeof _0x4df0ef!=='string'||_0x4df0ef[_0x1c3a13(0x139)]>0x1f4)return a38_0x2a7ecc(Box,{'children':a38_0x2a7ecc(Text,{'color':_0x1c3a13(0x133),'children':_0x1c3a13(0x12b)})});let _0x1ce5af=_0x4b226f;_0x4b226f===_0x1c3a13(0x136)&&(_0x1ce5af='appcode',delete _0x9f0856[_0x1c3a13(0x136)]);_0x4b226f==='appcode'&&delete _0x9f0856[_0x1c3a13(0x136)];_0x9f0856[_0x1ce5af]=_0x4df0ef;try{const _0x1a8cd5=a38_0x3f449f['dirname'](_0x46d182);!existsSync(_0x1a8cd5)&&a38_0x41060d['mkdirSync'](_0x1a8cd5,{'recursive':!![]});const _0x3b5ce8=_0x46d182+_0x1c3a13(0x131);writeFileSync(_0x3b5ce8,JSON[_0x1c3a13(0x13f)](_0x9f0856,null,0x2),{'encoding':_0x1c3a13(0x138),'mode':0x180}),a38_0x41060d['renameSync'](_0x3b5ce8,_0x46d182);if(_0x4b226f===_0x1c3a13(0x13c)){const _0x226882=_0x3b33a5?'项目':'全局';console['log']('✓\x20'+_0x226882+'环境配置已设置为:\x20'+_0x4df0ef);}}catch(_0x2f3a1c){const _0x440ae0=_0x46d182+_0x1c3a13(0x131);try{existsSync(_0x440ae0)&&a38_0x41060d[_0x1c3a13(0x134)](_0x440ae0);}catch(_0x303153){}return logger[_0x1c3a13(0x12c)]('config',_0x1c3a13(0x132),{'error':_0x2f3a1c instanceof Error?_0x2f3a1c[_0x1c3a13(0x144)]:String(_0x2f3a1c),'configKey':_0x4b226f,'configValue':_0x4df0ef,'targetConfigPath':_0x46d182}),a38_0x2a7ecc(Box,{'children':a38_0x2f7efd(Text,{'color':'red','children':[_0x1c3a13(0x13a),_0x2f3a1c instanceof Error?_0x2f3a1c[_0x1c3a13(0x144)]:String(_0x2f3a1c)]})});}return null;}return a38_0x2a7ecc(Box,{'children':a38_0x2a7ecc(Text,{'color':_0x1c3a13(0x133),'children':'未提供配置值'})});}}if(_0x3a5009===_0x1c3a13(0x12e)){if(_0x4b226f){let _0x563aa9=_0x4b226f;return _0x4b226f===_0x1c3a13(0x136)&&(_0x563aa9=_0x1c3a13(0x13d)),console[_0x1c3a13(0x130)](_0x3f1414[_0x563aa9]||_0x1c3a13(0x137)),null;}return null;}if(_0x3a5009==='list')return console[_0x1c3a13(0x130)](JSON[_0x1c3a13(0x13f)](_0x3f1414,null,0x2)),null;if(!_0x4b27be||!_0x566313)return a38_0x2a7ecc(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a39_0x5401fd=a39_0x52dc;(function(_0x21ee92,_0x137c0d){const _0x1dab9d=a39_0x52dc,_0x4f6501=_0x21ee92();while(!![]){try{const _0x363c4e=parseInt(_0x1dab9d(0xb1))/0x1+-parseInt(_0x1dab9d(0xb8))/0x2+parseInt(_0x1dab9d(0xb3))/0x3*(-parseInt(_0x1dab9d(0xb0))/0x4)+-parseInt(_0x1dab9d(0xbb))/0x5+-parseInt(_0x1dab9d(0xb5))/0x6+-parseInt(_0x1dab9d(0xb2))/0x7*(-parseInt(_0x1dab9d(0xb4))/0x8)+parseInt(_0x1dab9d(0xba))/0x9;if(_0x363c4e===_0x137c0d)break;else _0x4f6501['push'](_0x4f6501['shift']());}catch(_0x294588){_0x4f6501['push'](_0x4f6501['shift']());}}}(a39_0x57ef,0x5498c));import{getEnv}from'./env.js';function a39_0x52dc(_0x1e5817,_0x3f619d){_0x1e5817=_0x1e5817-0xb0;const _0x57efe9=a39_0x57ef();let _0x52dcd7=_0x57efe9[_0x1e5817];return _0x52dcd7;}function a39_0x57ef(){const _0xe05d9d=['online','https://user.lovrabet.com','737566KrXcbF','https://daily-api.lovrabet.com','8262999UbyMbV','320910dRNVIL','https://user-daily.lovrabet.com','1379900tKrLQR','614254bUEomA','1068669VMXjtQ','3yzeVnd','8vowgVC','3363504SgDdBn'];a39_0x57ef=function(){return _0xe05d9d;};return a39_0x57ef();}export const getUserDomain=()=>getEnv()===a39_0x5401fd(0xb6)?a39_0x5401fd(0xb7):a39_0x5401fd(0xbc);export const getApiDomain=()=>getEnv()===a39_0x5401fd(0xb6)?'https://api.lovrabet.com':a39_0x5401fd(0xb9);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a40_0x4341(_0x4017af,_0x30292f){_0x4017af=_0x4017af-0x1b5;const _0x2c2ae0=a40_0x2c2a();let _0x4341f0=_0x2c2ae0[_0x4017af];return _0x4341f0;}function a40_0x2c2a(){const _0x3d0e4a=['486351bixupB','100Lzdtgj','17924kdnfgy','1504041qDAqfC','21153324TOolVC','LOVRABET_ENV','104dIXeYo','online','336wsGaSy','113309oaIlDR','85uwPEPl','10280jSVEWF','3746150aJzUbX','78VJqOne','env'];a40_0x2c2a=function(){return _0x3d0e4a;};return a40_0x2c2a();}const a40_0x1e5b7d=a40_0x4341;(function(_0x3cf77c,_0x538c3f){const _0x1ba2df=a40_0x4341,_0x4752aa=_0x3cf77c();while(!![]){try{const _0x28a342=-parseInt(_0x1ba2df(0x1bd))/0x1*(parseInt(_0x1ba2df(0x1b5))/0x2)+parseInt(_0x1ba2df(0x1bb))/0x3*(parseInt(_0x1ba2df(0x1be))/0x4)+-parseInt(_0x1ba2df(0x1bf))/0x5+parseInt(_0x1ba2df(0x1c0))/0x6*(-parseInt(_0x1ba2df(0x1bc))/0x7)+parseInt(_0x1ba2df(0x1b9))/0x8*(-parseInt(_0x1ba2df(0x1c2))/0x9)+parseInt(_0x1ba2df(0x1c3))/0xa*(parseInt(_0x1ba2df(0x1b6))/0xb)+parseInt(_0x1ba2df(0x1b7))/0xc;if(_0x28a342===_0x538c3f)break;else _0x4752aa['push'](_0x4752aa['shift']());}catch(_0x10a9f0){_0x4752aa['push'](_0x4752aa['shift']());}}}(a40_0x2c2a,0xf2ac5));let env=process[a40_0x1e5b7d(0x1c1)][a40_0x1e5b7d(0x1b8)]||a40_0x1e5b7d(0x1ba);export function getEnv(){return env;}export function initEnv(_0x37647b){env=_0x37647b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x15051a=a41_0x295a;(function(_0x2b5161,_0x45bd00){const _0x566a4f=a41_0x295a,_0x437488=_0x2b5161();while(!![]){try{const _0x5c3bb4=-parseInt(_0x566a4f(0x211))/0x1*(parseInt(_0x566a4f(0x1b7))/0x2)+parseInt(_0x566a4f(0x1bb))/0x3*(-parseInt(_0x566a4f(0x1ca))/0x4)+parseInt(_0x566a4f(0x1e8))/0x5*(parseInt(_0x566a4f(0x20c))/0x6)+-parseInt(_0x566a4f(0x1e2))/0x7*(-parseInt(_0x566a4f(0x1d6))/0x8)+-parseInt(_0x566a4f(0x21b))/0x9*(-parseInt(_0x566a4f(0x1e0))/0xa)+parseInt(_0x566a4f(0x1de))/0xb+-parseInt(_0x566a4f(0x1c6))/0xc;if(_0x5c3bb4===_0x45bd00)break;else _0x437488['push'](_0x437488['shift']());}catch(_0x36e9a9){_0x437488['push'](_0x437488['shift']());}}}(a41_0x24b8,0x31807));import{jsx as a41_0x4492c3,jsxs as a41_0x198c89,Fragment as a41_0x3e123d}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';function a41_0x24b8(){const _0x3d4aa2=['\x20+MCP','has','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','return','登录失败','from','748AXgVqX','[✓]','项目名长度不能超过\x2050\x20个字符','[\x20]','9qSTtuU','confirm-api-pull','lovrabet-setup','Cursor','description','!\x20未检测到有效登录','请至少选择一个\x20IDE','*\x20正在登录,请前往浏览器完成登录...','length','add','map','1144632HqnfZi','windsurf','test','跳过登录','413360WtWLMk','rightArrow','目录\x20\x22','backspace','项目名不合法','cursor','yellow','name','green','codebuddy','拉取API配置','includes','4264ZgPYGK','qoder','Antigravity\x20IDE\x20(.agent/skills/)','codex','选择要配置的\x20IDE:','*\x20应用AppCode\x20','其他\x20(通用模板)','*\x20正在检查登录状态...','2090869wQaJlO','value','281150NXFpWY','Yes','4291gzNcIh','claude','未设置','\x22\x20已存在','OpenCode','MCP\x20和\x20Skill','8420thzCGa','\x20\x20使用\x20←→\x20选择,回车确认','\x20登录中...','Windsurf\x20IDE\x20(.windsurf/workflows/)','login-prompt','CodeBuddy\x20IDE\x20(.codebuddy/skills/)','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','\x20直接回车确认,或输入自定义名称','slice','string','Claude\x20Code\x20(.claude/skills/\x20+\x20MCP\x20服务器)','lovrabet-setup-selection','red','delete','Codex','login-check','filter','*\x20是否要先登录以便拉取\x20API\x20配置?','login-process','*\x20正在创建项目...','white','column','*\x20项目名:\x20','label','online','通用模板\x20(.agent/skills/)\x20-\x20兜底方案','api-pull','env','leftArrow','creating','login','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','cwd','gray','blue','downArrow','462kkCRFn','step','trim','Qoder','*\x20是否要自动拉取\x20API\x20配置?','779FnNKKU','project-name','my-app','Trae','\x20←\x20','OpenCode\x20IDE\x20(.opencode/skills/)','cyan','登录状态','*\x20创建新项目','trae','81uvFsnb','\x22\x20已存在,请使用其他名称','Codex\x20IDE\x20(.codex/skills/)','\x20个\x20IDE','app-code','应用AppCode不合法'];a41_0x24b8=function(){return _0x3d4aa2;};return a41_0x24b8();}import a41_0x129496 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a41_0x295a(_0x97a014,_0x2f48ac){_0x97a014=_0x97a014-0x1b2;const _0x24b847=a41_0x24b8();let _0x295a25=_0x24b847[_0x97a014];return _0x295a25;}import{readConfig}from'../utils/config.js';const IDE_CONFIGS={'cursor':{'name':a41_0x15051a(0x1be),'description':'Cursor\x20IDE\x20(.cursorrules\x20+\x20MCP\x20服务器)'},'windsurf':{'name':'Windsurf','description':a41_0x15051a(0x1eb)},'claude':{'name':'Claude\x20Code','description':a41_0x15051a(0x1f2)},'codex':{'name':a41_0x15051a(0x1f6),'description':a41_0x15051a(0x21d)},'opencode':{'name':a41_0x15051a(0x1e6),'description':a41_0x15051a(0x216)},'qoder':{'name':a41_0x15051a(0x20f),'description':'Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)'},'codebuddy':{'name':'CodeBuddy','description':a41_0x15051a(0x1ed)},'trae':{'name':a41_0x15051a(0x214),'description':'Trae\x20IDE\x20(.trae/skills/)'},'antigravity':{'name':'Antigravity','description':a41_0x15051a(0x1d8)},'agent':{'name':a41_0x15051a(0x1dc),'description':a41_0x15051a(0x201)}},IDE_LIST=['antigravity',a41_0x15051a(0x1e3),a41_0x15051a(0x1d3),a41_0x15051a(0x1d9),a41_0x15051a(0x1cf),'opencode',a41_0x15051a(0x1d7),a41_0x15051a(0x21a),a41_0x15051a(0x1c7),'agent'],MCP_IDES=new Set(['cursor',a41_0x15051a(0x1e3)]);export function EnhancedGuidedCreate(_0x94c0d7){const _0xcc52e2=a41_0x15051a,{onCreate:_0x3e82ef,env:_0x322346}=_0x94c0d7,[_0x3d9b41,_0x192c42]=useState(_0xcc52e2(0x212)),[_0x5ec152,_0x2abe7f]=useState(''),[_0x20ed40,_0x45e36e]=useState(''),[_0x5b51b5,_0x8bc1ea]=useState(''),[_0x45d882,_0x3702f2]=useState(''),[_0x2d64a2,_0x56db27]=useState([]),[_0x2e7dff,_0x44517c]=useState(null),[_0x57d751,_0x516cb0]=useState(![]),[_0x4ee5ea,_0x142afc]=useState(![]),[_0x158220,_0x267ccb]=useState(![]),[_0x1e1093,_0x25ffe2]=useState(0x0),[_0x5c36fe,_0x4fbaec]=useState(0x0),[_0x3ff843,_0x1f83e1]=useState(0x0),[_0xe081b1,_0x355e12]=useState(![]),[_0x33732e,_0x359b83]=useState(new Set()),[_0x2f157d,_0x436da6]=useState(0x0),[_0x784d0b,_0x2d0c12]=useState(''),_0x21ec2c=_0xcc52e2(0x213),_0x31ff88=readConfig(),_0x51b9a0=typeof _0x31ff88[_0xcc52e2(0x203)]===_0xcc52e2(0x1f1)?_0x31ff88[_0xcc52e2(0x203)]:undefined;function _0xbe5147(_0x5a49d5){const _0x4fca03=_0xcc52e2,_0x24d273=_0x5a49d5||_0x21ec2c,_0x3d6bab=a41_0x129496['resolve'](process[_0x4fca03(0x208)](),_0x24d273);return existsSync(_0x3d6bab);}function _0x17f886(_0x2144dc){const _0x5c8c1b=_0xcc52e2;if(_0x2144dc['length']>0x32)return{'valid':![],'message':_0x5c8c1b(0x1b9)};const _0x462d04=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x2144dc?.[_0x5c8c1b(0x20e)]()&&!_0x462d04['test'](_0x2144dc))return{'valid':![],'message':_0x5c8c1b(0x1b3)};return{'valid':!![]};}function _0x1c9a6e(_0x3d604f){const _0x303687=_0xcc52e2;if(!_0x3d604f[_0x303687(0x20e)]())return{'valid':!![]};if(_0x3d604f['length']>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x30ae6e=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x30ae6e[_0x303687(0x1c8)](_0x3d604f))return{'valid':![],'message':_0x303687(0x207)};return{'valid':!![]};}async function _0x32f44d(){_0x516cb0(!![]);try{const _0x2c712e=await getIsSessionValid();return _0x44517c(_0x2c712e),_0x2c712e;}catch(_0x2bc7e3){return _0x44517c(![]),![];}finally{_0x516cb0(![]);}}async function _0x1ef75f(){_0x142afc(!![]);try{const _0x142ac4=await authServer({'silent':!![]});return _0x44517c(_0x142ac4),_0x142ac4;}catch(_0x509867){return _0x44517c(![]),![];}finally{_0x142afc(![]);}}return useInput(async(_0x2d48d0,_0x5eabb1)=>{const _0x2d41cf=_0xcc52e2;if(_0x5eabb1[_0x2d41cf(0x204)]||_0x5eabb1[_0x2d41cf(0x1cb)]){if(_0x3d9b41===_0x2d41cf(0x1bc)){_0x25ffe2(_0x4f9143=>_0x4f9143===0x0?0x1:0x0);return;}if(_0x3d9b41==='lovrabet-setup-selection'){if(!_0xe081b1){_0x1f83e1(_0x1e390c=>_0x1e390c===0x0?0x1:0x0);return;}_0x355e12(![]);return;}if(_0x3d9b41===_0x2d41cf(0x1ec)){_0x4fbaec(_0x29cbd8=>_0x29cbd8===0x0?0x1:0x0);return;}}if(_0x3d9b41==='lovrabet-setup-selection'&&_0xe081b1&&_0x3ff843===0x0){if(_0x5eabb1['upArrow']){_0x436da6(_0x354205=>_0x354205>0x0?_0x354205-0x1:IDE_LIST[_0x2d41cf(0x1c3)]-0x1);return;}if(_0x5eabb1[_0x2d41cf(0x20b)]){_0x436da6(_0x3c4adb=>_0x3c4adb<IDE_LIST['length']-0x1?_0x3c4adb+0x1:0x0);return;}}if(_0x2d48d0==='\x20'&&_0x3d9b41===_0x2d41cf(0x1f3)&&_0xe081b1&&_0x3ff843===0x0){_0x359b83(_0x3afc94=>{const _0x554f6b=_0x2d41cf,_0x16984a=new Set(_0x3afc94);return _0x16984a[_0x554f6b(0x1b2)](_0x2f157d)?_0x16984a[_0x554f6b(0x1f5)](_0x2f157d):_0x16984a[_0x554f6b(0x1c4)](_0x2f157d),_0x16984a;}),_0x3702f2('');return;}if((_0x2d48d0==='a'||_0x2d48d0==='A')&&_0x3d9b41===_0x2d41cf(0x1f3)&&_0xe081b1&&_0x3ff843===0x0){_0x359b83(new Set(IDE_LIST[_0x2d41cf(0x1c5)]((_0x249353,_0x1ace60)=>_0x1ace60))),_0x3702f2('');return;}if((_0x2d48d0==='i'||_0x2d48d0==='I'||_0x2d48d0==='r'||_0x2d48d0==='R')&&_0x3d9b41===_0x2d41cf(0x1f3)&&_0xe081b1&&_0x3ff843===0x0){_0x359b83(_0x2af1b7=>{const _0x5cd8bf=_0x2d41cf,_0x35f8c4=new Set();for(let _0x30343e=0x0;_0x30343e<IDE_LIST[_0x5cd8bf(0x1c3)];_0x30343e++){!_0x2af1b7[_0x5cd8bf(0x1b2)](_0x30343e)&&_0x35f8c4['add'](_0x30343e);}return _0x35f8c4;});return;}if(_0x5eabb1[_0x2d41cf(0x1b4)]){if(_0x3d9b41===_0x2d41cf(0x212)){const _0x3d9186=_0x5b51b5[_0x2d41cf(0x20e)]()||_0x21ec2c;if(_0x45d882)return;if(_0xbe5147(_0x3d9186)){_0x2d0c12(_0x2d41cf(0x1cc)+_0x3d9186+_0x2d41cf(0x21c));return;}_0x2abe7f(_0x3d9186),_0x56db27([{'step':'project-name','label':'项目名','value':_0x3d9186}]),_0x8bc1ea(''),_0x3702f2(''),_0x2d0c12(''),_0x192c42(_0x2d41cf(0x21f));return;}if(_0x3d9b41===_0x2d41cf(0x21f)){if(_0x45d882)return;const _0x168982=_0x5b51b5[_0x2d41cf(0x20e)]();_0x45e36e(_0x168982),_0x56db27(_0x4109cc=>[..._0x4109cc,{'step':_0x2d41cf(0x21f),'label':'应用AppCode','value':_0x168982||_0x2d41cf(0x1e4)}]),_0x8bc1ea(''),_0x3702f2('');if(_0x168982){_0x192c42(_0x2d41cf(0x1f7));const _0x49b988=await _0x32f44d();_0x49b988?_0x192c42(_0x2d41cf(0x1bc)):_0x192c42(_0x2d41cf(0x1ec));}else{const _0x5242f5=_0x322346||_0x51b9a0||_0x2d41cf(0x200);_0x3e82ef({'projectName':_0x5ec152,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x5242f5}),_0x192c42(_0x2d41cf(0x205));}return;}if(_0x3d9b41===_0x2d41cf(0x1bc)){const _0x254b47=_0x1e1093===0x0;_0x267ccb(_0x254b47),_0x56db27(_0x4996da=>[..._0x4996da,{'step':_0x2d41cf(0x202),'label':_0x2d41cf(0x1d4),'value':_0x254b47?'是':'否'}]),_0x192c42(_0x2d41cf(0x1f3));return;}if(_0x3d9b41==='lovrabet-setup-selection'){if(!_0xe081b1){_0x355e12(!![]);if(_0x3ff843===0x1){_0x56db27(_0x4d54bb=>[..._0x4d54bb,{'step':_0x2d41cf(0x1bd),'label':_0x2d41cf(0x1e7),'value':'否'}]);const _0x54a2cb=_0x322346||_0x51b9a0||_0x2d41cf(0x200);_0x3e82ef({'projectName':_0x5ec152,'appCode':_0x20ed40,'pullApi':_0x158220,'aiSetup':![],'selectedIDEs':[],'env':_0x54a2cb}),_0x192c42('creating');}return;}const _0x47d047=_0x3ff843===0x0;if(_0x47d047){if(_0x33732e['size']===0x0){_0x3702f2(_0x2d41cf(0x1c1));return;}const _0x5324ee=Array[_0x2d41cf(0x1b6)](_0x33732e)[_0x2d41cf(0x1c5)](_0x1e30a1=>IDE_LIST[_0x1e30a1])[_0x2d41cf(0x1f8)](_0x96caa4=>_0x96caa4!==undefined);_0x56db27(_0xe4ad0e=>[..._0xe4ad0e,{'step':_0x2d41cf(0x1bd),'label':_0x2d41cf(0x1e7),'value':_0x5324ee[_0x2d41cf(0x1c3)]+_0x2d41cf(0x21e)}]);const _0x2536bf=_0x322346||_0x51b9a0||_0x2d41cf(0x200);_0x3e82ef({'projectName':_0x5ec152,'appCode':_0x20ed40,'pullApi':_0x158220,'aiSetup':!![],'selectedIDEs':_0x5324ee,'env':_0x2536bf}),_0x192c42(_0x2d41cf(0x205));}else{_0x56db27(_0x193776=>[..._0x193776,{'step':_0x2d41cf(0x1bd),'label':_0x2d41cf(0x1e7),'value':'否'}]);const _0x59f5d9=_0x322346||_0x51b9a0||_0x2d41cf(0x200);_0x3e82ef({'projectName':_0x5ec152,'appCode':_0x20ed40,'pullApi':_0x158220,'aiSetup':![],'selectedIDEs':[],'env':_0x59f5d9}),_0x192c42(_0x2d41cf(0x205));}return;}if(_0x3d9b41===_0x2d41cf(0x1ec)){const _0x18bf06=_0x5c36fe===0x0;if(_0x18bf06){_0x192c42(_0x2d41cf(0x1fa));const _0x183970=await _0x1ef75f();_0x183970?(_0x56db27(_0x42cd3c=>[..._0x42cd3c,{'step':_0x2d41cf(0x206),'label':_0x2d41cf(0x218),'value':'已登录'}]),_0x192c42(_0x2d41cf(0x1bc))):(_0x56db27(_0x273652=>[..._0x273652,{'step':'login','label':_0x2d41cf(0x218),'value':_0x2d41cf(0x1b5)}]),_0x192c42('lovrabet-setup-selection'));}else _0x56db27(_0x2d18e8=>[..._0x2d18e8,{'step':_0x2d41cf(0x206),'label':_0x2d41cf(0x218),'value':_0x2d41cf(0x1c9)}]),_0x192c42(_0x2d41cf(0x1f3));return;}}if(_0x5eabb1[_0x2d41cf(0x1cd)]||_0x5eabb1['delete']){_0x8bc1ea(_0x252a8d=>{const _0xeb762=_0x2d41cf,_0x23ac95=_0x252a8d[_0xeb762(0x1f0)](0x0,-0x1);if(_0x3d9b41==='project-name'){const {valid:_0x4f5419,message:_0x3e10c6}=_0x17f886(_0x23ac95);_0x3702f2(_0x4f5419?'':_0x3e10c6||_0xeb762(0x1ce));if(_0x4f5419&&!_0x45d882){const _0x479a04=_0x23ac95||_0x21ec2c;_0xbe5147(_0x479a04)?_0x2d0c12(_0xeb762(0x1cc)+_0x479a04+_0xeb762(0x1e5)):_0x2d0c12('');}}else{if(_0x3d9b41===_0xeb762(0x21f)){const {valid:_0x5ef585,message:_0x50b7e5}=_0x1c9a6e(_0x23ac95);_0x3702f2(_0x5ef585?'':_0x50b7e5||_0xeb762(0x220));}}return _0x23ac95;});return;}if([_0x2d41cf(0x205),_0x2d41cf(0x1f7),_0x2d41cf(0x1fa)][_0x2d41cf(0x1d5)](_0x3d9b41))return;if(_0x3d9b41===_0x2d41cf(0x1bc)||_0x3d9b41==='login-prompt'||_0x3d9b41===_0x2d41cf(0x1f3))return;_0x8bc1ea(_0x23bf57=>{const _0x5d02a2=_0x2d41cf,_0x5b2b99=_0x23bf57+_0x2d48d0;if(_0x3d9b41===_0x5d02a2(0x212)){const {valid:_0x41293c,message:_0x276ed4}=_0x17f886(_0x5b2b99);_0x3702f2(_0x41293c?'':_0x276ed4||_0x5d02a2(0x1ce));if(_0x41293c&&!_0x45d882){const _0x4d0789=_0x5b2b99||_0x21ec2c;_0xbe5147(_0x4d0789)?_0x2d0c12(_0x5d02a2(0x1cc)+_0x4d0789+_0x5d02a2(0x1e5)):_0x2d0c12('');}}else{if(_0x3d9b41==='app-code'){const {valid:_0x2634d0,message:_0x9eb56}=_0x1c9a6e(_0x5b2b99);_0x3702f2(_0x2634d0?'':_0x9eb56||_0x5d02a2(0x220));}}return _0x5b2b99;});}),a41_0x198c89(Box,{'flexDirection':_0xcc52e2(0x1fd),'marginTop':0x1,'children':[_0x2d64a2[_0xcc52e2(0x1c3)]===0x0&&a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x217),'children':_0xcc52e2(0x219)})}),_0x2d64a2['map'](_0xb743b1=>a41_0x198c89(Box,{'children':[a41_0x198c89(Text,{'color':'green','children':['√\x20',_0xb743b1[_0xcc52e2(0x1ff)],':\x20']}),a41_0x4492c3(Text,{'color':_0xcc52e2(0x217),'children':_0xb743b1[_0xcc52e2(0x1df)]})]},_0xb743b1[_0xcc52e2(0x20d)])),_0x3d9b41===_0xcc52e2(0x212)&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x198c89(Box,{'children':[a41_0x4492c3(Text,{'children':_0xcc52e2(0x1fe)}),_0x5b51b5?a41_0x4492c3(Text,{'color':'green','children':_0x5b51b5}):a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0x21ec2c}),_0x45d882&&a41_0x198c89(Text,{'color':'red','children':[_0xcc52e2(0x215),_0x45d882]}),_0x784d0b&&a41_0x198c89(Text,{'color':_0xcc52e2(0x1f4),'children':['\x20←\x20',_0x784d0b]})]}),!_0x45d882&&!_0x784d0b&&!_0x5b51b5&&a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0xcc52e2(0x1ef)})})]}),_0x3d9b41===_0xcc52e2(0x21f)&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x198c89(Box,{'children':[a41_0x4492c3(Text,{'children':_0xcc52e2(0x1db)}),a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':'[可选]:\x20'}),a41_0x4492c3(Text,{'color':'green','children':_0x5b51b5}),_0x45d882&&a41_0x198c89(Text,{'color':'red','children':[_0xcc52e2(0x215),_0x45d882]})]}),!_0x45d882&&a41_0x4492c3(Box,{'children':a41_0x198c89(Text,{'color':_0xcc52e2(0x209),'children':['\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)']})})]}),_0x3d9b41===_0xcc52e2(0x1f7)&&a41_0x198c89(Box,{'children':[a41_0x4492c3(Text,{'children':_0xcc52e2(0x1dd)}),_0x57d751&&a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':'\x20检查中...'})]}),_0x3d9b41==='confirm-api-pull'&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x1d2),'children':'√\x20检测到有效登录状态'})}),a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x4492c3(Text,{'children':_0xcc52e2(0x210)})}),a41_0x198c89(Box,{'marginLeft':0x2,'children':[a41_0x198c89(Text,{'color':_0x1e1093===0x0?_0xcc52e2(0x1d2):'gray','children':[_0x1e1093===0x0?'▶\x20':'\x20\x20',_0xcc52e2(0x1e1)]}),a41_0x4492c3(Text,{'children':'\x20'}),a41_0x198c89(Text,{'color':_0x1e1093===0x1?'green':'gray','children':[_0x1e1093===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0xcc52e2(0x1e9)})}),a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x1d0),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x3d9b41===_0xcc52e2(0x1f3)&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x1d2),'children':'√'})}),a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x4492c3(Text,{'children':_0xcc52e2(0x1ee)})}),a41_0x198c89(Box,{'marginLeft':0x2,'children':[a41_0x198c89(Text,{'color':_0x3ff843===0x0?_0xcc52e2(0x1d2):_0xcc52e2(0x209),'children':[_0x3ff843===0x0?'▶\x20':'\x20\x20','Yes']}),a41_0x4492c3(Text,{'children':'\x20'}),a41_0x198c89(Text,{'color':_0x3ff843===0x1?_0xcc52e2(0x1d2):_0xcc52e2(0x209),'children':[_0x3ff843===0x1?'▶\x20':'\x20\x20','No']})]}),_0xe081b1&&_0x3ff843===0x0&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':'\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE'})}),a41_0x198c89(Box,{'marginTop':0x1,'flexDirection':_0xcc52e2(0x1fd),'children':[a41_0x4492c3(Text,{'bold':!![],'color':_0xcc52e2(0x1d0),'children':_0xcc52e2(0x1da)}),IDE_LIST[_0xcc52e2(0x1c5)]((_0x51e6dc,_0xab60c9)=>{const _0x3a9cf4=_0xcc52e2,_0x2654b4=_0x2f157d===_0xab60c9,_0x18c247=_0x33732e[_0x3a9cf4(0x1b2)](_0xab60c9),_0x3968b3=MCP_IDES['has'](_0x51e6dc);return a41_0x4492c3(Box,{'children':a41_0x198c89(Text,{'backgroundColor':_0x2654b4?_0x3a9cf4(0x20a):undefined,'color':_0x2654b4?_0x3a9cf4(0x1fc):undefined,'children':['\x20\x20',_0x18c247?_0x3a9cf4(0x1b8):_0x3a9cf4(0x1ba),'\x20',IDE_CONFIGS[_0x51e6dc][_0x3a9cf4(0x1d1)],_0x3968b3&&a41_0x4492c3(Text,{'color':_0x2654b4?'white':'cyan','children':_0x3a9cf4(0x221)}),'\x20',a41_0x198c89(Text,{'color':_0x2654b4?'white':_0x3a9cf4(0x209),'dimColor':!_0x2654b4,'children':['-\x20',IDE_CONFIGS[_0x51e6dc][_0x3a9cf4(0x1bf)]]})]})},_0x51e6dc);}),a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x198c89(Text,{'color':_0xcc52e2(0x209),'children':['\x20','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认']})})]})]}),!_0xe081b1&&a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0xcc52e2(0x1e9)})}),_0x45d882&&a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x198c89(Text,{'color':_0xcc52e2(0x1f4),'children':['✗\x20',_0x45d882]})})]}),_0x3d9b41===_0xcc52e2(0x1ec)&&a41_0x198c89(a41_0x3e123d,{'children':[a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x1d0),'children':_0xcc52e2(0x1c0)})}),a41_0x4492c3(Box,{'marginTop':0x1,'children':a41_0x4492c3(Text,{'children':_0xcc52e2(0x1f9)})}),a41_0x198c89(Box,{'marginLeft':0x2,'children':[a41_0x198c89(Text,{'color':_0x5c36fe===0x0?_0xcc52e2(0x1d2):_0xcc52e2(0x209),'children':[_0x5c36fe===0x0?'▶\x20':'\x20\x20',_0xcc52e2(0x1e1)]}),a41_0x4492c3(Text,{'children':'\x20'}),a41_0x198c89(Text,{'color':_0x5c36fe===0x1?_0xcc52e2(0x1d2):_0xcc52e2(0x209),'children':[_0x5c36fe===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0xcc52e2(0x1e9)})})]}),_0x3d9b41==='login-process'&&a41_0x198c89(Box,{'children':[a41_0x4492c3(Text,{'children':_0xcc52e2(0x1c2)}),_0x4ee5ea&&a41_0x4492c3(Text,{'color':_0xcc52e2(0x209),'children':_0xcc52e2(0x1ea)})]}),_0x3d9b41===_0xcc52e2(0x205)&&a41_0x4492c3(Box,{'children':a41_0x4492c3(Text,{'color':_0xcc52e2(0x1d2),'children':_0xcc52e2(0x1fb)})})]});}
|
|
1
|
+
const a41_0xa8c679=a41_0xcc9f;(function(_0x31a6ae,_0x94f980){const _0x241567=a41_0xcc9f,_0x1743a2=_0x31a6ae();while(!![]){try{const _0x2ce7d4=parseInt(_0x241567(0x105))/0x1+parseInt(_0x241567(0x10c))/0x2+-parseInt(_0x241567(0x12b))/0x3+-parseInt(_0x241567(0x110))/0x4*(-parseInt(_0x241567(0x155))/0x5)+parseInt(_0x241567(0x128))/0x6+parseInt(_0x241567(0x13c))/0x7+-parseInt(_0x241567(0x150))/0x8*(parseInt(_0x241567(0x118))/0x9);if(_0x2ce7d4===_0x94f980)break;else _0x1743a2['push'](_0x1743a2['shift']());}catch(_0x1cd942){_0x1743a2['push'](_0x1743a2['shift']());}}}(a41_0x27aa,0x6317a));function a41_0x27aa(){const _0x34f951=['online','lovrabet-setup-selection','Claude\x20Code','delete','Cursor\x20IDE\x20(.cursorrules\x20+\x20MCP\x20服务器)','Trae\x20IDE\x20(.trae/skills/)','length','map','412909TuomaX','my-app','gray','Antigravity\x20IDE\x20(.agent/skills/)','*\x20正在创建项目...','codex','qoder','\x20检查中...','\x20←\x20','green','Windsurf\x20IDE\x20(.windsurf/workflows/)','应用AppCode不合法','Yes','backspace','Codex','Trae','value','filter','size','\x20\x20使用\x20←→\x20选择,回车确认','450744BDXIYN','*\x20创建新项目','trim','登录失败','\x22\x20已存在,请使用其他名称','25KnmZft','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','slice','MCP\x20和\x20Skill','blue','应用AppCode','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','*\x20项目名:\x20','\x20个\x20IDE','leftArrow','login-prompt','codebuddy','api-pull','add','app-code','description','white','cwd','选择要配置的\x20IDE:','return','yellow','cursor','√\x20检测到有效登录状态','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','Qoder','creating','red','name','112673MxQpwD','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','login-process','\x22\x20已存在','opencode','label','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','380952HzAKPD','resolve','登录状态','通用模板\x20(.agent/skills/)\x20-\x20兜底方案','85604ldhrvQ','has','windsurf','step','Codex\x20IDE\x20(.codex/skills/)','Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)','项目名不合法','project-name','45uytToc','string','\x20直接回车确认,或输入自定义名称','column','trae','*\x20正在登录,请前往浏览器完成登录...','已登录','其他\x20(通用模板)','env','agent','CodeBuddy','login-check','from','confirm-api-pull','*\x20正在检查登录状态...','跳过登录','2729178YiEHRk','cyan','[可选]:\x20','709221Ncyhvn','目录\x20\x22','[✓]','项目名长度不能超过\x2050\x20个字符','Windsurf','claude','项目名','请至少选择一个\x20IDE','test'];a41_0x27aa=function(){return _0x34f951;};return a41_0x27aa();}import{jsx as a41_0x24ebf0,jsxs as a41_0x195452,Fragment as a41_0x2db166}from'react/jsx-runtime';import{useState}from'react';function a41_0xcc9f(_0x34c92e,_0x39d1c7){_0x34c92e=_0x34c92e-0x105;const _0x27aa37=a41_0x27aa();let _0xcc9f6f=_0x27aa37[_0x34c92e];return _0xcc9f6f;}import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a41_0x1954c4 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';const IDE_CONFIGS={'cursor':{'name':'Cursor','description':a41_0xa8c679(0x138)},'windsurf':{'name':a41_0xa8c679(0x12f),'description':a41_0xa8c679(0x146)},'claude':{'name':a41_0xa8c679(0x136),'description':'Claude\x20Code\x20(.claude/skills/\x20+\x20MCP\x20服务器)'},'codex':{'name':a41_0xa8c679(0x14a),'description':a41_0xa8c679(0x114)},'opencode':{'name':'OpenCode','description':'OpenCode\x20IDE\x20(.opencode/skills/)'},'qoder':{'name':a41_0xa8c679(0x16d),'description':a41_0xa8c679(0x115)},'codebuddy':{'name':a41_0xa8c679(0x122),'description':'CodeBuddy\x20IDE\x20(.codebuddy/skills/)'},'trae':{'name':a41_0xa8c679(0x14b),'description':a41_0xa8c679(0x139)},'antigravity':{'name':'Antigravity','description':a41_0xa8c679(0x13f)},'agent':{'name':a41_0xa8c679(0x11f),'description':a41_0xa8c679(0x10f)}},IDE_LIST=['antigravity',a41_0xa8c679(0x130),a41_0xa8c679(0x160),a41_0xa8c679(0x141),a41_0xa8c679(0x16a),a41_0xa8c679(0x109),a41_0xa8c679(0x142),a41_0xa8c679(0x11c),a41_0xa8c679(0x112),a41_0xa8c679(0x121)],MCP_IDES=new Set([a41_0xa8c679(0x16a),a41_0xa8c679(0x130)]);export function EnhancedGuidedCreate(_0x595a3f){const _0x46f232=a41_0xa8c679,{onCreate:_0x37dab6,env:_0x3a2af2}=_0x595a3f,[_0x5bf782,_0x57b24f]=useState(_0x46f232(0x117)),[_0x3fa191,_0x4adf95]=useState(''),[_0x343409,_0x20a7f2]=useState(''),[_0x7dff1f,_0x211004]=useState(''),[_0x29c0f8,_0xfef970]=useState(''),[_0x40b7a2,_0x4a6c26]=useState([]),[_0x3c34ee,_0x57e399]=useState(null),[_0x2db634,_0x19829d]=useState(![]),[_0x1d4ddd,_0x1a216b]=useState(![]),[_0x2dca3b,_0x5f4844]=useState(![]),[_0x381573,_0x25b248]=useState(0x0),[_0x4ba898,_0x5277c7]=useState(0x0),[_0x2e3607,_0x2659ec]=useState(0x0),[_0x531620,_0x398667]=useState(![]),[_0xbd595e,_0x3c2c1f]=useState(new Set()),[_0x1bcaa5,_0x209a3f]=useState(0x0),[_0x2c7fef,_0x5a5787]=useState(''),_0x1fa5f2=_0x46f232(0x13d),_0x5cf80e=readConfig(),_0xbf0ae9=typeof _0x5cf80e[_0x46f232(0x120)]===_0x46f232(0x119)?_0x5cf80e['env']:undefined;function _0x1f1293(_0x2db7ba){const _0x361f84=_0x46f232,_0x4f6a6b=_0x2db7ba||_0x1fa5f2,_0x1ef293=a41_0x1954c4[_0x361f84(0x10d)](process[_0x361f84(0x166)](),_0x4f6a6b);return existsSync(_0x1ef293);}function _0x32d4b8(_0x481899){const _0x3f0b2a=_0x46f232;if(_0x481899['length']>0x32)return{'valid':![],'message':_0x3f0b2a(0x12e)};const _0x424f99=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x481899?.[_0x3f0b2a(0x152)]()&&!_0x424f99['test'](_0x481899))return{'valid':![],'message':_0x3f0b2a(0x10b)};return{'valid':!![]};}function _0x41b478(_0x586ac4){const _0x2ebf5a=_0x46f232;if(!_0x586ac4[_0x2ebf5a(0x152)]())return{'valid':!![]};if(_0x586ac4['length']>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x183bdc=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x183bdc[_0x2ebf5a(0x133)](_0x586ac4))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x1cde0f(){_0x19829d(!![]);try{const _0x303f8e=await getIsSessionValid();return _0x57e399(_0x303f8e),_0x303f8e;}catch(_0x141f4c){return _0x57e399(![]),![];}finally{_0x19829d(![]);}}async function _0x18e8ae(){_0x1a216b(!![]);try{const _0x49368f=await authServer({'silent':!![]});return _0x57e399(_0x49368f),_0x49368f;}catch(_0x1fc047){return _0x57e399(![]),![];}finally{_0x1a216b(![]);}}return useInput(async(_0xcdefc2,_0x2dd20b)=>{const _0x12bf80=_0x46f232;if(_0x2dd20b[_0x12bf80(0x15e)]||_0x2dd20b['rightArrow']){if(_0x5bf782===_0x12bf80(0x125)){_0x25b248(_0x3ee7fd=>_0x3ee7fd===0x0?0x1:0x0);return;}if(_0x5bf782==='lovrabet-setup-selection'){if(!_0x531620){_0x2659ec(_0x113f90=>_0x113f90===0x0?0x1:0x0);return;}_0x398667(![]);return;}if(_0x5bf782===_0x12bf80(0x15f)){_0x5277c7(_0x162984=>_0x162984===0x0?0x1:0x0);return;}}if(_0x5bf782===_0x12bf80(0x135)&&_0x531620&&_0x2e3607===0x0){if(_0x2dd20b['upArrow']){_0x209a3f(_0x1ab294=>_0x1ab294>0x0?_0x1ab294-0x1:IDE_LIST[_0x12bf80(0x13a)]-0x1);return;}if(_0x2dd20b['downArrow']){_0x209a3f(_0x338967=>_0x338967<IDE_LIST['length']-0x1?_0x338967+0x1:0x0);return;}}if(_0xcdefc2==='\x20'&&_0x5bf782===_0x12bf80(0x135)&&_0x531620&&_0x2e3607===0x0){_0x3c2c1f(_0x15a1e3=>{const _0x1c635f=_0x12bf80,_0x482bc5=new Set(_0x15a1e3);return _0x482bc5[_0x1c635f(0x111)](_0x1bcaa5)?_0x482bc5[_0x1c635f(0x137)](_0x1bcaa5):_0x482bc5[_0x1c635f(0x162)](_0x1bcaa5),_0x482bc5;}),_0xfef970('');return;}if((_0xcdefc2==='a'||_0xcdefc2==='A')&&_0x5bf782===_0x12bf80(0x135)&&_0x531620&&_0x2e3607===0x0){_0x3c2c1f(new Set(IDE_LIST[_0x12bf80(0x13b)]((_0x585512,_0x29bc53)=>_0x29bc53))),_0xfef970('');return;}if((_0xcdefc2==='i'||_0xcdefc2==='I'||_0xcdefc2==='r'||_0xcdefc2==='R')&&_0x5bf782==='lovrabet-setup-selection'&&_0x531620&&_0x2e3607===0x0){_0x3c2c1f(_0x206aeb=>{const _0x58be2e=_0x12bf80,_0xe7682c=new Set();for(let _0x43e920=0x0;_0x43e920<IDE_LIST[_0x58be2e(0x13a)];_0x43e920++){!_0x206aeb[_0x58be2e(0x111)](_0x43e920)&&_0xe7682c[_0x58be2e(0x162)](_0x43e920);}return _0xe7682c;});return;}if(_0x2dd20b[_0x12bf80(0x168)]){if(_0x5bf782===_0x12bf80(0x117)){const _0x2a1161=_0x7dff1f[_0x12bf80(0x152)]()||_0x1fa5f2;if(_0x29c0f8)return;if(_0x1f1293(_0x2a1161)){_0x5a5787(_0x12bf80(0x12c)+_0x2a1161+_0x12bf80(0x154));return;}_0x4adf95(_0x2a1161),_0x4a6c26([{'step':_0x12bf80(0x117),'label':_0x12bf80(0x131),'value':_0x2a1161}]),_0x211004(''),_0xfef970(''),_0x5a5787(''),_0x57b24f('app-code');return;}if(_0x5bf782===_0x12bf80(0x163)){if(_0x29c0f8)return;const _0x136de3=_0x7dff1f[_0x12bf80(0x152)]();_0x20a7f2(_0x136de3),_0x4a6c26(_0x41605c=>[..._0x41605c,{'step':_0x12bf80(0x163),'label':_0x12bf80(0x15a),'value':_0x136de3||'未设置'}]),_0x211004(''),_0xfef970('');if(_0x136de3){_0x57b24f(_0x12bf80(0x123));const _0x2d1cca=await _0x1cde0f();_0x2d1cca?_0x57b24f(_0x12bf80(0x125)):_0x57b24f(_0x12bf80(0x15f));}else{const _0x309d3f=_0x3a2af2||_0xbf0ae9||'online';_0x37dab6({'projectName':_0x3fa191,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x309d3f}),_0x57b24f(_0x12bf80(0x16e));}return;}if(_0x5bf782===_0x12bf80(0x125)){const _0x1b95db=_0x381573===0x0;_0x5f4844(_0x1b95db),_0x4a6c26(_0x43e9ea=>[..._0x43e9ea,{'step':_0x12bf80(0x161),'label':'拉取API配置','value':_0x1b95db?'是':'否'}]),_0x57b24f(_0x12bf80(0x135));return;}if(_0x5bf782===_0x12bf80(0x135)){if(!_0x531620){_0x398667(!![]);if(_0x2e3607===0x1){_0x4a6c26(_0x1d5e5b=>[..._0x1d5e5b,{'step':'lovrabet-setup','label':'MCP\x20和\x20Skill','value':'否'}]);const _0x98e55=_0x3a2af2||_0xbf0ae9||_0x12bf80(0x134);_0x37dab6({'projectName':_0x3fa191,'appCode':_0x343409,'pullApi':_0x2dca3b,'aiSetup':![],'selectedIDEs':[],'env':_0x98e55}),_0x57b24f('creating');}return;}const _0x372f78=_0x2e3607===0x0;if(_0x372f78){if(_0xbd595e[_0x12bf80(0x14e)]===0x0){_0xfef970(_0x12bf80(0x132));return;}const _0x9f2a74=Array[_0x12bf80(0x124)](_0xbd595e)[_0x12bf80(0x13b)](_0x3e780f=>IDE_LIST[_0x3e780f])[_0x12bf80(0x14d)](_0x141e32=>_0x141e32!==undefined);_0x4a6c26(_0x4464cc=>[..._0x4464cc,{'step':'lovrabet-setup','label':_0x12bf80(0x158),'value':_0x9f2a74[_0x12bf80(0x13a)]+_0x12bf80(0x15d)}]);const _0x113be9=_0x3a2af2||_0xbf0ae9||'online';_0x37dab6({'projectName':_0x3fa191,'appCode':_0x343409,'pullApi':_0x2dca3b,'aiSetup':!![],'selectedIDEs':_0x9f2a74,'env':_0x113be9}),_0x57b24f(_0x12bf80(0x16e));}else{_0x4a6c26(_0x55ffa1=>[..._0x55ffa1,{'step':'lovrabet-setup','label':_0x12bf80(0x158),'value':'否'}]);const _0x53fa9e=_0x3a2af2||_0xbf0ae9||_0x12bf80(0x134);_0x37dab6({'projectName':_0x3fa191,'appCode':_0x343409,'pullApi':_0x2dca3b,'aiSetup':![],'selectedIDEs':[],'env':_0x53fa9e}),_0x57b24f(_0x12bf80(0x16e));}return;}if(_0x5bf782===_0x12bf80(0x15f)){const _0x18fde4=_0x4ba898===0x0;if(_0x18fde4){_0x57b24f(_0x12bf80(0x107));const _0x5a573a=await _0x18e8ae();_0x5a573a?(_0x4a6c26(_0x5ca4a4=>[..._0x5ca4a4,{'step':'login','label':_0x12bf80(0x10e),'value':_0x12bf80(0x11e)}]),_0x57b24f(_0x12bf80(0x125))):(_0x4a6c26(_0x170860=>[..._0x170860,{'step':'login','label':_0x12bf80(0x10e),'value':_0x12bf80(0x153)}]),_0x57b24f('lovrabet-setup-selection'));}else _0x4a6c26(_0x35f2ae=>[..._0x35f2ae,{'step':'login','label':'登录状态','value':_0x12bf80(0x127)}]),_0x57b24f(_0x12bf80(0x135));return;}}if(_0x2dd20b[_0x12bf80(0x149)]||_0x2dd20b['delete']){_0x211004(_0x399b72=>{const _0x2dcd12=_0x12bf80,_0x5ca6cd=_0x399b72[_0x2dcd12(0x157)](0x0,-0x1);if(_0x5bf782===_0x2dcd12(0x117)){const {valid:_0x177702,message:_0x58ec76}=_0x32d4b8(_0x5ca6cd);_0xfef970(_0x177702?'':_0x58ec76||_0x2dcd12(0x116));if(_0x177702&&!_0x29c0f8){const _0x56ef13=_0x5ca6cd||_0x1fa5f2;_0x1f1293(_0x56ef13)?_0x5a5787('目录\x20\x22'+_0x56ef13+_0x2dcd12(0x108)):_0x5a5787('');}}else{if(_0x5bf782===_0x2dcd12(0x163)){const {valid:_0x343f25,message:_0xf3edfd}=_0x41b478(_0x5ca6cd);_0xfef970(_0x343f25?'':_0xf3edfd||_0x2dcd12(0x147));}}return _0x5ca6cd;});return;}if(['creating',_0x12bf80(0x123),_0x12bf80(0x107)]['includes'](_0x5bf782))return;if(_0x5bf782===_0x12bf80(0x125)||_0x5bf782==='login-prompt'||_0x5bf782===_0x12bf80(0x135))return;_0x211004(_0x21cb33=>{const _0x4c741c=_0x12bf80,_0x2aa6e8=_0x21cb33+_0xcdefc2;if(_0x5bf782===_0x4c741c(0x117)){const {valid:_0x4592eb,message:_0x571eaf}=_0x32d4b8(_0x2aa6e8);_0xfef970(_0x4592eb?'':_0x571eaf||_0x4c741c(0x116));if(_0x4592eb&&!_0x29c0f8){const _0x3d81d2=_0x2aa6e8||_0x1fa5f2;_0x1f1293(_0x3d81d2)?_0x5a5787('目录\x20\x22'+_0x3d81d2+_0x4c741c(0x108)):_0x5a5787('');}}else{if(_0x5bf782===_0x4c741c(0x163)){const {valid:_0x358e07,message:_0x4c83d2}=_0x41b478(_0x2aa6e8);_0xfef970(_0x358e07?'':_0x4c83d2||_0x4c741c(0x147));}}return _0x2aa6e8;});}),a41_0x195452(Box,{'flexDirection':_0x46f232(0x11b),'marginTop':0x1,'children':[_0x40b7a2[_0x46f232(0x13a)]===0x0&&a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x129),'children':_0x46f232(0x151)})}),_0x40b7a2[_0x46f232(0x13b)](_0x5a25bf=>a41_0x195452(Box,{'children':[a41_0x195452(Text,{'color':_0x46f232(0x145),'children':['√\x20',_0x5a25bf[_0x46f232(0x10a)],':\x20']}),a41_0x24ebf0(Text,{'color':_0x46f232(0x129),'children':_0x5a25bf[_0x46f232(0x14c)]})]},_0x5a25bf[_0x46f232(0x113)])),_0x5bf782===_0x46f232(0x117)&&a41_0x195452(a41_0x2db166,{'children':[a41_0x195452(Box,{'children':[a41_0x24ebf0(Text,{'children':_0x46f232(0x15c)}),_0x7dff1f?a41_0x24ebf0(Text,{'color':_0x46f232(0x145),'children':_0x7dff1f}):a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x1fa5f2}),_0x29c0f8&&a41_0x195452(Text,{'color':_0x46f232(0x16f),'children':['\x20←\x20',_0x29c0f8]}),_0x2c7fef&&a41_0x195452(Text,{'color':_0x46f232(0x16f),'children':[_0x46f232(0x144),_0x2c7fef]})]}),!_0x29c0f8&&!_0x2c7fef&&!_0x7dff1f&&a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':'gray','children':_0x46f232(0x11a)})})]}),_0x5bf782===_0x46f232(0x163)&&a41_0x195452(a41_0x2db166,{'children':[a41_0x195452(Box,{'children':[a41_0x24ebf0(Text,{'children':'*\x20应用AppCode\x20'}),a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x46f232(0x12a)}),a41_0x24ebf0(Text,{'color':'green','children':_0x7dff1f}),_0x29c0f8&&a41_0x195452(Text,{'color':_0x46f232(0x16f),'children':[_0x46f232(0x144),_0x29c0f8]})]}),!_0x29c0f8&&a41_0x24ebf0(Box,{'children':a41_0x195452(Text,{'color':_0x46f232(0x13e),'children':['\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)']})})]}),_0x5bf782===_0x46f232(0x123)&&a41_0x195452(Box,{'children':[a41_0x24ebf0(Text,{'children':_0x46f232(0x126)}),_0x2db634&&a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x46f232(0x143)})]}),_0x5bf782===_0x46f232(0x125)&&a41_0x195452(a41_0x2db166,{'children':[a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x145),'children':_0x46f232(0x16b)})}),a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x24ebf0(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a41_0x195452(Box,{'marginLeft':0x2,'children':[a41_0x195452(Text,{'color':_0x381573===0x0?_0x46f232(0x145):_0x46f232(0x13e),'children':[_0x381573===0x0?'▶\x20':'\x20\x20',_0x46f232(0x148)]}),a41_0x24ebf0(Text,{'children':'\x20'}),a41_0x195452(Text,{'color':_0x381573===0x1?_0x46f232(0x145):_0x46f232(0x13e),'children':[_0x381573===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x46f232(0x14f)})}),a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x169),'children':_0x46f232(0x156)})})]}),_0x5bf782===_0x46f232(0x135)&&a41_0x195452(a41_0x2db166,{'children':[a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x145),'children':'√'})}),a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x24ebf0(Text,{'children':_0x46f232(0x16c)})}),a41_0x195452(Box,{'marginLeft':0x2,'children':[a41_0x195452(Text,{'color':_0x2e3607===0x0?_0x46f232(0x145):_0x46f232(0x13e),'children':[_0x2e3607===0x0?'▶\x20':'\x20\x20',_0x46f232(0x148)]}),a41_0x24ebf0(Text,{'children':'\x20'}),a41_0x195452(Text,{'color':_0x2e3607===0x1?_0x46f232(0x145):_0x46f232(0x13e),'children':[_0x2e3607===0x1?'▶\x20':'\x20\x20','No']})]}),_0x531620&&_0x2e3607===0x0&&a41_0x195452(a41_0x2db166,{'children':[a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x46f232(0x106)})}),a41_0x195452(Box,{'marginTop':0x1,'flexDirection':'column','children':[a41_0x24ebf0(Text,{'bold':!![],'color':_0x46f232(0x169),'children':_0x46f232(0x167)}),IDE_LIST[_0x46f232(0x13b)]((_0x3becef,_0x68c24b)=>{const _0x49cfd0=_0x46f232,_0x3e0904=_0x1bcaa5===_0x68c24b,_0x30c94f=_0xbd595e[_0x49cfd0(0x111)](_0x68c24b),_0x417aad=MCP_IDES[_0x49cfd0(0x111)](_0x3becef);return a41_0x24ebf0(Box,{'children':a41_0x195452(Text,{'backgroundColor':_0x3e0904?_0x49cfd0(0x159):undefined,'color':_0x3e0904?_0x49cfd0(0x165):undefined,'children':['\x20\x20',_0x30c94f?_0x49cfd0(0x12d):'[\x20]','\x20',IDE_CONFIGS[_0x3becef][_0x49cfd0(0x170)],_0x417aad&&a41_0x24ebf0(Text,{'color':_0x3e0904?_0x49cfd0(0x165):_0x49cfd0(0x129),'children':'\x20+MCP'}),'\x20',a41_0x195452(Text,{'color':_0x3e0904?_0x49cfd0(0x165):_0x49cfd0(0x13e),'dimColor':!_0x3e0904,'children':['-\x20',IDE_CONFIGS[_0x3becef][_0x49cfd0(0x164)]]})]})},_0x3becef);}),a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x195452(Text,{'color':_0x46f232(0x13e),'children':['\x20',_0x46f232(0x15b)]})})]})]}),!_0x531620&&a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x24ebf0(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),_0x29c0f8&&a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x195452(Text,{'color':_0x46f232(0x16f),'children':['✗\x20',_0x29c0f8]})})]}),_0x5bf782===_0x46f232(0x15f)&&a41_0x195452(a41_0x2db166,{'children':[a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x169),'children':'!\x20未检测到有效登录'})}),a41_0x24ebf0(Box,{'marginTop':0x1,'children':a41_0x24ebf0(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a41_0x195452(Box,{'marginLeft':0x2,'children':[a41_0x195452(Text,{'color':_0x4ba898===0x0?'green':'gray','children':[_0x4ba898===0x0?'▶\x20':'\x20\x20',_0x46f232(0x148)]}),a41_0x24ebf0(Text,{'children':'\x20'}),a41_0x195452(Text,{'color':_0x4ba898===0x1?'green':'gray','children':[_0x4ba898===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':_0x46f232(0x14f)})})]}),_0x5bf782==='login-process'&&a41_0x195452(Box,{'children':[a41_0x24ebf0(Text,{'children':_0x46f232(0x11d)}),_0x1d4ddd&&a41_0x24ebf0(Text,{'color':_0x46f232(0x13e),'children':'\x20登录中...'})]}),_0x5bf782===_0x46f232(0x16e)&&a41_0x24ebf0(Box,{'children':a41_0x24ebf0(Text,{'color':'green','children':_0x46f232(0x140)})})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a42_0x4f6f(){const _0x56423c=['1650tiZvqJ','4300345KkKpjC','33JnIFKA','92691CIOKpd','8990604wmezbC','32694yYVeZX','56BgIMIq','214945LMzFXC','43737ufnmWS','replace','11192240vBOQew'];a42_0x4f6f=function(){return _0x56423c;};return a42_0x4f6f();}(function(_0x1f1b57,_0x840c2a){const _0x2dbaef=a42_0x32ad,_0x2049eb=_0x1f1b57();while(!![]){try{const _0x3ce4f5=parseInt(_0x2dbaef(0x14d))/0x1*(-parseInt(_0x2dbaef(0x145))/0x2)+-parseInt(_0x2dbaef(0x148))/0x3*(-parseInt(_0x2dbaef(0x146))/0x4)+-parseInt(_0x2dbaef(0x147))/0x5+parseInt(_0x2dbaef(0x144))/0x6+-parseInt(_0x2dbaef(0x14c))/0x7+-parseInt(_0x2dbaef(0x14a))/0x8+parseInt(_0x2dbaef(0x14e))/0x9*(parseInt(_0x2dbaef(0x14b))/0xa);if(_0x3ce4f5===_0x840c2a)break;else _0x2049eb['push'](_0x2049eb['shift']());}catch(_0x10cbc4){_0x2049eb['push'](_0x2049eb['shift']());}}}(a42_0x4f6f,0xc4cb6));function a42_0x32ad(_0x1a7105,_0x4e74e4){_0x1a7105=_0x1a7105-0x144;const _0x4f6fa3=a42_0x4f6f();let _0x32ada0=_0x4f6fa3[_0x1a7105];return _0x32ada0;}export function formatElapsed(_0x23b1bf){const _0x3f8b30=a42_0x32ad,_0x1bdc9b=Date['now']()-_0x23b1bf;if(_0x1bdc9b<0x3e8)return _0x1bdc9b+'ms';const _0x2be98f=(_0x1bdc9b/0x3e8)['toFixed'](0x2),_0xcd8d20=_0x2be98f[_0x3f8b30(0x149)](/\.?0+$/u,'');return _0xcd8d20+'s';}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a43_0x7dd26=a43_0x3696;(function(_0x1ee963,_0x15db06){const _0x326bac=a43_0x3696,_0xb8356a=_0x1ee963();while(!![]){try{const _0x154d56=-parseInt(_0x326bac(0x10e))/0x1+parseInt(_0x326bac(0x109))/0x2+parseInt(_0x326bac(0xfc))/0x3*(parseInt(_0x326bac(0xec))/0x4)+parseInt(_0x326bac(0xe0))/0x5+-parseInt(_0x326bac(0x144))/0x6*(parseInt(_0x326bac(0x127))/0x7)+-parseInt(_0x326bac(0xef))/0x8*(-parseInt(_0x326bac(0xf8))/0x9)+parseInt(_0x326bac(0x13b))/0xa*(-parseInt(_0x326bac(0x105))/0xb);if(_0x154d56===_0x15db06)break;else _0xb8356a['push'](_0xb8356a['shift']());}catch(_0x48355e){_0xb8356a['push'](_0xb8356a['shift']());}}}(a43_0x293a,0x1d957));import{jsx as a43_0x2e7a81,Fragment as a43_0x3d6ea5,jsxs as a43_0x46344a}from'react/jsx-runtime';import a43_0x2ba865 from'path';import a43_0x42c93d from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp,copySharedSkills,installSkill,createSkillManifest}from'../ai-setup/config.js';function a43_0x3696(_0x274be5,_0x5f09e8){_0x274be5=_0x274be5-0xd5;const _0x293ab1=a43_0x293a();let _0x369664=_0x293ab1[_0x274be5];return _0x369664;}function a43_0x293a(){const _0x315f05=['green','online','lovrabet\x20api\x20pull','*\x20清理失败的项目目录:\x20','1.\x20','env','join','error','writeFileSync','\x20\x20•\x20MCP\x20服务器:\x20','项目创建完成:\x20','resolve','×\x20项目名过长,最多支持\x20100\x20个字符','项目名称:\x20','warn','length','×\x20项目目录\x20','252745VUmOTa','Claude\x20Code','\x20MCP\x20','API\x20配置拉取成功:\x20','\x20Skill\x20','doTask','\x20&&\x20lovrabet\x20start','utf8','log','has','lovrabet\x20config\x20set\x20appcode\x20[app-code]','skill','2048SWPNwl','manual','parse','32qMXjqG','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','accessSync','repeat','status','constants','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','package.json','√\x20package.json\x20已更新:\x20name=','176868CjWzUR','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','配置应用AppCode:\x20','1167NUasJo','.lovrabetrc','\x20\x20✗\x20MCP\x20','red','项目创建失败:\x20','readFileSync','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','清理项目目录失败:\x20','1507hvtRLD','\x20已存在,请使用其他项目名','gray','启动项目:\x20','71494Awagvd','trim','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','mcp','√\x20API\x20配置拉取完成','125096DliFKU','cd\x20','*\x20正在为项目\x20','✓\x20Skill\x20安装完成:','map','\x20|\x20应用AppCode:\x20','Cursor','yellow','push','filter','existsSync','setLogPath','×\x20无法在当前目录创建项目,请检查目录权限','3.\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','cwd','pullApi','W_OK','toLocaleString','success','version','projectCode','开始创建项目:\x20','×\x20项目名不能为空','selectedIDEs','7AmwwJX','更新\x20package.json\x20name','appCode','API\x20配置拉取失败:\x20','aiSetup','dirname','拉取API配置:\x20','\x20√\x20','stringify','skill-','../..','cursor','更新\x20package.json\x20失败','message','1.0.0','\x20\x20✗\x20Skill\x20','column','✓\x20MCP\x20服务器配置完成:','ide','\x20创建配置文件','4910hebzvm','\x20配置应用AppCode:\x20','cyan','🚀\x20接下来:','white','2.\x20','description','name','*\x20正在拉取\x20API\x20配置...','303204aBznFP','create','info','projectName','\x20Generated\x20by\x20lovrabet\x20cli\x20','claude','string'];a43_0x293a=function(){return _0x315f05;};return a43_0x293a();}const MCP_IDES=new Set([a43_0x7dd26(0x132),a43_0x7dd26(0x149)]);export function CreateApp(_0x357243){const _0x3cf7f9=a43_0x7dd26,[_0x2a5a31,_0xea32f4]=useState(![]),[_0x84548e,_0xf1c6b0]=useState(![]),[_0x25d940,_0x2e27b4]=useState(null),[_0x3bd517,_0x5addfe]=useState(null),_0x2cfccc=useCopyProjectTemplate(),_0x494093=useInstallDependencies(),_0x39df13=useFormatCode(),_0x328f58=async _0x4c2c5b=>{const _0x5042f4=a43_0x3696;if(!_0x4c2c5b[_0x5042f4(0x147)]||_0x4c2c5b[_0x5042f4(0x147)][_0x5042f4(0x10a)]()===''){console['error'](_0x5042f4(0x125));return;}const _0x26f00e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x26f00e['test'](_0x4c2c5b['projectName'])){console[_0x5042f4(0xd6)](_0x5042f4(0x10b));return;}if(_0x4c2c5b[_0x5042f4(0x147)][_0x5042f4(0xde)]>0x64){console[_0x5042f4(0xd6)](_0x5042f4(0xdb));return;}const _0x29e262=a43_0x2ba865[_0x5042f4(0xda)](process[_0x5042f4(0x11d)](),_0x4c2c5b[_0x5042f4(0x147)]);if(a43_0x42c93d[_0x5042f4(0x118)](_0x29e262)){console['error'](_0x5042f4(0xdf)+_0x4c2c5b[_0x5042f4(0x147)]+_0x5042f4(0x106));return;}try{const _0x90f31b=a43_0x2ba865[_0x5042f4(0x12c)](_0x29e262);a43_0x42c93d[_0x5042f4(0xf1)](_0x90f31b,a43_0x42c93d[_0x5042f4(0xf4)][_0x5042f4(0x11f)]);}catch(_0xfda1c){console[_0x5042f4(0xd6)](_0x5042f4(0x11a));return;}_0x2e27b4(_0x4c2c5b),_0xea32f4(!![]),logger[_0x5042f4(0x119)](_0x29e262),logger[_0x5042f4(0x146)](_0x5042f4(0x145),_0x5042f4(0x124)+_0x4c2c5b[_0x5042f4(0x147)],{'projectDir':_0x29e262,'appCode':_0x4c2c5b[_0x5042f4(0x129)]});try{await _0x2cfccc[_0x5042f4(0xe5)](_0x4c2c5b[_0x5042f4(0x147)]),await _0x450c29(_0x4c2c5b['projectName']),await _0x494093['doTask'](_0x4c2c5b[_0x5042f4(0x147)]),await _0x39df13[_0x5042f4(0xe5)](_0x4c2c5b[_0x5042f4(0x147)]),await _0x395e5c(_0x4c2c5b[_0x5042f4(0x147)],_0x4c2c5b['appCode']||'',_0x4c2c5b[_0x5042f4(0x150)]);if(_0x4c2c5b[_0x5042f4(0x11e)]&&_0x4c2c5b[_0x5042f4(0x129)]){console['log'](_0x5042f4(0x143));try{const _0x3e5023=await pullApiSilent(_0x4c2c5b[_0x5042f4(0x129)],undefined,_0x29e262,_0x4c2c5b[_0x5042f4(0x150)]);_0x3e5023?(console[_0x5042f4(0xe8)](_0x5042f4(0x10d)),logger[_0x5042f4(0x146)](_0x5042f4(0x145),_0x5042f4(0xe3)+_0x4c2c5b[_0x5042f4(0x129)])):(console[_0x5042f4(0xe8)](_0x5042f4(0xf5)),logger[_0x5042f4(0xdd)](_0x5042f4(0x145),_0x5042f4(0x12a)+_0x4c2c5b[_0x5042f4(0x129)]));}catch(_0x47bf89){console[_0x5042f4(0xe8)](_0x5042f4(0x11c)),logger[_0x5042f4(0xdd)]('create','API\x20配置拉取异常',{'error':_0x47bf89 instanceof Error?_0x47bf89['message']:String(_0x47bf89)});}}if(_0x4c2c5b[_0x5042f4(0x12b)]&&_0x4c2c5b['selectedIDEs']&&_0x4c2c5b[_0x5042f4(0x126)][_0x5042f4(0xde)]>0x0&&_0x4c2c5b[_0x5042f4(0x129)]){console[_0x5042f4(0xe8)](_0x5042f4(0xfa));const _0x6dbbb2=[],_0x5515f8=[],_0x47f1a9=_0x4c2c5b[_0x5042f4(0x126)][_0x5042f4(0x117)](_0xe96a47=>MCP_IDES[_0x5042f4(0xe9)](_0xe96a47)),_0x32c0e2=_0x4c2c5b['selectedIDEs'];for(const _0x4a4e3f of _0x47f1a9){try{const _0x22b7c9=await configureMcp(_0x4a4e3f,_0x29e262);_0x6dbbb2[_0x5042f4(0x116)]({'ide':_0x4a4e3f===_0x5042f4(0x132)?_0x5042f4(0x114):_0x5042f4(0xe1),'status':_0x22b7c9['status'],'message':_0x22b7c9[_0x5042f4(0x134)]}),console[_0x5042f4(0xe8)]('\x20\x20'+(_0x22b7c9[_0x5042f4(0xf3)]==='success'?'✓':_0x22b7c9[_0x5042f4(0xf3)]===_0x5042f4(0xed)?'⚠️':'✗')+_0x5042f4(0xe2)+_0x4a4e3f+':\x20'+_0x22b7c9[_0x5042f4(0x134)]);}catch(_0x2ad094){_0x6dbbb2['push']({'ide':_0x4a4e3f===_0x5042f4(0x132)?_0x5042f4(0x114):'Claude\x20Code','status':_0x5042f4(0xd6),'message':_0x2ad094 instanceof Error?_0x2ad094[_0x5042f4(0x134)]:String(_0x2ad094)}),console[_0x5042f4(0xe8)](_0x5042f4(0xfe)+_0x4a4e3f+':\x20'+(_0x2ad094 instanceof Error?_0x2ad094[_0x5042f4(0x134)]:String(_0x2ad094)));}}await copySharedSkills(_0x29e262);for(const _0x56eed9 of _0x32c0e2){try{const _0x27d096=await installSkill(_0x56eed9,_0x29e262);_0x5515f8['push']({'ide':_0x27d096[_0x5042f4(0x139)],'status':_0x27d096[_0x5042f4(0xf3)],'message':_0x27d096[_0x5042f4(0x134)]}),console[_0x5042f4(0xe8)]('\x20\x20'+(_0x27d096[_0x5042f4(0xf3)]===_0x5042f4(0x121)?'✓':'✗')+_0x5042f4(0xe4)+_0x27d096[_0x5042f4(0x139)]+':\x20'+_0x27d096[_0x5042f4(0x134)]);}catch(_0x57bb41){_0x5515f8['push']({'ide':_0x56eed9,'status':_0x5042f4(0xd6),'message':_0x57bb41 instanceof Error?_0x57bb41['message']:String(_0x57bb41)}),console[_0x5042f4(0xe8)](_0x5042f4(0x136)+_0x56eed9+':\x20'+(_0x57bb41 instanceof Error?_0x57bb41[_0x5042f4(0x134)]:String(_0x57bb41)));}}if(_0x5515f8[_0x5042f4(0xde)]>0x0){const _0x5bb4aa=_0x5515f8[_0x5042f4(0x117)](_0x533a11=>_0x533a11[_0x5042f4(0xf3)]===_0x5042f4(0x121))[_0x5042f4(0x112)](_0x13e556=>_0x13e556[_0x5042f4(0x139)]);_0x5bb4aa[_0x5042f4(0xde)]>0x0&&createSkillManifest(_0x29e262,_0x5bb4aa);}_0x5addfe({'mcp':_0x6dbbb2,'skill':_0x5515f8}),console[_0x5042f4(0xe8)](_0x5042f4(0xf9));}logger[_0x5042f4(0x121)](_0x5042f4(0x145),_0x5042f4(0xd9)+_0x4c2c5b['projectName']),_0xf1c6b0(!![]),_0xea32f4(![]);}catch(_0x41f1d0){logger[_0x5042f4(0xd6)](_0x5042f4(0x145),_0x5042f4(0x100)+_0x4c2c5b['projectName'],{'error':_0x41f1d0 instanceof Error?_0x41f1d0[_0x5042f4(0x134)]:String(_0x41f1d0)});try{a43_0x42c93d[_0x5042f4(0x118)](_0x29e262)&&(console[_0x5042f4(0xe8)](_0x5042f4(0x14e)+_0x29e262),a43_0x42c93d['rmSync'](_0x29e262,{'recursive':!![],'force':!![]}));}catch(_0x57c98d){logger[_0x5042f4(0xdd)]('create',_0x5042f4(0x104)+_0x29e262);}_0xea32f4(![]),console['error']('×\x20项目创建失败:\x20'+(_0x41f1d0 instanceof Error?_0x41f1d0[_0x5042f4(0x134)]:String(_0x41f1d0)));}},_0x1ffc09=async _0x2665a=>{const _0x2f47a0=a43_0x3696;await _0x328f58({'projectName':_0x2665a,'env':_0x357243[_0x2f47a0(0x150)]});},_0x450c29=async _0x11a790=>{const _0x8996d0=a43_0x3696,_0x28f219=a43_0x2ba865[_0x8996d0(0xda)](process[_0x8996d0(0x11d)](),_0x11a790),_0x5e828b=a43_0x2ba865[_0x8996d0(0xd5)](_0x28f219,'package.json');try{console[_0x8996d0(0xe8)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x10ac16=fileURLToPath(import.meta.url),_0x5b2365=a43_0x2ba865[_0x8996d0(0xda)](a43_0x2ba865[_0x8996d0(0x12c)](_0x10ac16),_0x8996d0(0x131)),_0x17458f=a43_0x2ba865['join'](_0x5b2365,_0x8996d0(0xf6));let _0x3eb904=_0x8996d0(0x135);try{const _0x4900fd=JSON['parse'](a43_0x42c93d['readFileSync'](_0x17458f,'utf8'));_0x3eb904=_0x4900fd[_0x8996d0(0x122)]||_0x8996d0(0x135);}catch(_0x4be237){}const _0x124ca8=a43_0x42c93d[_0x8996d0(0x101)](_0x5e828b,_0x8996d0(0xe7)),_0xddf74c=JSON['parse'](_0x124ca8);_0xddf74c[_0x8996d0(0x142)]=_0x11a790,_0xddf74c[_0x8996d0(0x141)]=_0x11a790+_0x8996d0(0x148)+_0x3eb904,a43_0x42c93d[_0x8996d0(0xd7)](_0x5e828b,JSON[_0x8996d0(0x12f)](_0xddf74c,null,0x2)+'\x0a',_0x8996d0(0xe7)),console['log'](_0x8996d0(0xf7)+_0x11a790),logger[_0x8996d0(0x146)](_0x8996d0(0x145),_0x8996d0(0x128));}catch(_0x13a650){logger[_0x8996d0(0xd6)](_0x8996d0(0x145),_0x8996d0(0x133));throw _0x13a650;}},_0x395e5c=async(_0x3615a6,_0x2dffd0,_0x33d820)=>{const _0x4f5377=a43_0x3696,_0x1410c3=a43_0x2ba865[_0x4f5377(0xda)](process[_0x4f5377(0x11d)](),_0x3615a6),_0x48d743=a43_0x2ba865[_0x4f5377(0xd5)](_0x1410c3,_0x4f5377(0xfd));try{_0x2dffd0?console['log']('*\x20正在为项目\x20'+_0x3615a6+_0x4f5377(0x13c)+_0x2dffd0):console[_0x4f5377(0xe8)](_0x4f5377(0x110)+_0x3615a6+_0x4f5377(0x13a));const _0x38ec05=fileURLToPath(import.meta.url),_0x1cf56e=a43_0x2ba865[_0x4f5377(0xda)](a43_0x2ba865[_0x4f5377(0x12c)](_0x38ec05),_0x4f5377(0x131)),_0x3f0221=a43_0x2ba865[_0x4f5377(0xd5)](_0x1cf56e,_0x4f5377(0xf6));let _0x498398='1.0.0';try{const _0x8a8482=JSON[_0x4f5377(0xee)](a43_0x42c93d['readFileSync'](_0x3f0221,_0x4f5377(0xe7)));_0x498398=_0x8a8482[_0x4f5377(0x122)]||'1.0.0';}catch(_0x34ceb2){}const _0x5d30ae=readConfig(),_0x49dc4f=typeof _0x5d30ae[_0x4f5377(0x150)]===_0x4f5377(0x14a)?_0x5d30ae[_0x4f5377(0x150)]:undefined,{app:_0x4cabe9,appcode:_0x296019,..._0x1bde33}=_0x5d30ae,_0xf7de43={..._0x1bde33,'appcode':_0x2dffd0||'','env':_0x33d820||_0x49dc4f||_0x4f5377(0x14c),'createdAt':new Date()[_0x4f5377(0x120)](),'version':_0x498398};a43_0x42c93d[_0x4f5377(0xd7)](_0x48d743,JSON[_0x4f5377(0x12f)](_0xf7de43,null,0x2),_0x4f5377(0xe7)),_0x2dffd0?console[_0x4f5377(0xe8)]('√\x20配置文件已创建,应用AppCode:\x20'+_0x2dffd0):console[_0x4f5377(0xe8)](_0x4f5377(0x103)),logger[_0x4f5377(0x146)]('create',_0x4f5377(0xfb)+_0x2dffd0);}catch(_0x50dc22){logger[_0x4f5377(0xd6)]('create','配置应用AppCode失败');}};useEffect(()=>{const _0x5bda2c=a43_0x3696;_0x357243[_0x5bda2c(0x123)]&&_0x1ffc09(_0x357243[_0x5bda2c(0x123)]);},[_0x357243[_0x3cf7f9(0x123)]]);if(!_0x2a5a31&&!_0x84548e&&!_0x357243[_0x3cf7f9(0x123)])return a43_0x2e7a81(EnhancedGuidedCreate,{'onCreate':_0x328f58,'env':_0x357243[_0x3cf7f9(0x150)]});if(_0x2a5a31)return a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x46344a(Box,{'marginTop':0x1,'children':[a43_0x2e7a81(Box,{'width':'1'}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x3cf7f9(0x12e)}),a43_0x2e7a81(Text,{'children':_0x3cf7f9(0xdc)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x25d940?.[_0x3cf7f9(0x147)]}),_0x25d940?.[_0x3cf7f9(0x129)]&&a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x2e7a81(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'children':_0x25d940[_0x3cf7f9(0x129)]})]})]}),a43_0x2e7a81(TaskRunning,{..._0x2cfccc}),a43_0x2e7a81(TaskRunning,{..._0x494093}),a43_0x2e7a81(TaskRunning,{..._0x39df13})]});if(_0x84548e){const _0x11e7fb=_0x3bd517&&(_0x3bd517[_0x3cf7f9(0x10c)][_0x3cf7f9(0xde)]>0x0||_0x3bd517[_0x3cf7f9(0xeb)][_0x3cf7f9(0xde)]>0x0);return a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x46344a(Box,{'marginTop':0x1,'children':[a43_0x2e7a81(Box,{'width':'1'}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x3cf7f9(0x12e)}),a43_0x2e7a81(Text,{'children':_0x3cf7f9(0xdc)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x25d940?.['projectName']}),_0x25d940?.[_0x3cf7f9(0x129)]&&a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x2e7a81(Text,{'children':_0x3cf7f9(0x113)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'children':_0x25d940[_0x3cf7f9(0x129)]})]})]}),a43_0x2e7a81(TaskFinished,{..._0x2cfccc}),a43_0x2e7a81(TaskFinished,{..._0x494093}),a43_0x2e7a81(TaskFinished,{..._0x39df13}),a43_0x2e7a81(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':'─'[_0x3cf7f9(0xf2)](0x3c)})}),_0x11e7fb&&a43_0x46344a(a43_0x3d6ea5,{'children':[_0x3bd517[_0x3cf7f9(0x10c)]['length']>0x0&&a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x2e7a81(Box,{'marginTop':0x1,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'bold':!![],'children':_0x3cf7f9(0x138)})}),_0x3bd517[_0x3cf7f9(0x10c)][_0x3cf7f9(0x112)]((_0x1969a8,_0x457ef2)=>a43_0x2e7a81(Box,{'marginLeft':0x2,'children':a43_0x46344a(Text,{'color':_0x1969a8[_0x3cf7f9(0xf3)]==='success'?_0x3cf7f9(0x13f):_0x1969a8[_0x3cf7f9(0xf3)]===_0x3cf7f9(0xed)?_0x3cf7f9(0x115):_0x3cf7f9(0xff),'children':[_0x1969a8[_0x3cf7f9(0x139)],':\x20',_0x1969a8['message']]})},'mcp-'+_0x457ef2))]}),_0x3bd517[_0x3cf7f9(0xeb)][_0x3cf7f9(0xde)]>0x0&&a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x2e7a81(Box,{'marginTop':_0x3bd517[_0x3cf7f9(0x10c)][_0x3cf7f9(0xde)]>0x0?0x1:0x0,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'bold':!![],'children':_0x3cf7f9(0x111)})}),_0x3bd517['skill'][_0x3cf7f9(0x112)]((_0x2250bd,_0x3c4649)=>a43_0x2e7a81(Box,{'marginLeft':0x2,'children':a43_0x46344a(Text,{'color':_0x2250bd[_0x3cf7f9(0xf3)]===_0x3cf7f9(0x121)?_0x3cf7f9(0x13f):_0x3cf7f9(0xff),'children':[_0x2250bd[_0x3cf7f9(0x139)],':\x20',_0x2250bd['message']]})},_0x3cf7f9(0x130)+_0x3c4649))]}),a43_0x2e7a81(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':'─'[_0x3cf7f9(0xf2)](0x3c)})})]}),a43_0x2e7a81(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':_0x3cf7f9(0x13e)})}),a43_0x46344a(Box,{'marginLeft':0x2,'flexDirection':_0x3cf7f9(0x137),'children':[_0x11e7fb?a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x46344a(Box,{'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x3cf7f9(0x14f)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':_0x3cf7f9(0x108)}),a43_0x2e7a81(Text,{'color':'cyan','bold':!![],'children':_0x3cf7f9(0x10f)+_0x25d940?.[_0x3cf7f9(0x147)]+_0x3cf7f9(0xe6)})]}),_0x25d940?.[_0x3cf7f9(0x129)]&&!_0x25d940?.[_0x3cf7f9(0x11e)]&&a43_0x46344a(Box,{'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x115),'children':_0x3cf7f9(0x140)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':_0x3cf7f9(0x12d)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':'lovrabet\x20api\x20pull'})]})]}):a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x2e7a81(Box,{'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x115),'bold':!![],'children':_0x3cf7f9(0x102)})}),a43_0x46344a(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':'\x20\x20•\x20Skill:\x20'}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':'lovrabet\x20skill\x20install'})]}),a43_0x46344a(Box,{'marginLeft':0x2,'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':_0x3cf7f9(0xd8)}),a43_0x2e7a81(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20mcp\x20install'})]}),a43_0x46344a(Box,{'marginTop':0x1,'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':_0x3cf7f9(0x140)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':_0x3cf7f9(0x108)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':_0x3cf7f9(0x10f)+_0x25d940?.[_0x3cf7f9(0x147)]+_0x3cf7f9(0xe6)})]}),_0x25d940?.['appCode']&&!_0x25d940?.[_0x3cf7f9(0x11e)]&&a43_0x46344a(Box,{'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x115),'children':_0x3cf7f9(0x11b)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':_0x3cf7f9(0x12d)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':_0x3cf7f9(0x14d)})]})]}),!_0x25d940?.[_0x3cf7f9(0x129)]&&a43_0x46344a(a43_0x3d6ea5,{'children':[a43_0x46344a(Box,{'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x107),'children':_0x3cf7f9(0x140)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13f),'children':'配置AppCode:\x20'}),a43_0x2e7a81(Text,{'color':'cyan','bold':!![],'children':_0x3cf7f9(0xea)})]}),a43_0x46344a(Box,{'children':[a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x107),'children':'3.\x20'}),a43_0x2e7a81(Text,{'color':'white','children':_0x3cf7f9(0x12d)}),a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x13d),'bold':!![],'children':_0x3cf7f9(0xf0)})]})]})]}),a43_0x2e7a81(Box,{'marginTop':0x1,'children':a43_0x2e7a81(Text,{'color':_0x3cf7f9(0x14b),'children':'─'[_0x3cf7f9(0xf2)](0x3c)})})]});}return null;}
|
|
1
|
+
const a43_0x2470e9=a43_0x3e88;(function(_0x426d5c,_0x236baa){const _0x5a6116=a43_0x3e88,_0xdee892=_0x426d5c();while(!![]){try{const _0x357a49=parseInt(_0x5a6116(0x129))/0x1+-parseInt(_0x5a6116(0xf6))/0x2*(-parseInt(_0x5a6116(0xe8))/0x3)+parseInt(_0x5a6116(0x117))/0x4*(-parseInt(_0x5a6116(0x10e))/0x5)+parseInt(_0x5a6116(0xd8))/0x6+parseInt(_0x5a6116(0xf5))/0x7*(-parseInt(_0x5a6116(0x102))/0x8)+parseInt(_0x5a6116(0xdc))/0x9*(-parseInt(_0x5a6116(0x131))/0xa)+-parseInt(_0x5a6116(0xc7))/0xb;if(_0x357a49===_0x236baa)break;else _0xdee892['push'](_0xdee892['shift']());}catch(_0x3ca35f){_0xdee892['push'](_0xdee892['shift']());}}}(a43_0x2f24,0x8fb0f));import{jsx as a43_0x363f9b,Fragment as a43_0x184f42,jsxs as a43_0x30de4b}from'react/jsx-runtime';import a43_0x2ad365 from'path';import a43_0x94b180 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';function a43_0x2f24(){const _0x3a46b9=['项目创建失败:\x20','\x20|\x20应用AppCode:\x20','×\x20无法在当前目录创建项目,请检查目录权限','×\x20项目创建失败:\x20','*\x20正在拉取\x20API\x20配置...','lovrabet\x20skill\x20install','\x20\x20•\x20MCP\x20服务器:\x20','aiSetup','40gCzwtr','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','API\x20配置拉取失败:\x20','×\x20项目名过长,最多支持\x20100\x20个字符','dirname','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','\x20创建配置文件','配置AppCode:\x20','gray','×\x20项目目录\x20','repeat','manual','writeFileSync','mcp-','join','create','string','×\x20项目名不能为空','640770HhmjOz','配置应用AppCode:\x20','W_OK','Claude\x20Code','开始创建项目:\x20','doTask','push','setLogPath','6050490MTTxkx','\x20配置应用AppCode:\x20','online','项目创建完成:\x20','name','utf8','yellow','\x20\x20•\x20Skill:\x20','清理项目目录失败:\x20','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','cwd','success','package.json','8932407iLdjoV','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','lovrabet\x20api\x20pull','启动项目:\x20','\x20Generated\x20by\x20lovrabet\x20cli\x20','error','info','Cursor','version','*\x20正在为项目\x20','status','red','cursor','env','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','skill-','更新\x20package.json\x20name','5281224INHYLe','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','../..','length','9wfBnlC','ide','\x20Skill\x20','log','拉取API配置:\x20','filter','white','map','\x20MCP\x20','warn','✓\x20Skill\x20安装完成:','readFileSync','3bUsEeI','mcp','projectName','项目名称:\x20','parse','\x20&&\x20lovrabet\x20start','API\x20配置拉取异常','green','accessSync','cyan','\x20\x20✗\x20MCP\x20','existsSync','skill','14805tpdtWp','2351212HcgvAx','2.\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','\x20√\x20','cd\x20','message','配置应用AppCode失败','1.0.0','pullApi','appCode','projectCode','toLocaleString','664LcoSll','API\x20配置拉取成功:\x20','has','column','description','\x20\x20✗\x20Skill\x20','claude','3.\x20','selectedIDEs','*\x20清理失败的项目目录:\x20','√\x20package.json\x20已更新:\x20name=','resolve','257695moWMFE'];a43_0x2f24=function(){return _0x3a46b9;};return a43_0x2f24();}import{TaskRunning}from'./task-running.js';function a43_0x3e88(_0x2eb3e0,_0x3ba027){_0x2eb3e0=_0x2eb3e0-0xc2;const _0x2f241b=a43_0x2f24();let _0x3e8890=_0x2f241b[_0x2eb3e0];return _0x3e8890;}import{logger}from'../utils/logger.js';import{configureMcp,copySharedSkills,installSkill,createSkillManifest}from'../ai-setup/config.js';const MCP_IDES=new Set([a43_0x2470e9(0xd3),a43_0x2470e9(0x108)]);export function CreateApp(_0x50f233){const _0x597ed2=a43_0x2470e9,[_0x306d42,_0x22f89d]=useState(![]),[_0x36a201,_0x78886c]=useState(![]),[_0x4394fd,_0x50c712]=useState(null),[_0x30a20f,_0x1ca78e]=useState(null),_0x5b9bc6=useCopyProjectTemplate(),_0x3b797b=useInstallDependencies(),_0x282712=useFormatCode(),_0x4b855c=async _0x238b58=>{const _0x1eb7f4=a43_0x3e88;if(!_0x238b58[_0x1eb7f4(0xea)]||_0x238b58[_0x1eb7f4(0xea)]['trim']()===''){console[_0x1eb7f4(0xcc)](_0x1eb7f4(0x128));return;}const _0x24f5c0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x24f5c0['test'](_0x238b58[_0x1eb7f4(0xea)])){console[_0x1eb7f4(0xcc)](_0x1eb7f4(0xc8));return;}if(_0x238b58[_0x1eb7f4(0xea)]['length']>0x64){console[_0x1eb7f4(0xcc)](_0x1eb7f4(0x11a));return;}const _0xc6972d=a43_0x2ad365[_0x1eb7f4(0x10d)](process[_0x1eb7f4(0xc4)](),_0x238b58[_0x1eb7f4(0xea)]);if(a43_0x94b180['existsSync'](_0xc6972d)){console[_0x1eb7f4(0xcc)](_0x1eb7f4(0x120)+_0x238b58['projectName']+'\x20已存在,请使用其他项目名');return;}try{const _0x341f8c=a43_0x2ad365[_0x1eb7f4(0x11b)](_0xc6972d);a43_0x94b180[_0x1eb7f4(0xf0)](_0x341f8c,a43_0x94b180['constants'][_0x1eb7f4(0x12b)]);}catch(_0x42c54c){console[_0x1eb7f4(0xcc)](_0x1eb7f4(0x111));return;}_0x50c712(_0x238b58),_0x22f89d(!![]),logger[_0x1eb7f4(0x130)](_0xc6972d),logger[_0x1eb7f4(0xcd)](_0x1eb7f4(0x126),_0x1eb7f4(0x12d)+_0x238b58[_0x1eb7f4(0xea)],{'projectDir':_0xc6972d,'appCode':_0x238b58[_0x1eb7f4(0xff)]});try{await _0x5b9bc6[_0x1eb7f4(0x12e)](_0x238b58['projectName']),await _0x43044b(_0x238b58['projectName']),await _0x3b797b[_0x1eb7f4(0x12e)](_0x238b58[_0x1eb7f4(0xea)]),await _0x282712[_0x1eb7f4(0x12e)](_0x238b58[_0x1eb7f4(0xea)]),await _0xd65882(_0x238b58[_0x1eb7f4(0xea)],_0x238b58[_0x1eb7f4(0xff)]||'',_0x238b58[_0x1eb7f4(0xd4)]);if(_0x238b58[_0x1eb7f4(0xfe)]&&_0x238b58[_0x1eb7f4(0xff)]){console['log'](_0x1eb7f4(0x113));try{const _0x296f0c=await pullApiSilent(_0x238b58[_0x1eb7f4(0xff)],undefined,_0xc6972d,_0x238b58['env']);_0x296f0c?(console[_0x1eb7f4(0xdf)]('√\x20API\x20配置拉取完成'),logger['info'](_0x1eb7f4(0x126),_0x1eb7f4(0x103)+_0x238b58[_0x1eb7f4(0xff)])):(console['log']('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x1eb7f4(0xe5)](_0x1eb7f4(0x126),_0x1eb7f4(0x119)+_0x238b58['appCode']));}catch(_0x4a2938){console[_0x1eb7f4(0xdf)](_0x1eb7f4(0xf8)),logger[_0x1eb7f4(0xe5)](_0x1eb7f4(0x126),_0x1eb7f4(0xee),{'error':_0x4a2938 instanceof Error?_0x4a2938[_0x1eb7f4(0xfb)]:String(_0x4a2938)});}}if(_0x238b58[_0x1eb7f4(0x116)]&&_0x238b58[_0x1eb7f4(0x10a)]&&_0x238b58[_0x1eb7f4(0x10a)]['length']>0x0&&_0x238b58[_0x1eb7f4(0xff)]){console['log']('*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...');const _0x22d5e2=[],_0x549b7e=[],_0x4c97a9=_0x238b58[_0x1eb7f4(0x10a)][_0x1eb7f4(0xe1)](_0x33e4f9=>MCP_IDES[_0x1eb7f4(0x104)](_0x33e4f9)),_0x4f815c=_0x238b58[_0x1eb7f4(0x10a)];for(const _0x1f27ac of _0x4c97a9){try{const _0x3f1c4c=await configureMcp(_0x1f27ac,_0xc6972d);_0x22d5e2[_0x1eb7f4(0x12f)]({'ide':_0x1f27ac==='cursor'?_0x1eb7f4(0xce):_0x1eb7f4(0x12c),'status':_0x3f1c4c[_0x1eb7f4(0xd1)],'message':_0x3f1c4c[_0x1eb7f4(0xfb)]}),console[_0x1eb7f4(0xdf)]('\x20\x20'+(_0x3f1c4c[_0x1eb7f4(0xd1)]==='success'?'✓':_0x3f1c4c['status']===_0x1eb7f4(0x122)?'⚠️':'✗')+_0x1eb7f4(0xe4)+_0x1f27ac+':\x20'+_0x3f1c4c[_0x1eb7f4(0xfb)]);}catch(_0x26b490){_0x22d5e2[_0x1eb7f4(0x12f)]({'ide':_0x1f27ac===_0x1eb7f4(0xd3)?_0x1eb7f4(0xce):_0x1eb7f4(0x12c),'status':'error','message':_0x26b490 instanceof Error?_0x26b490[_0x1eb7f4(0xfb)]:String(_0x26b490)}),console[_0x1eb7f4(0xdf)](_0x1eb7f4(0xf2)+_0x1f27ac+':\x20'+(_0x26b490 instanceof Error?_0x26b490[_0x1eb7f4(0xfb)]:String(_0x26b490)));}}await copySharedSkills(_0xc6972d);for(const _0x1be20e of _0x4f815c){try{const _0x51f6dc=await installSkill(_0x1be20e,_0xc6972d);_0x549b7e[_0x1eb7f4(0x12f)]({'ide':_0x51f6dc['ide'],'status':_0x51f6dc['status'],'message':_0x51f6dc[_0x1eb7f4(0xfb)]}),console[_0x1eb7f4(0xdf)]('\x20\x20'+(_0x51f6dc[_0x1eb7f4(0xd1)]==='success'?'✓':'✗')+_0x1eb7f4(0xde)+_0x51f6dc[_0x1eb7f4(0xdd)]+':\x20'+_0x51f6dc['message']);}catch(_0x2500e1){_0x549b7e[_0x1eb7f4(0x12f)]({'ide':_0x1be20e,'status':_0x1eb7f4(0xcc),'message':_0x2500e1 instanceof Error?_0x2500e1['message']:String(_0x2500e1)}),console[_0x1eb7f4(0xdf)](_0x1eb7f4(0x107)+_0x1be20e+':\x20'+(_0x2500e1 instanceof Error?_0x2500e1[_0x1eb7f4(0xfb)]:String(_0x2500e1)));}}if(_0x549b7e[_0x1eb7f4(0xdb)]>0x0){const _0x119518=_0x549b7e['filter'](_0x441de6=>_0x441de6[_0x1eb7f4(0xd1)]===_0x1eb7f4(0xc5))[_0x1eb7f4(0xe3)](_0xcad9ae=>_0xcad9ae['ide']);_0x119518[_0x1eb7f4(0xdb)]>0x0&&createSkillManifest(_0xc6972d,_0x119518);}_0x1ca78e({'mcp':_0x22d5e2,'skill':_0x549b7e}),console[_0x1eb7f4(0xdf)](_0x1eb7f4(0x118));}logger[_0x1eb7f4(0xc5)](_0x1eb7f4(0x126),_0x1eb7f4(0x134)+_0x238b58[_0x1eb7f4(0xea)]),_0x78886c(!![]),_0x22f89d(![]);}catch(_0x354733){logger['error'](_0x1eb7f4(0x126),_0x1eb7f4(0x10f)+_0x238b58[_0x1eb7f4(0xea)],{'error':_0x354733 instanceof Error?_0x354733['message']:String(_0x354733)});try{a43_0x94b180[_0x1eb7f4(0xf3)](_0xc6972d)&&(console['log'](_0x1eb7f4(0x10b)+_0xc6972d),a43_0x94b180['rmSync'](_0xc6972d,{'recursive':!![],'force':!![]}));}catch(_0x58da11){logger['warn']('create',_0x1eb7f4(0xc2)+_0xc6972d);}_0x22f89d(![]),console['error'](_0x1eb7f4(0x112)+(_0x354733 instanceof Error?_0x354733[_0x1eb7f4(0xfb)]:String(_0x354733)));}},_0x58e681=async _0x9c5ed=>{const _0x1c3741=a43_0x3e88;await _0x4b855c({'projectName':_0x9c5ed,'env':_0x50f233[_0x1c3741(0xd4)]});},_0x43044b=async _0x1cb484=>{const _0x1f4747=a43_0x3e88,_0x303fce=a43_0x2ad365[_0x1f4747(0x10d)](process[_0x1f4747(0xc4)](),_0x1cb484),_0x39ba40=a43_0x2ad365[_0x1f4747(0x125)](_0x303fce,'package.json');try{console[_0x1f4747(0xdf)](_0x1f4747(0xc3));const _0x286886=fileURLToPath(import.meta.url),_0xf86b1d=a43_0x2ad365['resolve'](a43_0x2ad365[_0x1f4747(0x11b)](_0x286886),_0x1f4747(0xda)),_0x226357=a43_0x2ad365[_0x1f4747(0x125)](_0xf86b1d,'package.json');let _0x3b5496=_0x1f4747(0xfd);try{const _0x1d270e=JSON[_0x1f4747(0xec)](a43_0x94b180[_0x1f4747(0xe7)](_0x226357,_0x1f4747(0x136)));_0x3b5496=_0x1d270e[_0x1f4747(0xcf)]||_0x1f4747(0xfd);}catch(_0x4b7197){}const _0x5a757a=a43_0x94b180['readFileSync'](_0x39ba40,_0x1f4747(0x136)),_0x219c24=JSON['parse'](_0x5a757a);_0x219c24[_0x1f4747(0x135)]=_0x1cb484,_0x219c24[_0x1f4747(0x106)]=_0x1cb484+_0x1f4747(0xcb)+_0x3b5496,a43_0x94b180['writeFileSync'](_0x39ba40,JSON['stringify'](_0x219c24,null,0x2)+'\x0a',_0x1f4747(0x136)),console[_0x1f4747(0xdf)](_0x1f4747(0x10c)+_0x1cb484),logger[_0x1f4747(0xcd)]('create',_0x1f4747(0xd7));}catch(_0x4c9230){logger['error'](_0x1f4747(0x126),'更新\x20package.json\x20失败');throw _0x4c9230;}},_0xd65882=async(_0x226197,_0x33b6a0,_0x583485)=>{const _0xad138a=a43_0x3e88,_0x5b751c=a43_0x2ad365['resolve'](process[_0xad138a(0xc4)](),_0x226197),_0x1e3c9e=a43_0x2ad365[_0xad138a(0x125)](_0x5b751c,'.lovrabetrc');try{_0x33b6a0?console[_0xad138a(0xdf)](_0xad138a(0xd0)+_0x226197+_0xad138a(0x132)+_0x33b6a0):console['log'](_0xad138a(0xd0)+_0x226197+_0xad138a(0x11d));const _0x32e1d0=fileURLToPath(import.meta.url),_0x5632ce=a43_0x2ad365['resolve'](a43_0x2ad365[_0xad138a(0x11b)](_0x32e1d0),_0xad138a(0xda)),_0x12886a=a43_0x2ad365['join'](_0x5632ce,_0xad138a(0xc6));let _0x4545f3=_0xad138a(0xfd);try{const _0x59a7a3=JSON[_0xad138a(0xec)](a43_0x94b180[_0xad138a(0xe7)](_0x12886a,_0xad138a(0x136)));_0x4545f3=_0x59a7a3[_0xad138a(0xcf)]||'1.0.0';}catch(_0x2693a2){}const _0x23f8b9=readConfig(),_0x21387c=typeof _0x23f8b9[_0xad138a(0xd4)]===_0xad138a(0x127)?_0x23f8b9['env']:undefined,{app:_0x4da923,appcode:_0xcc4a03,..._0x39349c}=_0x23f8b9,_0x28ee33={..._0x39349c,'appcode':_0x33b6a0||'','env':_0x583485||_0x21387c||_0xad138a(0x133),'createdAt':new Date()[_0xad138a(0x101)](),'version':_0x4545f3};a43_0x94b180[_0xad138a(0x123)](_0x1e3c9e,JSON['stringify'](_0x28ee33,null,0x2),_0xad138a(0x136)),_0x33b6a0?console[_0xad138a(0xdf)]('√\x20配置文件已创建,应用AppCode:\x20'+_0x33b6a0):console[_0xad138a(0xdf)](_0xad138a(0xd5)),logger[_0xad138a(0xcd)](_0xad138a(0x126),_0xad138a(0x12a)+_0x33b6a0);}catch(_0x188716){logger[_0xad138a(0xcc)](_0xad138a(0x126),_0xad138a(0xfc));}};useEffect(()=>{const _0x359bd2=a43_0x3e88;_0x50f233[_0x359bd2(0x100)]&&_0x58e681(_0x50f233['projectCode']);},[_0x50f233[_0x597ed2(0x100)]]);if(!_0x306d42&&!_0x36a201&&!_0x50f233[_0x597ed2(0x100)])return a43_0x363f9b(EnhancedGuidedCreate,{'onCreate':_0x4b855c,'env':_0x50f233[_0x597ed2(0xd4)]});if(_0x306d42)return a43_0x30de4b(a43_0x184f42,{'children':[a43_0x30de4b(Box,{'marginTop':0x1,'children':[a43_0x363f9b(Box,{'width':'1'}),a43_0x363f9b(Text,{'color':_0x597ed2(0xef),'children':_0x597ed2(0xf9)}),a43_0x363f9b(Text,{'children':_0x597ed2(0xeb)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xef),'children':_0x4394fd?.['projectName']}),_0x4394fd?.['appCode']&&a43_0x30de4b(a43_0x184f42,{'children':[a43_0x363f9b(Text,{'children':_0x597ed2(0x110)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'children':_0x4394fd[_0x597ed2(0xff)]})]})]}),a43_0x363f9b(TaskRunning,{..._0x5b9bc6}),a43_0x363f9b(TaskRunning,{..._0x3b797b}),a43_0x363f9b(TaskRunning,{..._0x282712})]});if(_0x36a201){const _0x1ff13a=_0x30a20f&&(_0x30a20f[_0x597ed2(0xe9)]['length']>0x0||_0x30a20f[_0x597ed2(0xf4)][_0x597ed2(0xdb)]>0x0);return a43_0x30de4b(a43_0x184f42,{'children':[a43_0x30de4b(Box,{'marginTop':0x1,'children':[a43_0x363f9b(Box,{'width':'1'}),a43_0x363f9b(Text,{'color':'green','children':_0x597ed2(0xf9)}),a43_0x363f9b(Text,{'children':_0x597ed2(0xeb)}),a43_0x363f9b(Text,{'color':'green','children':_0x4394fd?.['projectName']}),_0x4394fd?.[_0x597ed2(0xff)]&&a43_0x30de4b(a43_0x184f42,{'children':[a43_0x363f9b(Text,{'children':_0x597ed2(0x110)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'children':_0x4394fd[_0x597ed2(0xff)]})]})]}),a43_0x363f9b(TaskFinished,{..._0x5b9bc6}),a43_0x363f9b(TaskFinished,{..._0x3b797b}),a43_0x363f9b(TaskFinished,{..._0x282712}),a43_0x363f9b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x363f9b(Text,{'color':'green','children':'─'[_0x597ed2(0x121)](0x3c)})}),_0x1ff13a&&a43_0x30de4b(a43_0x184f42,{'children':[_0x30a20f[_0x597ed2(0xe9)][_0x597ed2(0xdb)]>0x0&&a43_0x30de4b(a43_0x184f42,{'children':[a43_0x363f9b(Box,{'marginTop':0x1,'children':a43_0x363f9b(Text,{'color':_0x597ed2(0xef),'bold':!![],'children':'✓\x20MCP\x20服务器配置完成:'})}),_0x30a20f[_0x597ed2(0xe9)][_0x597ed2(0xe3)]((_0x2d21ae,_0xe8453e)=>a43_0x363f9b(Box,{'marginLeft':0x2,'children':a43_0x30de4b(Text,{'color':_0x2d21ae[_0x597ed2(0xd1)]==='success'?_0x597ed2(0xe2):_0x2d21ae[_0x597ed2(0xd1)]==='manual'?'yellow':'red','children':[_0x2d21ae[_0x597ed2(0xdd)],':\x20',_0x2d21ae[_0x597ed2(0xfb)]]})},_0x597ed2(0x124)+_0xe8453e))]}),_0x30a20f[_0x597ed2(0xf4)][_0x597ed2(0xdb)]>0x0&&a43_0x30de4b(a43_0x184f42,{'children':[a43_0x363f9b(Box,{'marginTop':_0x30a20f['mcp'][_0x597ed2(0xdb)]>0x0?0x1:0x0,'children':a43_0x363f9b(Text,{'color':'green','bold':!![],'children':_0x597ed2(0xe6)})}),_0x30a20f['skill']['map']((_0x41a511,_0x107dd6)=>a43_0x363f9b(Box,{'marginLeft':0x2,'children':a43_0x30de4b(Text,{'color':_0x41a511['status']===_0x597ed2(0xc5)?_0x597ed2(0xe2):_0x597ed2(0xd2),'children':[_0x41a511[_0x597ed2(0xdd)],':\x20',_0x41a511[_0x597ed2(0xfb)]]})},_0x597ed2(0xd6)+_0x107dd6))]}),a43_0x363f9b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x363f9b(Text,{'color':_0x597ed2(0xef),'children':'─'[_0x597ed2(0x121)](0x3c)})})]}),a43_0x363f9b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':'🚀\x20接下来:'})}),a43_0x30de4b(Box,{'marginLeft':0x2,'flexDirection':_0x597ed2(0x105),'children':[_0x1ff13a?a43_0x30de4b(a43_0x184f42,{'children':[a43_0x30de4b(Box,{'children':[a43_0x363f9b(Text,{'color':'green','children':'1.\x20'}),a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':_0x597ed2(0xca)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':'cd\x20'+_0x4394fd?.[_0x597ed2(0xea)]+_0x597ed2(0xed)})]}),_0x4394fd?.[_0x597ed2(0xff)]&&!_0x4394fd?.['pullApi']&&a43_0x30de4b(Box,{'children':[a43_0x363f9b(Text,{'color':'yellow','children':_0x597ed2(0xf7)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':_0x597ed2(0xe0)}),a43_0x363f9b(Text,{'color':'cyan','bold':!![],'children':_0x597ed2(0xc9)})]})]}):a43_0x30de4b(a43_0x184f42,{'children':[a43_0x363f9b(Box,{'children':a43_0x363f9b(Text,{'color':_0x597ed2(0x137),'bold':!![],'children':_0x597ed2(0xd9)})}),a43_0x30de4b(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':_0x597ed2(0x138)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':_0x597ed2(0x114)})]}),a43_0x30de4b(Box,{'marginLeft':0x2,'children':[a43_0x363f9b(Text,{'color':'white','children':_0x597ed2(0x115)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':'lovrabet\x20mcp\x20install'})]}),a43_0x30de4b(Box,{'marginTop':0x1,'children':[a43_0x363f9b(Text,{'color':_0x597ed2(0xef),'children':'2.\x20'}),a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':'启动项目:\x20'}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':_0x597ed2(0xfa)+_0x4394fd?.[_0x597ed2(0xea)]+_0x597ed2(0xed)})]}),_0x4394fd?.[_0x597ed2(0xff)]&&!_0x4394fd?.['pullApi']&&a43_0x30de4b(Box,{'children':[a43_0x363f9b(Text,{'color':_0x597ed2(0x137),'children':'3.\x20'}),a43_0x363f9b(Text,{'color':'white','children':_0x597ed2(0xe0)}),a43_0x363f9b(Text,{'color':'cyan','bold':!![],'children':_0x597ed2(0xc9)})]})]}),!_0x4394fd?.[_0x597ed2(0xff)]&&a43_0x30de4b(a43_0x184f42,{'children':[a43_0x30de4b(Box,{'children':[a43_0x363f9b(Text,{'color':_0x597ed2(0x11f),'children':_0x597ed2(0xf7)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':_0x597ed2(0x11e)}),a43_0x363f9b(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a43_0x30de4b(Box,{'children':[a43_0x363f9b(Text,{'color':_0x597ed2(0x11f),'children':_0x597ed2(0x109)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xe2),'children':_0x597ed2(0xe0)}),a43_0x363f9b(Text,{'color':_0x597ed2(0xf1),'bold':!![],'children':_0x597ed2(0x11c)})]})]})]}),a43_0x363f9b(Box,{'marginTop':0x1,'children':a43_0x363f9b(Text,{'color':'green','children':'─'[_0x597ed2(0x121)](0x3c)})})]});}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30b493,_0x483ebe){var _0x38de0e=a44_0xf16d,_0x449888=_0x30b493();while(!![]){try{var _0x51c981=parseInt(_0x38de0e(0x1a9))/0x1+-parseInt(_0x38de0e(0x1a7))/0x2*(-parseInt(_0x38de0e(0x1a3))/0x3)+-parseInt(_0x38de0e(0x19d))/0x4*(-parseInt(_0x38de0e(0x1a1))/0x5)+-parseInt(_0x38de0e(0x1a2))/0x6*(parseInt(_0x38de0e(0x19e))/0x7)+parseInt(_0x38de0e(0x19f))/0x8+parseInt(_0x38de0e(0x1a4))/0x9*(-parseInt(_0x38de0e(0x1a6))/0xa)+-parseInt(_0x38de0e(0x1a0))/0xb;if(_0x51c981===_0x483ebe)break;else _0x449888['push'](_0x449888['shift']());}catch(_0x25747f){_0x449888['push'](_0x449888['shift']());}}}(a44_0x12cc,0xd0b36));function a44_0x12cc(){var _0x17aea9=['47992AFVwQt','699853BjrjHz','3305kpfCJz','2348724gnTfII','24FxayEB','18NBpPbo','\x20√\x20','102540PYsLKb','309436beygpy','green','387200cHzXCr','5288OaAQPi','28tzXpmp'];a44_0x12cc=function(){return _0x17aea9;};return a44_0x12cc();}import{jsx as a44_0x123137,jsxs as a44_0x40b35b}from'react/jsx-runtime';function a44_0xf16d(_0x2d53ee,_0x179bb0){_0x2d53ee=_0x2d53ee-0x19d;var _0x12ccf5=a44_0x12cc();var _0xf16d33=_0x12ccf5[_0x2d53ee];return _0xf16d33;}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x29a7b2){var _0x895623=a44_0xf16d;return a44_0x40b35b(Box,{'children':[a44_0x123137(Box,{'width':'1'}),a44_0x123137(Text,{'color':_0x895623(0x1a8),'children':_0x895623(0x1a5)}),a44_0x123137(Text,{'children':_0x29a7b2['taskName']}),a44_0x123137(TaskTime,{'elapsed':_0x29a7b2['elapsed']})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x492cf6,_0x2eed4a){var _0x53b079=a45_0x8f6b,_0x5be593=_0x492cf6();while(!![]){try{var _0x543454=-parseInt(_0x53b079(0x191))/0x1*(parseInt(_0x53b079(0x18c))/0x2)+parseInt(_0x53b079(0x18b))/0x3+parseInt(_0x53b079(0x18e))/0x4*(parseInt(_0x53b079(0x193))/0x5)+-parseInt(_0x53b079(0x185))/0x6*(-parseInt(_0x53b079(0x18a))/0x7)+parseInt(_0x53b079(0x18d))/0x8*(parseInt(_0x53b079(0x18f))/0x9)+-parseInt(_0x53b079(0x183))/0xa*(-parseInt(_0x53b079(0x186))/0xb)+-parseInt(_0x53b079(0x187))/0xc;if(_0x543454===_0x2eed4a)break;else _0x5be593['push'](_0x5be593['shift']());}catch(_0x810818){_0x5be593['push'](_0x5be593['shift']());}}}(a45_0x2e29,0xb1ab4));import{jsx as a45_0x69c2a0,jsxs as a45_0xcd3e39}from'react/jsx-runtime';function a45_0x2e29(){var _0x3aea12=['310zMzlqH','70UpRYlh','loading','570630VjvqFA','930479IXoYyS','28481868qSTwLL','green','\x20\x20\x20','21hhlUrT','3217869DwErGU','1826dHMQzF','56SudmBt','93188uOAIuz','1021023JYhHdN','dots','1191eMXoLN','finished'];a45_0x2e29=function(){return _0x3aea12;};return a45_0x2e29();}function a45_0x8f6b(_0x3182e0,_0x5c453a){_0x3182e0=_0x3182e0-0x183;var _0x2e296b=a45_0x2e29();var _0x8f6b0b=_0x2e296b[_0x3182e0];return _0x8f6b0b;}import{Text}from'ink';import a45_0x54caab from'ink-spinner';export function TaskLoading(_0x30a097){var _0x4b9c5f=a45_0x8f6b;if(_0x30a097[_0x4b9c5f(0x192)])return a45_0x69c2a0(Text,{'color':_0x4b9c5f(0x188),'children':'\x20√\x20'});if(_0x30a097[_0x4b9c5f(0x184)])return a45_0xcd3e39(Text,{'color':'green','children':['\x20',a45_0x69c2a0(a45_0x54caab,{'type':_0x4b9c5f(0x190)}),'\x20']});return a45_0x69c2a0(Text,{'children':_0x4b9c5f(0x189)});}
|