@lovrabet/cli 1.3.1 → 1.3.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/add-page/input-page-router.js +1 -1
- package/lib/add-page/main.js +1 -1
- package/lib/add-page/select-page-template.js +1 -1
- package/lib/ai-setup/AISetupUI.js +1 -1
- package/lib/ai-setup/config.js +1 -1
- package/lib/api/api-doc-ui.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/app-menu/app-menu-sync-ui.js +1 -1
- package/lib/app-menu/create-menu.js +1 -1
- package/lib/app-menu/get-local-pages.js +1 -1
- package/lib/app-menu/get-online-menu-list.js +1 -1
- package/lib/app-menu/use-get-online-menu-list.js +1 -1
- package/lib/app-menu/utils.js +1 -1
- package/lib/app-menu/valid-url.js +1 -1
- package/lib/app-menu-update-cdn/current-content.js +1 -1
- package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
- package/lib/app-menu-update-cdn/main.js +1 -1
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -0
- package/lib/cli.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/SkillInstallUI.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/skill-install-non-interactive.js +1 -1
- package/lib/skills/skill-installer.js +1 -1
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
package/lib/cli-flags.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5a1c9c,_0x2dcb30){const _0x3091e4=a31_0x812d,_0x44e584=_0x5a1c9c();while(!![]){try{const _0x4e18c7=parseInt(_0x3091e4(0x7a))/0x1+-parseInt(_0x3091e4(0x7d))/0x2*(parseInt(_0x3091e4(0x7c))/0x3)+parseInt(_0x3091e4(0x76))/0x4+parseInt(_0x3091e4(0x78))/0x5+parseInt(_0x3091e4(0x7b))/0x6*(-parseInt(_0x3091e4(0x77))/0x7)+parseInt(_0x3091e4(0x75))/0x8*(-parseInt(_0x3091e4(0x79))/0x9)+-parseInt(_0x3091e4(0x7e))/0xa;if(_0x4e18c7===_0x2dcb30)break;else _0x44e584['push'](_0x44e584['shift']());}catch(_0xb3f123){_0x44e584['push'](_0x44e584['shift']());}}}(a31_0x34f5,0x627f5));function a31_0x812d(_0x6f4202,_0x3f9a6d){_0x6f4202=_0x6f4202-0x75;const _0x34f5f9=a31_0x34f5();let _0x812d4a=_0x34f5f9[_0x6f4202];return _0x812d4a;}function a31_0x34f5(){const _0x202564=['3152840weqDtO','9ZyTmzf','370695xrdCeX','212712WUdZEX','40728pWBUry','12DgWrxK','3306820ackLBi','1596088luXVAt','1047980KMQwJK','49ufxEId'];a31_0x34f5=function(){return _0x202564;};return a31_0x34f5();}export const dynamicCliFlags={'dangerouslyBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a31_0x3c148f=a31_0x5372;(function(_0x18a1d6,_0x53466f){const _0x3189bc=a31_0x5372,_0x57a224=_0x18a1d6();while(!![]){try{const _0x34856a=parseInt(_0x3189bc(0x182))/0x1*(-parseInt(_0x3189bc(0x15d))/0x2)+parseInt(_0x3189bc(0x1a7))/0x3*(parseInt(_0x3189bc(0x174))/0x4)+parseInt(_0x3189bc(0x17d))/0x5*(-parseInt(_0x3189bc(0x18c))/0x6)+-parseInt(_0x3189bc(0x18a))/0x7*(-parseInt(_0x3189bc(0x1a0))/0x8)+parseInt(_0x3189bc(0x1a4))/0x9+parseInt(_0x3189bc(0x1a1))/0xa*(-parseInt(_0x3189bc(0x1a9))/0xb)+parseInt(_0x3189bc(0x185))/0xc;if(_0x34856a===_0x53466f)break;else _0x57a224['push'](_0x57a224['shift']());}catch(_0x515ee4){_0x57a224['push'](_0x57a224['shift']());}}}(a31_0x1906,0x33d23));import{jsx as a31_0x203bbf}from'react/jsx-runtime';import a31_0x5bf993 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';function a31_0x5372(_0x3ef8e4,_0x102d42){_0x3ef8e4=_0x3ef8e4-0x159;const _0x190624=a31_0x1906();let _0x537238=_0x190624[_0x3ef8e4];return _0x537238;}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';function a31_0x1906(){const _0xb835b5=['setRawCommand','logs','appcode','mcp-install','lovrabet\x20','config','mcpClaude','menu','setLogPath','error','length','opencode','cursor','env','执行安装技能包命令','101576ZFrIWZ','610szyonx','boolean','auth','1774341NLOrTj','string','join','3IyAVFw','\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','28369SsaceX','other','codex','true','logout','all','同步菜单命令','执行添加页面命令','28DwMnHm','page','执行构建命令','isTTY','执行更新菜单\x20CDN\x20资源命令','cline','menu-update-cdn','qoder','windsurf','执行预览命令','help','start','skill','input','--help','build','antigravity','trim','watch','slice','add','api','trae','706760UPgfns','preview','codebuddy','clear','create','claude','mcpCursor','执行启动命令','init','1810Osndls','mcpOther','执行初始化配置命令','exit','agent','16897RyBDXj','update','argv','2738484USmpVA','push','非交互模式创建项目:\x20','\x20(监听模式)','info','28gZGfdz','skill-install','774VkIvoD','执行配置\x20MCP\x20命令','flags','cwd','install'];a31_0x1906=function(){return _0xb835b5;};return a31_0x1906();}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';function isNonInteractiveMode(_0x40ac80){const _0x940106=a31_0x5372;return!!(_0x40ac80['nonInteractive']||_0x40ac80['ci']||process[_0x940106(0x19e)]['LOVRABET_CI']===_0x940106(0x1ac)||process['env']['CI']===_0x940106(0x1ac)||!process['stdout'][_0x940106(0x160)]);}const cli=a31_0x5bf993(a31_0x3c148f(0x1a8),{'importMeta':import.meta,'flags':{'name':{'type':a31_0x3c148f(0x1a5)},'clear':{'type':a31_0x3c148f(0x1a2)},'env':{'type':a31_0x3c148f(0x1a5)},'watch':{'type':a31_0x3c148f(0x1a2)},'help':{'type':a31_0x3c148f(0x1a2)},'appcode':{'type':a31_0x3c148f(0x1a5)},'output':{'type':a31_0x3c148f(0x1a5)},'params':{'type':'string'},'datasetcode':{'type':a31_0x3c148f(0x1a5)},'mcpCursor':{'type':a31_0x3c148f(0x1a2)},'mcpClaude':{'type':a31_0x3c148f(0x1a2)},'mcpOther':{'type':'boolean'},'cursor':{'type':'boolean'},'windsurf':{'type':a31_0x3c148f(0x1a2)},'claude':{'type':a31_0x3c148f(0x1a2)},'cline':{'type':a31_0x3c148f(0x1a2)},'codex':{'type':a31_0x3c148f(0x1a2)},'opencode':{'type':a31_0x3c148f(0x1a2)},'qoder':{'type':a31_0x3c148f(0x1a2)},'codebuddy':{'type':'boolean'},'trae':{'type':a31_0x3c148f(0x1a2)},'agent':{'type':'boolean'},'antigravity':{'type':a31_0x3c148f(0x1a2)},'all':{'type':a31_0x3c148f(0x1a2)},'nonInteractive':{'type':a31_0x3c148f(0x1a2)},'ci':{'type':a31_0x3c148f(0x1a2)}},'autoVersion':!![]});await run();async function run(){const _0x2deee9=a31_0x3c148f,_0x267a7e=cli[_0x2deee9(0x16a)][0x0],_0x526f6c=cli[_0x2deee9(0x16a)][0x1],_0x2d9dcc=cli[_0x2deee9(0x16a)][0x2],_0x58c438=(_0x2deee9(0x195)+process[_0x2deee9(0x184)][_0x2deee9(0x170)](0x2)[_0x2deee9(0x1a6)]('\x20'))[_0x2deee9(0x16e)]();logger[_0x2deee9(0x191)](_0x58c438);switch(_0x267a7e){case _0x2deee9(0x17c):{const _0x2f52aa=cli[_0x2deee9(0x18e)][_0x2deee9(0x193)],_0x4cfb0d=cli[_0x2deee9(0x18e)][_0x2deee9(0x19e)];logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]()),logger[_0x2deee9(0x189)](_0x2deee9(0x17c),_0x2deee9(0x17f)),render(a31_0x203bbf(Init,{'appcode':_0x2f52aa,'env':_0x4cfb0d}));break;}case'create':{const _0x8dce0c=cli[_0x2deee9(0x16a)][0x1]?.[_0x2deee9(0x16e)](),_0x2511e9=cli[_0x2deee9(0x18e)][_0x2deee9(0x19e)],_0x2af0ef=isNonInteractiveMode(cli['flags']);if(_0x2af0ef&&_0x8dce0c){logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]()),logger['info'](_0x2deee9(0x178),_0x2deee9(0x187)+_0x8dce0c);const {createProjectNonInteractive:_0x4c4cfe}=await import('./create-app/non-interactive.js');await _0x4c4cfe(_0x8dce0c,_0x2511e9);}else render(a31_0x203bbf(CreateApp,{'projectCode':_0x8dce0c,'env':_0x2511e9}));break;}case _0x2deee9(0x171):{cli[_0x2deee9(0x16a)][0x1]===_0x2deee9(0x15e)&&(logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]()),logger[_0x2deee9(0x189)]('add-page',_0x2deee9(0x15c)),render(a31_0x203bbf(AddPage,{})));break;}case _0x2deee9(0x168):{try{logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]()),logger['info'](_0x2deee9(0x168),_0x2deee9(0x17b)),await runStart();}catch(_0x510a2d){console[_0x2deee9(0x19a)](_0x510a2d),process[_0x2deee9(0x180)](0x1);}break;}case'build':{try{logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]()),logger[_0x2deee9(0x189)](_0x2deee9(0x16c),_0x2deee9(0x15f)),await runBuild();}catch(_0xe2feb7){console[_0x2deee9(0x19a)](_0xe2feb7),process[_0x2deee9(0x180)](0x1);}break;}case _0x2deee9(0x175):{const _0x179dc7=cli[_0x2deee9(0x18e)][_0x2deee9(0x16f)];logger[_0x2deee9(0x199)](process['cwd']()),logger[_0x2deee9(0x189)]('preview',_0x2deee9(0x166)+(_0x179dc7?_0x2deee9(0x188):''));if(_0x179dc7)try{await Promise[_0x2deee9(0x15a)]([runBuildWatch(),runPreview()]);}catch(_0x2be53d){console[_0x2deee9(0x19a)](_0x2be53d),process[_0x2deee9(0x180)](0x1);}else try{await runPreview();}catch(_0x2556ab){console[_0x2deee9(0x19a)](_0x2556ab),process[_0x2deee9(0x180)](0x1);}break;}case _0x2deee9(0x196):{render(a31_0x203bbf(Config,{'cli':cli}));break;}case _0x2deee9(0x172):{await apiCli(cli);break;}case _0x2deee9(0x1a3):{render(a31_0x203bbf(AuthServer,{}));break;}case _0x2deee9(0x198):{if(_0x526f6c===_0x2deee9(0x183)){logger['setLogPath'](process['cwd']()),logger[_0x2deee9(0x189)](_0x2deee9(0x163),_0x2deee9(0x161)),render(a31_0x203bbf(AppMenuUpdateCdn,{}));break;}else logger[_0x2deee9(0x199)](process['cwd']()),logger[_0x2deee9(0x189)]('menu-sync',_0x2deee9(0x15b)),render(a31_0x203bbf(AppMenuSyncUI,{}));break;}case _0x2deee9(0x159):{logout();break;}case'mcp':{const _0x5614d8=cli[_0x2deee9(0x16a)][0x1];logger[_0x2deee9(0x199)](process['cwd']());if(_0x5614d8==='install'){const _0xa50002=[];if(cli[_0x2deee9(0x18e)][_0x2deee9(0x17a)]||cli[_0x2deee9(0x18e)][_0x2deee9(0x19d)])_0xa50002[_0x2deee9(0x186)](_0x2deee9(0x19d));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x197)]||cli[_0x2deee9(0x18e)]['claude'])_0xa50002[_0x2deee9(0x186)](_0x2deee9(0x179));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x17e)])_0xa50002[_0x2deee9(0x186)](_0x2deee9(0x1aa));logger[_0x2deee9(0x189)](_0x2deee9(0x194),_0x2deee9(0x18d),{'preselected':_0xa50002});if(isNonInteractiveMode(cli[_0x2deee9(0x18e)])&&_0xa50002[_0x2deee9(0x19b)]>0x0){const {installMcpNonInteractive:_0x5c22c0}=await import('./mcp/mcp-install-non-interactive.js');await _0x5c22c0(_0xa50002);}else render(a31_0x203bbf(McpInstallUI,{'preselectedIDEs':_0xa50002}));}else _0x5614d8===_0x2deee9(0x16b)||cli[_0x2deee9(0x18e)][_0x2deee9(0x167)]?await mcpCommand(_0x5614d8,[],{'help':!![]}):await mcpCommand(_0x5614d8,[],cli[_0x2deee9(0x18e)]);break;}case _0x2deee9(0x169):{const _0x28ccbd=cli[_0x2deee9(0x16a)][0x1];logger[_0x2deee9(0x199)](process[_0x2deee9(0x18f)]());if(_0x28ccbd===_0x2deee9(0x190)){const _0x248396=[];if(cli[_0x2deee9(0x18e)][_0x2deee9(0x15a)])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x19d),_0x2deee9(0x165),_0x2deee9(0x179),'cline','codex',_0x2deee9(0x19c),'qoder',_0x2deee9(0x176),_0x2deee9(0x173),_0x2deee9(0x181),_0x2deee9(0x16d));else{if(cli[_0x2deee9(0x18e)]['cursor'])_0x248396['push'](_0x2deee9(0x19d));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x165)])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x165));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x179)])_0x248396[_0x2deee9(0x186)]('claude');if(cli['flags'][_0x2deee9(0x162)])_0x248396[_0x2deee9(0x186)]('cline');if(cli[_0x2deee9(0x18e)]['codex'])_0x248396['push'](_0x2deee9(0x1ab));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x19c)])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x19c));if(cli[_0x2deee9(0x18e)][_0x2deee9(0x164)])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x164));if(cli[_0x2deee9(0x18e)]['codebuddy'])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x176));if(cli[_0x2deee9(0x18e)]['trae'])_0x248396[_0x2deee9(0x186)]('trae');if(cli[_0x2deee9(0x18e)][_0x2deee9(0x181)])_0x248396['push'](_0x2deee9(0x181));if(cli[_0x2deee9(0x18e)]['antigravity'])_0x248396[_0x2deee9(0x186)](_0x2deee9(0x16d));}logger['info'](_0x2deee9(0x18b),_0x2deee9(0x19f),{'preselected':_0x248396});if(isNonInteractiveMode(cli[_0x2deee9(0x18e)])&&_0x248396[_0x2deee9(0x19b)]>0x0){const {installSkillsNonInteractive:_0x1a43d2}=await import('./skills/skill-install-non-interactive.js');await _0x1a43d2(_0x248396);}else render(a31_0x203bbf(SkillInstallUI,{'preselectedIDEs':_0x248396}));}else _0x28ccbd===_0x2deee9(0x16b)||cli['flags']['help']?await skillsCommand(_0x28ccbd,[],{'help':!![]}):await skillsCommand(_0x28ccbd,[],cli[_0x2deee9(0x18e)]);break;}case _0x2deee9(0x192):{cli[_0x2deee9(0x18e)][_0x2deee9(0x177)]?clearLogs():showLogs();break;}default:render(a31_0x203bbf(Help,{}));break;}}
|
|
2
|
+
const a32_0xdfb557=a32_0x3843;(function(_0x2448e5,_0x29948c){const _0xedf56f=a32_0x3843,_0x3733c=_0x2448e5();while(!![]){try{const _0x4753dc=-parseInt(_0xedf56f(0xf2))/0x1*(-parseInt(_0xedf56f(0x110))/0x2)+parseInt(_0xedf56f(0xfb))/0x3*(parseInt(_0xedf56f(0xfc))/0x4)+-parseInt(_0xedf56f(0xdb))/0x5*(parseInt(_0xedf56f(0xe1))/0x6)+parseInt(_0xedf56f(0xf1))/0x7*(parseInt(_0xedf56f(0xd3))/0x8)+-parseInt(_0xedf56f(0xee))/0x9*(parseInt(_0xedf56f(0xd1))/0xa)+parseInt(_0xedf56f(0xf3))/0xb*(parseInt(_0xedf56f(0xc7))/0xc)+-parseInt(_0xedf56f(0x108))/0xd;if(_0x4753dc===_0x29948c)break;else _0x3733c['push'](_0x3733c['shift']());}catch(_0x1dc6d6){_0x3733c['push'](_0x3733c['shift']());}}}(a32_0x24e8,0x62897));import{jsx as a32_0x3a6eca}from'react/jsx-runtime';import a32_0x5b9511 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';function a32_0x3843(_0x3a20bd,_0x2c30ec){_0x3a20bd=_0x3a20bd-0xc5;const _0x24e88b=a32_0x24e8();let _0x384364=_0x24e88b[_0x3a20bd];return _0x384364;}import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a32_0xdfb557(0xce)))[a32_0xdfb557(0xeb)];}catch{}function a32_0x24e8(){const _0x22b2b9=['antigravity','codex','help','./skills/main.js','flags','codebuddy','trae','windsurf','qoder','logs','执行配置\x20MCP\x20命令','8580364fHZxGX','length','cwd','create','boolean','clear','opencode','input','20392wQlBcf','argv','agent','执行预览命令','install','exit','mcpClaude','menu-update-cdn','cline','trim','error','336jzWqxz','lovrabet\x20','LOVRABET_CI','./mcp/mcp-install-non-interactive.js','preview','api','watch','./cli-flags.js','cursor','other','7268900DVbCZr','true','1428008UMGKau','env','执行安装技能包命令','setLogPath','push','mcp','add-page','info','2325hQbDlp','logout','执行添加页面命令','add','mcpOther','page','1206HnbSnS','auth','start','stdout','skill-install','mcpCursor','join','menu','执行启动命令','init','dynamicCliFlags','./skills/skill-install-non-interactive.js','--help','9mbLVhE','claude','同步菜单命令','7PmGUIr','59iCeXhN','315799BksFlh','非交互模式创建项目:\x20','string','all','build','setRawCommand','isTTY','\x20(监听模式)','900219jFeGYw','4vSIWdk'];a32_0x24e8=function(){return _0x22b2b9;};return a32_0x24e8();}const mergedFlags={...dynamicCliFlags||{}};function isNonInteractiveMode(_0x1dd6cc){const _0x3b15ca=a32_0xdfb557;return!!(_0x1dd6cc['nonInteractive']||_0x1dd6cc['ci']||process[_0x3b15ca(0xd4)][_0x3b15ca(0xc9)]===_0x3b15ca(0xd2)||process[_0x3b15ca(0xd4)]['CI']===_0x3b15ca(0xd2)||!process[_0x3b15ca(0xe4)][_0x3b15ca(0xf9)]);}const cli=a32_0x5b9511('\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20//\x20包含\x20Backend\x20Function\x20同步工作流\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a',{'importMeta':import.meta,'flags':{'name':{'type':a32_0xdfb557(0xf5)},'clear':{'type':a32_0xdfb557(0x10c)},'env':{'type':a32_0xdfb557(0xf5)},'watch':{'type':a32_0xdfb557(0x10c)},'help':{'type':'boolean'},'appcode':{'type':a32_0xdfb557(0xf5)},'output':{'type':a32_0xdfb557(0xf5)},'params':{'type':a32_0xdfb557(0xf5)},'datasetcode':{'type':'string'},'mcpCursor':{'type':a32_0xdfb557(0x10c)},'mcpClaude':{'type':a32_0xdfb557(0x10c)},'mcpOther':{'type':'boolean'},'cursor':{'type':a32_0xdfb557(0x10c)},'windsurf':{'type':a32_0xdfb557(0x10c)},'claude':{'type':a32_0xdfb557(0x10c)},'cline':{'type':a32_0xdfb557(0x10c)},'codex':{'type':a32_0xdfb557(0x10c)},'opencode':{'type':a32_0xdfb557(0x10c)},'qoder':{'type':a32_0xdfb557(0x10c)},'codebuddy':{'type':'boolean'},'trae':{'type':a32_0xdfb557(0x10c)},'agent':{'type':a32_0xdfb557(0x10c)},'antigravity':{'type':a32_0xdfb557(0x10c)},'all':{'type':a32_0xdfb557(0x10c)},'nonInteractive':{'type':'boolean'},'ci':{'type':'boolean'},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x19bd63=a32_0xdfb557,_0x31145d=cli['input'][0x0],_0x3ab621=cli[_0x19bd63(0x10f)][0x1],_0x3b5db1=cli[_0x19bd63(0x10f)][0x2],_0x323719=(_0x19bd63(0xc8)+process[_0x19bd63(0x111)]['slice'](0x2)[_0x19bd63(0xe7)]('\x20'))[_0x19bd63(0xc5)]();logger[_0x19bd63(0xf8)](_0x323719);switch(_0x31145d){case _0x19bd63(0xea):{const _0x323987=cli['flags']['appcode'],_0x3de812=cli[_0x19bd63(0x101)][_0x19bd63(0xd4)];logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0xea),'执行初始化配置命令'),render(a32_0x3a6eca(Init,{'appcode':_0x323987,'env':_0x3de812}));break;}case _0x19bd63(0x10b):{const _0x13062b=cli[_0x19bd63(0x10f)][0x1]?.[_0x19bd63(0xc5)](),_0x4186e2=cli[_0x19bd63(0x101)]['env'],_0xe550b0=isNonInteractiveMode(cli['flags']);if(_0xe550b0&&_0x13062b){logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0x10b),_0x19bd63(0xf4)+_0x13062b);const {createProjectNonInteractive:_0x1d0b99}=await import('./create-app/non-interactive.js');await _0x1d0b99(_0x13062b,_0x4186e2);}else render(a32_0x3a6eca(CreateApp,{'projectCode':_0x13062b,'env':_0x4186e2}));break;}case _0x19bd63(0xde):{cli[_0x19bd63(0x10f)][0x1]===_0x19bd63(0xe0)&&(logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xd9),_0x19bd63(0xdd)),render(a32_0x3a6eca(AddPage,{})));break;}case _0x19bd63(0xe3):{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xe3),_0x19bd63(0xe9)),await runStart();}catch(_0x40c901){console[_0x19bd63(0xc6)](_0x40c901),process[_0x19bd63(0x115)](0x1);}break;}case'build':{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xf7),'执行构建命令'),await runBuild();}catch(_0x5f4e08){console[_0x19bd63(0xc6)](_0x5f4e08),process[_0x19bd63(0x115)](0x1);}break;}case _0x19bd63(0xcb):{const _0x25c2cb=cli[_0x19bd63(0x101)][_0x19bd63(0xcd)];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0xcb),_0x19bd63(0x113)+(_0x25c2cb?_0x19bd63(0xfa):''));if(_0x25c2cb)try{await Promise[_0x19bd63(0xf6)]([runBuildWatch(),runPreview()]);}catch(_0x18c42b){console['error'](_0x18c42b),process[_0x19bd63(0x115)](0x1);}else try{await runPreview();}catch(_0x582c1){console[_0x19bd63(0xc6)](_0x582c1),process[_0x19bd63(0x115)](0x1);}break;}case'config':{render(a32_0x3a6eca(Config,{'cli':cli}));break;}case _0x19bd63(0xcc):{await apiCli(cli);break;}case _0x19bd63(0xe2):{render(a32_0x3a6eca(AuthServer,{}));break;}case _0x19bd63(0xe8):{if(_0x3ab621==='update'){logger['setLogPath'](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0x117),'执行更新菜单\x20CDN\x20资源命令'),render(a32_0x3a6eca(AppMenuUpdateCdn,{}));break;}else logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)]('menu-sync',_0x19bd63(0xf0)),render(a32_0x3a6eca(AppMenuSyncUI,{}));break;}case _0x19bd63(0xdc):{logout();break;}case _0x19bd63(0xd8):{const _0x3d8877=cli[_0x19bd63(0x10f)][0x1];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]());if(_0x3d8877==='install'){const _0x1e7add=[];if(cli[_0x19bd63(0x101)][_0x19bd63(0xe6)]||cli['flags']['cursor'])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x116)]||cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xef));if(cli['flags'][_0x19bd63(0xdf)])_0x1e7add['push'](_0x19bd63(0xd0));logger['info']('mcp-install',_0x19bd63(0x107),{'preselected':_0x1e7add});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x1e7add[_0x19bd63(0x109)]>0x0){const {installMcpNonInteractive:_0x1b98a7}=await import(_0x19bd63(0xca));await _0x1b98a7(_0x1e7add);}else render(a32_0x3a6eca(McpInstallUI,{'preselectedIDEs':_0x1e7add}));}else _0x3d8877===_0x19bd63(0xed)||cli[_0x19bd63(0x101)]['help']?await mcpCommand(_0x3d8877,[],{'help':!![]}):await mcpCommand(_0x3d8877,[],cli[_0x19bd63(0x101)]);break;}case'skill':{const _0x1f2ade=cli[_0x19bd63(0x10f)][0x1];logger['setLogPath'](process[_0x19bd63(0x10a)]());if(_0x1f2ade===_0x19bd63(0x114)){const _0x4899bf=[];if(cli[_0x19bd63(0x101)]['all'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf),_0x19bd63(0x104),'claude','cline','codex',_0x19bd63(0x10e),_0x19bd63(0x105),_0x19bd63(0x102),'trae',_0x19bd63(0x112),_0x19bd63(0xfd));else{if(cli['flags']['cursor'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x104)])_0x4899bf[_0x19bd63(0xd7)]('windsurf');if(cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x4899bf['push'](_0x19bd63(0xef));if(cli[_0x19bd63(0x101)][_0x19bd63(0x118)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x118));if(cli['flags'][_0x19bd63(0xfe)])_0x4899bf[_0x19bd63(0xd7)]('codex');if(cli[_0x19bd63(0x101)][_0x19bd63(0x10e)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x10e));if(cli[_0x19bd63(0x101)][_0x19bd63(0x105)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x105));if(cli['flags'][_0x19bd63(0x102)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x102));if(cli[_0x19bd63(0x101)][_0x19bd63(0x103)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x103));if(cli['flags'][_0x19bd63(0x112)])_0x4899bf['push'](_0x19bd63(0x112));if(cli[_0x19bd63(0x101)][_0x19bd63(0xfd)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xfd));}const {getAllProvidedFlags:_0x44ed30}=await import(_0x19bd63(0x100)),_0x492303=_0x44ed30(cli[_0x19bd63(0x101)]);logger[_0x19bd63(0xda)](_0x19bd63(0xe5),_0x19bd63(0xd5),{'preselected':_0x4899bf,'providedFlags':_0x492303});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x4899bf[_0x19bd63(0x109)]>0x0){const {installSkillsNonInteractive:_0x146b12}=await import(_0x19bd63(0xec));await _0x146b12(_0x4899bf,_0x492303);}else render(a32_0x3a6eca(SkillInstallUI,{'preselectedIDEs':_0x4899bf,'providedFlags':_0x492303}));}else _0x1f2ade==='--help'||cli['flags'][_0x19bd63(0xff)]?await skillsCommand(_0x1f2ade,[],{'help':!![]}):await skillsCommand(_0x1f2ade,[],cli[_0x19bd63(0x101)]);break;}case _0x19bd63(0x106):{cli['flags'][_0x19bd63(0x10d)]?clearLogs():showLogs();break;}default:render(a32_0x3a6eca(Help,{}));break;}}
|
package/lib/cmd/build-watch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48d94e,_0x5abb7e){const _0x3ef171=a33_0x1d01,_0x5e4a13=_0x48d94e();while(!![]){try{const _0x5c9cc9=parseInt(_0x3ef171(0x1fb))/0x1+-parseInt(_0x3ef171(0x1fe))/0x2+parseInt(_0x3ef171(0x1ff))/0x3*(parseInt(_0x3ef171(0x1f9))/0x4)+parseInt(_0x3ef171(0x1f6))/0x5*(parseInt(_0x3ef171(0x1fa))/0x6)+-parseInt(_0x3ef171(0x1f5))/0x7+-parseInt(_0x3ef171(0x1f1))/0x8*(-parseInt(_0x3ef171(0x202))/0x9)+parseInt(_0x3ef171(0x1f4))/0xa*(parseInt(_0x3ef171(0x1f7))/0xb);if(_0x5c9cc9===_0x5abb7e)break;else _0x5e4a13['push'](_0x5e4a13['shift']());}catch(_0x335b53){_0x5e4a13['push'](_0x5e4a13['shift']());}}}(a33_0x4cf7,0xc0a2a));import{spawn}from'node:child_process';function a33_0x1d01(_0x381bfe,_0x2913ba){_0x381bfe=_0x381bfe-0x1f1;const _0x4cf7e3=a33_0x4cf7();let _0x1d0130=_0x4cf7e3[_0x381bfe];return _0x1d0130;}import{delimiter,join}from'node:path';function a33_0x4cf7(){const _0x20e533=['build','2522380dwvQWK','9rGVXvr','PATH','--watch','18BiIqLS','.bin','4695224KUAUgU','vite','env','430690GxOzlh','10798445wZhrRe','858655SJqzaD','66rSVDDk','cwd','892888pTofra','6hWUuPC','1319242FmHjUr','error'];a33_0x4cf7=function(){return _0x20e533;};return a33_0x4cf7();}export function runBuildWatch(){return new Promise((_0x5b02a8,_0xbd3c4a)=>{const _0x4af418=a33_0x1d01,_0x34245f=spawn(_0x4af418(0x1f2),[_0x4af418(0x1fd),_0x4af418(0x201)],{'stdio':'inherit','shell':!![],'env':{...process[_0x4af418(0x1f3)],'PATH':''+join(process[_0x4af418(0x1f8)](),'node_modules',_0x4af418(0x203))+delimiter+process['env'][_0x4af418(0x200)]}});_0x34245f['on']('close',_0x5b6c8f=>{if(_0x5b6c8f===0x0||_0x5b6c8f===null)_0x5b02a8();else _0xbd3c4a(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x5b6c8f));}),_0x34245f['on'](_0x4af418(0x1fc),_0xbd3c4a);});}
|
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x588ad6,_0x155a30){const _0x648ebb=a34_0xb57c,_0x4e9f0b=_0x588ad6();while(!![]){try{const _0x47415f=parseInt(_0x648ebb(0xdf))/0x1+-parseInt(_0x648ebb(0xe6))/0x2+-parseInt(_0x648ebb(0xe3))/0x3+-parseInt(_0x648ebb(0xde))/0x4+-parseInt(_0x648ebb(0xec))/0x5+parseInt(_0x648ebb(0xe0))/0x6*(parseInt(_0x648ebb(0xee))/0x7)+parseInt(_0x648ebb(0xd8))/0x8;if(_0x47415f===_0x155a30)break;else _0x4e9f0b['push'](_0x4e9f0b['shift']());}catch(_0x5065c4){_0x4e9f0b['push'](_0x4e9f0b['shift']());}}}(a34_0x2669,0x63001));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a34_0xb57c(_0x318002,_0x2d999d){_0x318002=_0x318002-0xd7;const _0x266963=a34_0x2669();let _0xb57c85=_0x266963[_0x318002];return _0xb57c85;}import{logger}from'../utils/logger.js';function a34_0x2669(){const _0x22f89d=['开始构建项目','.bin','data','toString','2712385nJlbsT','cwd','2679180plMJTh','success','now','error','项目构建成功','info','run','env','message','11349744IkQKGB','close','PATH','pipe','stderr','node_modules','2645844tpwxEa','475825SsAcpU','12rkvrvI','inherit','npm\x20run\x20build\x20exited\x20with\x20code\x20','1983645zYFQGZ','npm\x20run\x20build','build','778730XFATBs','trim'];a34_0x2669=function(){return _0x22f89d;};return a34_0x2669();}export function runBuild(){return new Promise((_0x2060d3,_0x3e69dc)=>{const _0x57d93c=a34_0xb57c,_0x116840=Date['now']();logger[_0x57d93c(0xf3)](_0x57d93c(0xe5),_0x57d93c(0xe8),{'command':_0x57d93c(0xe4)});let _0x4ceb49='';const _0x178351=spawn('npm',[_0x57d93c(0xf4),_0x57d93c(0xe5)],{'stdio':['inherit',_0x57d93c(0xe1),_0x57d93c(0xdb)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x57d93c(0xed)](),_0x57d93c(0xdd),_0x57d93c(0xe9))+delimiter+process[_0x57d93c(0xf5)][_0x57d93c(0xda)]}});_0x178351[_0x57d93c(0xdc)]?.['on'](_0x57d93c(0xea),_0x1fe830=>{const _0x6b3531=_0x57d93c;_0x4ceb49+=_0x1fe830[_0x6b3531(0xeb)]();}),_0x178351['on'](_0x57d93c(0xd9),_0x52df4f=>{const _0x97cb92=_0x57d93c,_0x4b2612=Date[_0x97cb92(0xf0)]()-_0x116840;if(_0x52df4f===0x0||_0x52df4f===null)logger[_0x97cb92(0xef)](_0x97cb92(0xe5),_0x97cb92(0xf2),_0x4b2612),_0x2060d3();else{const _0x3a0ef2={'exitCode':_0x52df4f,'duration':_0x4b2612,'command':'npm\x20run\x20build','cwd':process[_0x97cb92(0xed)]()};_0x4ceb49[_0x97cb92(0xe7)]()&&(_0x3a0ef2[_0x97cb92(0xdc)]=_0x4ceb49[_0x97cb92(0xe7)]()),logger[_0x97cb92(0xf1)](_0x97cb92(0xe5),'项目构建失败',_0x3a0ef2),_0x3e69dc(new Error(_0x97cb92(0xe2)+_0x52df4f));}}),_0x178351['on'](_0x57d93c(0xf1),_0x41e0ad=>{const _0x54e82c=_0x57d93c,_0xf6b9c5=Date[_0x54e82c(0xf0)]()-_0x116840;logger[_0x54e82c(0xf1)](_0x54e82c(0xe5),'项目构建出错',{'error':_0x41e0ad[_0x54e82c(0xd7)],'duration':_0xf6b9c5,'stderr':_0x4ceb49['trim']()||undefined}),_0x3e69dc(_0x41e0ad);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x44d1f8,_0x799f32){const _0x3408cd=a35_0xef4c,_0x1b367c=_0x44d1f8();while(!![]){try{const _0x52f1c=parseInt(_0x3408cd(0xe7))/0x1+-parseInt(_0x3408cd(0xff))/0x2*(parseInt(_0x3408cd(0xea))/0x3)+parseInt(_0x3408cd(0xee))/0x4*(-parseInt(_0x3408cd(0xe3))/0x5)+-parseInt(_0x3408cd(0xfa))/0x6+parseInt(_0x3408cd(0xf2))/0x7+parseInt(_0x3408cd(0xfb))/0x8*(-parseInt(_0x3408cd(0xe0))/0x9)+parseInt(_0x3408cd(0xe6))/0xa*(parseInt(_0x3408cd(0xfe))/0xb);if(_0x52f1c===_0x799f32)break;else _0x1b367c['push'](_0x1b367c['shift']());}catch(_0x57675d){_0x1b367c['push'](_0x1b367c['shift']());}}}(a35_0x3958,0xf1125));function a35_0xef4c(_0x3330bd,_0xf77fc8){_0x3330bd=_0x3330bd-0xdf;const _0x3958d1=a35_0x3958();let _0xef4c0c=_0x3958d1[_0x3330bd];return _0xef4c0c;}import{logger}from'../utils/logger.js';export function showLogs(){const _0x4979a4=a35_0xef4c;logger[_0x4979a4(0xf4)](process[_0x4979a4(0xf6)]());const _0x489c36=logger[_0x4979a4(0xf9)]();if(_0x489c36['length']===0x0){console[_0x4979a4(0xed)](_0x4979a4(0xe8));return;}console['log'](_0x4979a4(0xe2)),_0x489c36[_0x4979a4(0xf3)]((_0x2ee02f,_0x493c20)=>{const _0x960d34=_0x4979a4,_0x4595ea=new Date(_0x2ee02f['timestamp'])['toLocaleString'](_0x960d34(0xe9)),_0x371d58=_0x2ee02f[_0x960d34(0xf0)]===_0x960d34(0xeb)?'√':_0x2ee02f[_0x960d34(0xf0)]===_0x960d34(0xf7)?'×':_0x2ee02f['level']==='warn'?'!':'i';console['log'](_0x493c20+0x1+'.\x20'+_0x371d58+'\x20['+_0x2ee02f[_0x960d34(0xe4)]+']\x20'+_0x2ee02f[_0x960d34(0xfd)]),console[_0x960d34(0xed)](_0x960d34(0xef)+_0x4595ea),_0x2ee02f[_0x960d34(0xf1)]&&console['log'](_0x960d34(0xec)+_0x2ee02f[_0x960d34(0xf1)]+'ms'),_0x2ee02f[_0x960d34(0xfc)]&&Object[_0x960d34(0xf8)](_0x2ee02f['details'])[_0x960d34(0xe1)]>0x0&&console[_0x960d34(0xed)](_0x960d34(0xe5)+JSON['stringify'](_0x2ee02f[_0x960d34(0xfc)],null,0x2)),console[_0x960d34(0xed)]('');});}export function clearLogs(){const _0x3b9709=a35_0xef4c;logger[_0x3b9709(0xf4)](process[_0x3b9709(0xf6)]()),logger[_0x3b9709(0xdf)](),console['log'](_0x3b9709(0xf5));}function a35_0x3958(){const _0x58d194=['9456475hTkrbI','forEach','setLogPath','*\x20日志已清空','cwd','error','keys','readLogs','6084786bhjtDO','344DSDNTE','details','message','22CZyynY','214534iEachw','clearLogs','94410HMACYv','length','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','5eVxHZo','command','\x20\x20\x20详情:\x20','4355710TftYHI','1357195JtauIX','*\x20暂无日志记录','zh-CN','21oGrToW','success','\x20\x20\x20耗时:\x20','log','1503052xQQmPt','\x20\x20\x20时间:\x20','level','duration'];a35_0x3958=function(){return _0x58d194;};return a35_0x3958();}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a7edd,_0x20e14d){const _0x57b6bb=a36_0xc87e,_0x3fbbbd=_0x5a7edd();while(!![]){try{const _0x391176=-parseInt(_0x57b6bb(0x117))/0x1*(parseInt(_0x57b6bb(0x107))/0x2)+-parseInt(_0x57b6bb(0x120))/0x3+parseInt(_0x57b6bb(0x114))/0x4*(-parseInt(_0x57b6bb(0x10f))/0x5)+parseInt(_0x57b6bb(0x124))/0x6*(-parseInt(_0x57b6bb(0x121))/0x7)+parseInt(_0x57b6bb(0x10d))/0x8+parseInt(_0x57b6bb(0x111))/0x9*(parseInt(_0x57b6bb(0x122))/0xa)+parseInt(_0x57b6bb(0x11c))/0xb;if(_0x391176===_0x20e14d)break;else _0x3fbbbd['push'](_0x3fbbbd['shift']());}catch(_0x86b692){_0x3fbbbd['push'](_0x3fbbbd['shift']());}}}(a36_0x4ab6,0xc853a));function a36_0xc87e(_0x45b237,_0x3158d2){_0x45b237=_0x45b237-0x105;const _0x4ab666=a36_0x4ab6();let _0xc87e2e=_0x4ab666[_0x45b237];return _0xc87e2e;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a36_0x4ab6(){const _0x384fdf=['vite\x20preview\x20exited\x20with\x20code\x20','cwd','19276uFIueW','trim','PATH','1zTOrDr','now','message','vite\x20preview','info','23413280LhOvpI','env','pipe','preview','4192401lkeEqT','91dEJQMl','420gzUEMz','toString','151434BAsxDO','启动预览服务器','success','data','1193606YWkRrh','预览服务器启动出错','inherit','vite','预览服务器启动成功','close','9941984bUstrv','error','1145itBrjm','stderr','187551BfOcvc'];a36_0x4ab6=function(){return _0x384fdf;};return a36_0x4ab6();}export function runPreview(){return new Promise((_0x3e9ae3,_0x4fcdf0)=>{const _0x344f81=a36_0xc87e,_0x4b26f8=Date['now']();logger[_0x344f81(0x11b)]('preview',_0x344f81(0x125),{'command':_0x344f81(0x11a)});let _0x4cf412='';const _0x2510ab=spawn(_0x344f81(0x10a),[_0x344f81(0x11f)],{'stdio':[_0x344f81(0x109),'inherit',_0x344f81(0x11e)],'shell':!![],'env':{...process[_0x344f81(0x11d)],'PATH':''+join(process[_0x344f81(0x113)](),'node_modules','.bin')+delimiter+process['env'][_0x344f81(0x116)]}});_0x2510ab[_0x344f81(0x110)]?.['on'](_0x344f81(0x106),_0x5a0b7d=>{const _0x536b4e=_0x344f81;_0x4cf412+=_0x5a0b7d[_0x536b4e(0x123)]();}),_0x2510ab['on'](_0x344f81(0x10c),_0x5f015a=>{const _0x27bcf5=_0x344f81,_0x4bb7f5=Date[_0x27bcf5(0x118)]()-_0x4b26f8;if(_0x5f015a===0x0||_0x5f015a===null)logger[_0x27bcf5(0x105)](_0x27bcf5(0x11f),_0x27bcf5(0x10b),_0x4bb7f5),_0x3e9ae3();else{const _0x59ba87={'exitCode':_0x5f015a,'duration':_0x4bb7f5,'command':_0x27bcf5(0x11a),'cwd':process[_0x27bcf5(0x113)]()};_0x4cf412[_0x27bcf5(0x115)]()&&(_0x59ba87[_0x27bcf5(0x110)]=_0x4cf412['trim']()),logger[_0x27bcf5(0x10e)](_0x27bcf5(0x11f),'预览服务器启动失败',_0x59ba87),_0x4fcdf0(new Error(_0x27bcf5(0x112)+_0x5f015a));}}),_0x2510ab['on'](_0x344f81(0x10e),_0x40bb2e=>{const _0x13a445=_0x344f81,_0x3fe8dc=Date[_0x13a445(0x118)]()-_0x4b26f8;logger[_0x13a445(0x10e)](_0x13a445(0x11f),_0x13a445(0x108),{'error':_0x40bb2e[_0x13a445(0x119)],'duration':_0x3fe8dc,'stderr':_0x4cf412[_0x13a445(0x115)]()||undefined}),_0x4fcdf0(_0x40bb2e);});});}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e6a69,_0x2f71b2){const _0x3756d4=a37_0x3aa2,_0x56ced8=_0x1e6a69();while(!![]){try{const _0x4a92da=parseInt(_0x3756d4(0xcb))/0x1*(parseInt(_0x3756d4(0xd8))/0x2)+parseInt(_0x3756d4(0xd0))/0x3+parseInt(_0x3756d4(0xd2))/0x4*(parseInt(_0x3756d4(0xd1))/0x5)+-parseInt(_0x3756d4(0xe0))/0x6+-parseInt(_0x3756d4(0xc9))/0x7*(-parseInt(_0x3756d4(0xd9))/0x8)+parseInt(_0x3756d4(0xcf))/0x9*(-parseInt(_0x3756d4(0xd4))/0xa)+parseInt(_0x3756d4(0xd7))/0xb;if(_0x4a92da===_0x2f71b2)break;else _0x56ced8['push'](_0x56ced8['shift']());}catch(_0x432fe8){_0x56ced8['push'](_0x56ced8['shift']());}}}(a37_0x2e02,0xb0946));import{delimiter,join}from'node:path';function a37_0x3aa2(_0x517da7,_0x16dc5f){_0x517da7=_0x517da7-0xc5;const _0x2e0259=a37_0x2e02();let _0x3aa2cc=_0x2e0259[_0x517da7];return _0x3aa2cc;}import{spawn}from'node:child_process';function a37_0x2e02(){const _0x33aa0a=['开发服务器启动失败','开发服务器启动出错','11090662KlZJxR','1365542fBSxte','114496DQmFFC','start','vite\x20exited\x20with\x20code\x20','SDK\x20版本有更新','now','env','error','8076594hqixZe','warn','stderr','write','CLI\x20版本有更新','inherit','vite','info','currentVersion','启动开发服务器','toString','cwd','stableVersion','266tGNgWj','message','1ccFead','trim','.bin','needsUpgrade','369VolQHk','597603jgTWdm','545AMLlWl','35332dAKyJa','开发服务器启动成功','323780xVaduA'];a37_0x2e02=function(){return _0x33aa0a;};return a37_0x2e02();}import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x3306a5){const _0x5e0bd3=a37_0x3aa2,_0x528f79=Date[_0x5e0bd3(0xdd)](),_0x3d7622=_0x3306a5||process[_0x5e0bd3(0xc7)](),_0x13b026=await checkCliVersion();_0x13b026[_0x5e0bd3(0xce)]&&(printCliUpgradeWarning(_0x13b026),logger[_0x5e0bd3(0xe1)](_0x5e0bd3(0xda),_0x5e0bd3(0xe4),{'currentVersion':_0x13b026[_0x5e0bd3(0xe8)],'stableVersion':_0x13b026[_0x5e0bd3(0xc8)]}));const _0x46d9=await checkSdkVersion(_0x3d7622);_0x46d9[_0x5e0bd3(0xce)]&&(printSdkUpgradeWarning(_0x46d9),logger[_0x5e0bd3(0xe1)](_0x5e0bd3(0xda),_0x5e0bd3(0xdc),{'currentVersion':_0x46d9['version'],'stableVersion':_0x46d9[_0x5e0bd3(0xc8)]}));logger[_0x5e0bd3(0xe7)]('start',_0x5e0bd3(0xc5),{'command':_0x5e0bd3(0xe6),'cwd':_0x3d7622});let _0x40b5fb='';const _0xed4466=spawn(_0x5e0bd3(0xe6),{'stdio':[_0x5e0bd3(0xe5),_0x5e0bd3(0xe5),'pipe'],'shell':!![],'cwd':_0x3d7622,'env':{...process[_0x5e0bd3(0xde)],'PATH':''+join(_0x3d7622,'node_modules',_0x5e0bd3(0xcd))+delimiter+process[_0x5e0bd3(0xde)]['PATH']}});return _0xed4466[_0x5e0bd3(0xe2)]?.['on']('data',_0x7b0a5b=>{const _0x4e1264=_0x5e0bd3,_0x5cde56=_0x7b0a5b[_0x4e1264(0xc6)]();_0x40b5fb+=_0x5cde56,process['stderr'][_0x4e1264(0xe3)](_0x5cde56);}),new Promise((_0x57903e,_0x4713d8)=>{const _0x201cb6=_0x5e0bd3;_0xed4466['on']('close',_0x392cad=>{const _0x2b2196=a37_0x3aa2,_0x436ef7=Date[_0x2b2196(0xdd)]()-_0x528f79;if(_0x392cad===0x0||_0x392cad===null)logger['success'](_0x2b2196(0xda),_0x2b2196(0xd3),_0x436ef7),_0x57903e();else{const _0x5f2351={'exitCode':_0x392cad,'duration':_0x436ef7,'command':_0x2b2196(0xe6),'cwd':_0x3d7622};_0x40b5fb[_0x2b2196(0xcc)]()&&(_0x5f2351['stderr']=_0x40b5fb['trim']()),logger[_0x2b2196(0xdf)](_0x2b2196(0xda),_0x2b2196(0xd5),_0x5f2351),_0x4713d8(new Error(_0x2b2196(0xdb)+_0x392cad));}}),_0xed4466['on'](_0x201cb6(0xdf),_0x6fc3fe=>{const _0x395a50=_0x201cb6,_0xa8b5b6=Date[_0x395a50(0xdd)]()-_0x528f79,_0x4a8092={'error':_0x6fc3fe[_0x395a50(0xca)],'duration':_0xa8b5b6,'command':_0x395a50(0xe6),'cwd':_0x3d7622};_0x40b5fb[_0x395a50(0xcc)]()&&(_0x4a8092['stderr']=_0x40b5fb[_0x395a50(0xcc)]()),logger[_0x395a50(0xdf)](_0x395a50(0xda),_0x395a50(0xd6),_0x4a8092),_0x4713d8(_0x6fc3fe);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x184d2c,_0x1f8ee8){const _0x5747f5=a38_0x3a01,_0x5abbda=_0x184d2c();while(!![]){try{const _0x9c1838=parseInt(_0x5747f5(0x153))/0x1+parseInt(_0x5747f5(0x160))/0x2*(-parseInt(_0x5747f5(0x156))/0x3)+parseInt(_0x5747f5(0x151))/0x4+parseInt(_0x5747f5(0x15e))/0x5+parseInt(_0x5747f5(0x15d))/0x6+-parseInt(_0x5747f5(0x162))/0x7+-parseInt(_0x5747f5(0x152))/0x8*(parseInt(_0x5747f5(0x165))/0x9);if(_0x9c1838===_0x1f8ee8)break;else _0x5abbda['push'](_0x5abbda['shift']());}catch(_0x21dfec){_0x5abbda['push'](_0x5abbda['shift']());}}}(a38_0x5c87,0xa5c4a));function a38_0x3a01(_0x4aed64,_0x2dcb2e){_0x4aed64=_0x4aed64-0x150;const _0x5c877b=a38_0x5c87();let _0x3a01b8=_0x5c877b[_0x4aed64];return _0x3a01b8;}function a38_0x5c87(){const _0x1429bd=['3064cpxsVz','150940qHnIzo','gray','无效的命令,可用命令如下:','5637vdSLRD','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','获取配置项','设置配置项','description','列出所有配置项','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3748710QkOEEe','4637670HkAJrj','\x20\x20\x20\x20','26ZZFHUU','command','4111975YMiBry','配置当前项目的\x20App\x20Code','map','15399XPAdZr','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','971568vGcwyf'];a38_0x5c87=function(){return _0x1429bd;};return a38_0x5c87();}import{jsxs as a38_0x55f1bd,jsx as a38_0x17d57f}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x5c134c=a38_0x3a01,_0x21abd7=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x5c134c(0x159)},{'command':_0x5c134c(0x15c),'description':_0x5c134c(0x158)},{'command':_0x5c134c(0x150),'description':_0x5c134c(0x15b)}],_0x579e5f=[{'command':_0x5c134c(0x166),'description':_0x5c134c(0x163)},{'command':_0x5c134c(0x157),'description':'设置环境\x20(online/daily)'}];return a38_0x55f1bd(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a38_0x17d57f(Box,{'marginBottom':0x1,'children':a38_0x55f1bd(Text,{'color':_0x5c134c(0x154),'children':['\x20!','\x20\x20',_0x5c134c(0x155)]})}),_0x21abd7[_0x5c134c(0x164)](_0x1abc76=>a38_0x55f1bd(Box,{'children':[a38_0x55f1bd(Text,{'children':['\x20\x20\x20\x20',_0x1abc76[_0x5c134c(0x161)]]}),a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':_0x1abc76['description']})]},_0x1abc76[_0x5c134c(0x161)])),a38_0x17d57f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':'\x20*\x20配置示例:'})}),_0x579e5f[_0x5c134c(0x164)](_0xb64f73=>a38_0x55f1bd(Box,{'children':[a38_0x55f1bd(Text,{'children':[_0x5c134c(0x15f),_0xb64f73[_0x5c134c(0x161)]]}),a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':_0xb64f73[_0x5c134c(0x15a)]})]},_0xb64f73[_0x5c134c(0x161)]))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e9da1,_0x4d1dc7){const _0x320092=a39_0x3fc0,_0x121d14=_0x2e9da1();while(!![]){try{const _0x3ba645=-parseInt(_0x320092(0x12b))/0x1*(-parseInt(_0x320092(0x136))/0x2)+-parseInt(_0x320092(0x13e))/0x3+parseInt(_0x320092(0x132))/0x4+parseInt(_0x320092(0x13c))/0x5+parseInt(_0x320092(0x13a))/0x6+parseInt(_0x320092(0x139))/0x7+-parseInt(_0x320092(0x12a))/0x8;if(_0x3ba645===_0x4d1dc7)break;else _0x121d14['push'](_0x121d14['shift']());}catch(_0x1a9f7c){_0x121d14['push'](_0x121d14['shift']());}}}(a39_0x49fe,0xe36fb));import{jsx as a39_0x16908a,jsxs as a39_0x51fc84}from'react/jsx-runtime';function a39_0x49fe(){const _0x368543=['unlinkSync','length','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','input','保存配置失败','app','get','保存配置失败:\x20','config','renameSync','stringify','red','dirname','string','9011896IzwxLh','1cfpzij','--help','undefined','utf8','环境配置已设置为:\x20','mkdirSync','env','3219096jrMwIO','未提供配置值','includes','log','1673726aqeabE','set','daily','8971816nmMwJj','3890700CfxVGa','appcode','1096210eksdBv','.tmp','5198853NKTRGe'];a39_0x49fe=function(){return _0x368543;};return a39_0x49fe();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import a39_0xa215a6 from'node:fs';import a39_0x3cd588 from'node:path';function a39_0x3fc0(_0x110f94,_0x492377){_0x110f94=_0x110f94-0x12a;const _0x49fe7f=a39_0x49fe();let _0x3fc0b6=_0x49fe7f[_0x110f94];return _0x3fc0b6;}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x3bff41){const _0x1c4781=a39_0x3fc0,{cli:_0x7ca689}=_0x3bff41,_0x2fce7a=_0x7ca689['input'][0x1],_0xfd952e=_0x7ca689['input'][0x2],_0x285c0d=[_0x1c4781(0x137),'get'][_0x1c4781(0x134)](_0x2fce7a||''),_0x38463d=_0x7ca689[_0x1c4781(0x142)][_0x1c4781(0x140)]>=0x3;if(_0xfd952e===_0x1c4781(0x12c)||_0x7ca689['flags']['help'])return a39_0x16908a(ConfigHelp,{});const _0x164ac0=readConfig();if(_0x2fce7a===_0x1c4781(0x137)){if(_0xfd952e){const _0xbda0d6=_0x7ca689['input'][0x3];if(typeof _0xbda0d6!=='undefined'){if(_0xfd952e===_0x1c4781(0x131)&&!['online',_0x1c4781(0x138)][_0x1c4781(0x134)](_0xbda0d6))return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':_0x1c4781(0x14a),'children':_0x1c4781(0x141)})});const _0x3326dc=isInProject(),_0x44373f=_0x3326dc?projectConfigPath:globalConfigPath;let _0x384684={};try{if(existsSync(_0x44373f)){const _0x371ceb=readFileSync(_0x44373f,{'encoding':_0x1c4781(0x12e)});_0x371ceb&&(_0x384684=JSON['parse'](_0x371ceb));}}catch(_0x506648){}if(typeof _0xbda0d6!==_0x1c4781(0x14c)||_0xbda0d6[_0x1c4781(0x140)]>0x1f4)return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':_0x1c4781(0x14a),'children':'配置值无效或过长'})});let _0x42847b=_0xfd952e;_0xfd952e===_0x1c4781(0x144)&&(_0x42847b=_0x1c4781(0x13b),delete _0x384684['app']);_0xfd952e===_0x1c4781(0x13b)&&delete _0x384684[_0x1c4781(0x144)];_0x384684[_0x42847b]=_0xbda0d6;try{const _0x4059a7=a39_0x3cd588[_0x1c4781(0x14b)](_0x44373f);!existsSync(_0x4059a7)&&a39_0xa215a6[_0x1c4781(0x130)](_0x4059a7,{'recursive':!![]});const _0x45bf73=_0x44373f+_0x1c4781(0x13d);writeFileSync(_0x45bf73,JSON['stringify'](_0x384684,null,0x2),{'encoding':_0x1c4781(0x12e),'mode':0x180}),a39_0xa215a6[_0x1c4781(0x148)](_0x45bf73,_0x44373f);if(_0xfd952e===_0x1c4781(0x131)){const _0x458bf5=_0x3326dc?'项目':'全局';console[_0x1c4781(0x135)]('✓\x20'+_0x458bf5+_0x1c4781(0x12f)+_0xbda0d6);}}catch(_0x36701f){const _0x3f6157=_0x44373f+'.tmp';try{existsSync(_0x3f6157)&&a39_0xa215a6[_0x1c4781(0x13f)](_0x3f6157);}catch(_0x5e6579){}return logger['error'](_0x1c4781(0x147),_0x1c4781(0x143),{'error':_0x36701f instanceof Error?_0x36701f['message']:String(_0x36701f),'configKey':_0xfd952e,'configValue':_0xbda0d6,'targetConfigPath':_0x44373f}),a39_0x16908a(Box,{'children':a39_0x51fc84(Text,{'color':_0x1c4781(0x14a),'children':[_0x1c4781(0x146),_0x36701f instanceof Error?_0x36701f['message']:String(_0x36701f)]})});}return null;}return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':'red','children':_0x1c4781(0x133)})});}}if(_0x2fce7a===_0x1c4781(0x145)){if(_0xfd952e){let _0x1f0610=_0xfd952e;return _0xfd952e===_0x1c4781(0x144)&&(_0x1f0610=_0x1c4781(0x13b)),console['log'](_0x164ac0[_0x1f0610]||_0x1c4781(0x12d)),null;}return null;}if(_0x2fce7a==='list')return console[_0x1c4781(0x135)](JSON[_0x1c4781(0x149)](_0x164ac0,null,0x2)),null;if(!_0x285c0d||!_0x38463d)return a39_0x16908a(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x2ef818=a40_0x74d8;function a40_0x74d8(_0x17d985,_0x507453){_0x17d985=_0x17d985-0x94;const _0x421874=a40_0x4218();let _0x74d8b3=_0x421874[_0x17d985];return _0x74d8b3;}(function(_0x8f8319,_0xcac3eb){const _0xe8129e=a40_0x74d8,_0x8dd7b6=_0x8f8319();while(!![]){try{const _0x1441e7=-parseInt(_0xe8129e(0x95))/0x1+-parseInt(_0xe8129e(0x94))/0x2+-parseInt(_0xe8129e(0x96))/0x3+-parseInt(_0xe8129e(0x97))/0x4+parseInt(_0xe8129e(0x9d))/0x5*(parseInt(_0xe8129e(0x9f))/0x6)+parseInt(_0xe8129e(0x99))/0x7+parseInt(_0xe8129e(0x98))/0x8*(parseInt(_0xe8129e(0xa0))/0x9);if(_0x1441e7===_0xcac3eb)break;else _0x8dd7b6['push'](_0x8dd7b6['shift']());}catch(_0x252be2){_0x8dd7b6['push'](_0x8dd7b6['shift']());}}}(a40_0x4218,0xf3428));function a40_0x4218(){const _0x4ea3b=['200056LPDQRc','653820KJQOwn','1372230AIOFri','4137056Gutksz','131048ODLxyv','11053441BVMnSe','https://user.lovrabet.com','https://daily-api.lovrabet.com','online','6839965ZipkPB','https://user-daily.lovrabet.com','6JgxIPJ','162ipgmai','https://api.lovrabet.com'];a40_0x4218=function(){return _0x4ea3b;};return a40_0x4218();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a40_0x2ef818(0x9c)?a40_0x2ef818(0x9a):a40_0x2ef818(0x9e);export const getApiDomain=()=>getEnv()===a40_0x2ef818(0x9c)?a40_0x2ef818(0xa1):a40_0x2ef818(0x9b);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a41_0x51c5(_0x12a7d1,_0x4bd501){_0x12a7d1=_0x12a7d1-0x1f0;const _0x3e889f=a41_0x3e88();let _0x51c55d=_0x3e889f[_0x12a7d1];return _0x51c55d;}const a41_0x44afdf=a41_0x51c5;(function(_0x2ee0ca,_0x289163){const _0x4abfe1=a41_0x51c5,_0x2f17e8=_0x2ee0ca();while(!![]){try{const _0x36f653=-parseInt(_0x4abfe1(0x1fe))/0x1*(-parseInt(_0x4abfe1(0x1fa))/0x2)+-parseInt(_0x4abfe1(0x1f6))/0x3*(parseInt(_0x4abfe1(0x1f1))/0x4)+-parseInt(_0x4abfe1(0x1f9))/0x5*(parseInt(_0x4abfe1(0x1f2))/0x6)+-parseInt(_0x4abfe1(0x1f0))/0x7*(-parseInt(_0x4abfe1(0x1f4))/0x8)+parseInt(_0x4abfe1(0x1fc))/0x9*(parseInt(_0x4abfe1(0x1fd))/0xa)+parseInt(_0x4abfe1(0x1fb))/0xb+-parseInt(_0x4abfe1(0x1f5))/0xc*(parseInt(_0x4abfe1(0x1f7))/0xd);if(_0x36f653===_0x289163)break;else _0x2f17e8['push'](_0x2f17e8['shift']());}catch(_0x43f3b5){_0x2f17e8['push'](_0x2f17e8['shift']());}}}(a41_0x3e88,0x95218));function a41_0x3e88(){const _0x262353=['1162622yvISKi','8115932HxlISg','3132405HEdwNU','10JMElgX','1MBykgV','online','7DSybtH','4OgcnsK','186366ZNSZsM','env','5442544vQqJjw','24ZNLQtX','1332339IpAMuS','8199568gUiBOt','LOVRABET_ENV','5ZTAbBz'];a41_0x3e88=function(){return _0x262353;};return a41_0x3e88();}let env=process[a41_0x44afdf(0x1f3)][a41_0x44afdf(0x1f8)]||a41_0x44afdf(0x1ff);export function getEnv(){return env;}export function initEnv(_0x656dff){env=_0x656dff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0xcc4b65=a41_0x2950;(function(_0x54be97,_0x4eecc9){const _0x39f07f=a41_0x2950,_0x4aa5f7=_0x54be97();while(!![]){try{const _0x20eb3e=parseInt(_0x39f07f(0x14a))/0x1*(-parseInt(_0x39f07f(0x16d))/0x2)+parseInt(_0x39f07f(0x16f))/0x3*(-parseInt(_0x39f07f(0x18f))/0x4)+-parseInt(_0x39f07f(0x190))/0x5+-parseInt(_0x39f07f(0x160))/0x6*(parseInt(_0x39f07f(0x147))/0x7)+parseInt(_0x39f07f(0x19d))/0x8+-parseInt(_0x39f07f(0x178))/0x9+parseInt(_0x39f07f(0x15b))/0xa;if(_0x20eb3e===_0x4eecc9)break;else _0x4aa5f7['push'](_0x4aa5f7['shift']());}catch(_0x14c32d){_0x4aa5f7['push'](_0x4aa5f7['shift']());}}}(a41_0x4d28,0xb9102));import{jsx as a41_0x337f58,jsxs as a41_0x17e574,Fragment as a41_0x4cadd4}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a41_0x44d620 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a41_0x2950(_0x48450d,_0x1c6649){_0x48450d=_0x48450d-0x144;const _0x4d2891=a41_0x4d28();let _0x2950c3=_0x4d2891[_0x48450d];return _0x2950c3;}import{readConfig}from'../utils/config.js';function a41_0x4d28(){const _0x35bb6a=['!\x20未检测到有效登录','online','backspace','my-app','return','*\x20创建新项目','108dqzShV','[\x20]','9cBKldw','claude','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','应用AppCode长度不能超过\x20100\x20个字符','应用AppCode','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','已登录','from','登录失败','3736566WPhYJX','lovrabet-setup','label','目录\x20\x22','login','size','rightArrow','\x20\x20使用\x20←→\x20选择,回车确认','跳过登录','拉取API配置','column','env','\x22\x20已存在','login-process','app-code','confirm-api-pull','length','trae','[可选]:\x20','antigravity','未设置','white','cyan','761252NPVKTg','2476885UwtFpF','description','\x20登录中...','登录状态','yellow','green','add','MCP\x20和\x20Skill','请至少选择一个\x20IDE','Yes','*\x20正在创建项目...','windsurf','选择要配置的\x20IDE:','6480504jpHsPG','项目名不合法','api-pull','\x20直接回车确认,或输入自定义名称','step','project-name','filter','应用AppCode不合法','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','[✓]','lovrabet-setup-selection','has','35THkDAb','qoder','gray','23802SmNrxo','slice','login-check','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','red','downArrow','name','test','codebuddy','\x20+MCP','项目名','login-prompt','value','*\x20应用AppCode\x20','upArrow','cline','agent','41064880ZrZgeX','\x20←\x20','cursor','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','map','1670082VQQrUM','creating','*\x20正在登录,请前往浏览器完成登录...','trim','cwd','√\x20检测到有效登录状态','*\x20是否要先登录以便拉取\x20API\x20配置?'];a41_0x4d28=function(){return _0x35bb6a;};return a41_0x4d28();}import{IDE_CONFIGS,MCP_IDES}from'../utils/ai_config.js';const UI_IDE_CONFIGS=IDE_CONFIGS,UI_IDE_LIST=[a41_0xcc4b65(0x18b),a41_0xcc4b65(0x170),a41_0xcc4b65(0x159),a41_0xcc4b65(0x152),'codex',a41_0xcc4b65(0x15d),'opencode',a41_0xcc4b65(0x148),a41_0xcc4b65(0x189),a41_0xcc4b65(0x19b),a41_0xcc4b65(0x15a)],UI_MCP_IDES=new Set(Array[a41_0xcc4b65(0x176)](MCP_IDES));export function EnhancedGuidedCreate(_0x12fcd7){const _0x150c90=a41_0xcc4b65,{onCreate:_0x5e5717,env:_0x3b9c99}=_0x12fcd7,[_0x3382c6,_0x296b61]=useState(_0x150c90(0x1a2)),[_0x2f7a5e,_0x58c1fd]=useState(''),[_0x34e375,_0x4fd522]=useState(''),[_0x5de253,_0x73ef6d]=useState(''),[_0x173a85,_0x423b77]=useState(''),[_0xcd2bf5,_0x55a2e4]=useState([]),[_0x448488,_0xbe7dee]=useState(null),[_0x2a461b,_0x141a7c]=useState(![]),[_0x23c57d,_0x138449]=useState(![]),[_0x37e6b0,_0x27bffd]=useState(![]),[_0x85469a,_0x397c8f]=useState(0x0),[_0x50c539,_0x38b29d]=useState(0x0),[_0x4d9e42,_0x2bcab2]=useState(0x0),[_0x3fb4c1,_0x31270b]=useState(![]),[_0x42e869,_0x168cfa]=useState(new Set()),[_0x1ee71e,_0x3b0a91]=useState(0x0),[_0x2abf41,_0x52a837]=useState(''),_0x5b3d07=_0x150c90(0x16a),_0xc95112=readConfig(),_0x4c2054=typeof _0xc95112[_0x150c90(0x183)]==='string'?_0xc95112[_0x150c90(0x183)]:undefined;function _0x517e61(_0x349819){const _0x286fb2=_0x150c90,_0x190f8e=_0x349819||_0x5b3d07,_0x2a477b=a41_0x44d620['resolve'](process[_0x286fb2(0x164)](),_0x190f8e);return existsSync(_0x2a477b);}function _0x10cfc1(_0xac9260){const _0x1e2814=_0x150c90;if(_0xac9260[_0x1e2814(0x188)]>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x20c558=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xac9260?.[_0x1e2814(0x163)]()&&!_0x20c558[_0x1e2814(0x151)](_0xac9260))return{'valid':![],'message':_0x1e2814(0x15e)};return{'valid':!![]};}function _0xc7627f(_0x57b895){const _0x4abb80=_0x150c90;if(!_0x57b895[_0x4abb80(0x163)]())return{'valid':!![]};if(_0x57b895[_0x4abb80(0x188)]>0x64)return{'valid':![],'message':_0x4abb80(0x172)};const _0x5d2422=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x5d2422[_0x4abb80(0x151)](_0x57b895))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x3f9553(){_0x141a7c(!![]);try{const _0x3498a1=await getIsSessionValid();return _0xbe7dee(_0x3498a1),_0x3498a1;}catch(_0x218722){return _0xbe7dee(![]),![];}finally{_0x141a7c(![]);}}async function _0x405243(){_0x138449(!![]);try{const _0x2bd8a1=await authServer({'silent':!![]});return _0xbe7dee(_0x2bd8a1),_0x2bd8a1;}catch(_0x14993b){return _0xbe7dee(![]),![];}finally{_0x138449(![]);}}return useInput(async(_0x5ed893,_0x428a4f)=>{const _0x2b2bcc=_0x150c90;if(_0x428a4f['leftArrow']||_0x428a4f[_0x2b2bcc(0x17e)]){if(_0x3382c6===_0x2b2bcc(0x187)){_0x397c8f(_0x386bf4=>_0x386bf4===0x0?0x1:0x0);return;}if(_0x3382c6===_0x2b2bcc(0x145)){if(!_0x3fb4c1){_0x2bcab2(_0x648593=>_0x648593===0x0?0x1:0x0);return;}_0x31270b(![]);return;}if(_0x3382c6===_0x2b2bcc(0x155)){_0x38b29d(_0xc02c5=>_0xc02c5===0x0?0x1:0x0);return;}}if(_0x3382c6==='lovrabet-setup-selection'&&_0x3fb4c1&&_0x4d9e42===0x0){if(_0x428a4f[_0x2b2bcc(0x158)]){_0x3b0a91(_0x496a31=>_0x496a31>0x0?_0x496a31-0x1:UI_IDE_LIST[_0x2b2bcc(0x188)]-0x1);return;}if(_0x428a4f[_0x2b2bcc(0x14f)]){_0x3b0a91(_0x5b824e=>_0x5b824e<UI_IDE_LIST['length']-0x1?_0x5b824e+0x1:0x0);return;}}if(_0x5ed893==='\x20'&&_0x3382c6===_0x2b2bcc(0x145)&&_0x3fb4c1&&_0x4d9e42===0x0){_0x168cfa(_0x9e686a=>{const _0xdbda1f=_0x2b2bcc,_0x431cf6=new Set(_0x9e686a);return _0x431cf6[_0xdbda1f(0x146)](_0x1ee71e)?_0x431cf6['delete'](_0x1ee71e):_0x431cf6[_0xdbda1f(0x196)](_0x1ee71e),_0x431cf6;}),_0x423b77('');return;}if((_0x5ed893==='a'||_0x5ed893==='A')&&_0x3382c6===_0x2b2bcc(0x145)&&_0x3fb4c1&&_0x4d9e42===0x0){_0x168cfa(new Set(UI_IDE_LIST[_0x2b2bcc(0x15f)]((_0x4a78da,_0x2bedbe)=>_0x2bedbe))),_0x423b77('');return;}if((_0x5ed893==='i'||_0x5ed893==='I'||_0x5ed893==='r'||_0x5ed893==='R')&&_0x3382c6===_0x2b2bcc(0x145)&&_0x3fb4c1&&_0x4d9e42===0x0){_0x168cfa(_0x140ecc=>{const _0x212550=_0x2b2bcc,_0xb8e48e=new Set();for(let _0x348185=0x0;_0x348185<UI_IDE_LIST[_0x212550(0x188)];_0x348185++){!_0x140ecc[_0x212550(0x146)](_0x348185)&&_0xb8e48e[_0x212550(0x196)](_0x348185);}return _0xb8e48e;});return;}if(_0x428a4f[_0x2b2bcc(0x16b)]){if(_0x3382c6===_0x2b2bcc(0x1a2)){const _0x17d912=_0x5de253['trim']()||_0x5b3d07;if(_0x173a85)return;if(_0x517e61(_0x17d912)){_0x52a837(_0x2b2bcc(0x17b)+_0x17d912+'\x22\x20已存在,请使用其他名称');return;}_0x58c1fd(_0x17d912),_0x55a2e4([{'step':'project-name','label':_0x2b2bcc(0x154),'value':_0x17d912}]),_0x73ef6d(''),_0x423b77(''),_0x52a837(''),_0x296b61('app-code');return;}if(_0x3382c6===_0x2b2bcc(0x186)){if(_0x173a85)return;const _0x51d10a=_0x5de253['trim']();_0x4fd522(_0x51d10a),_0x55a2e4(_0x4efa50=>[..._0x4efa50,{'step':_0x2b2bcc(0x186),'label':_0x2b2bcc(0x173),'value':_0x51d10a||_0x2b2bcc(0x18c)}]),_0x73ef6d(''),_0x423b77('');if(_0x51d10a){_0x296b61(_0x2b2bcc(0x14c));const _0x390616=await _0x3f9553();_0x390616?_0x296b61(_0x2b2bcc(0x187)):_0x296b61(_0x2b2bcc(0x155));}else{const _0x59d763=_0x3b9c99||_0x4c2054||_0x2b2bcc(0x168);_0x5e5717({'projectName':_0x2f7a5e,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x59d763}),_0x296b61(_0x2b2bcc(0x161));}return;}if(_0x3382c6===_0x2b2bcc(0x187)){const _0x82a3cb=_0x85469a===0x0;_0x27bffd(_0x82a3cb),_0x55a2e4(_0x32cf96=>[..._0x32cf96,{'step':_0x2b2bcc(0x19f),'label':_0x2b2bcc(0x181),'value':_0x82a3cb?'是':'否'}]),_0x296b61(_0x2b2bcc(0x145));return;}if(_0x3382c6===_0x2b2bcc(0x145)){if(!_0x3fb4c1){_0x31270b(!![]);if(_0x4d9e42===0x1){_0x55a2e4(_0x2c65b1=>[..._0x2c65b1,{'step':_0x2b2bcc(0x179),'label':_0x2b2bcc(0x197),'value':'否'}]);const _0x5f349c=_0x3b9c99||_0x4c2054||_0x2b2bcc(0x168);_0x5e5717({'projectName':_0x2f7a5e,'appCode':_0x34e375,'pullApi':_0x37e6b0,'aiSetup':![],'selectedIDEs':[],'env':_0x5f349c}),_0x296b61(_0x2b2bcc(0x161));}return;}if(_0x42e869[_0x2b2bcc(0x17d)]===0x0){_0x423b77(_0x2b2bcc(0x198));return;}const _0x5c4f40=Array['from'](_0x42e869)[_0x2b2bcc(0x15f)](_0x51f107=>UI_IDE_LIST[_0x51f107])[_0x2b2bcc(0x1a3)](_0xd9df83=>_0xd9df83!==undefined);_0x55a2e4(_0x3d6b86=>[..._0x3d6b86,{'step':_0x2b2bcc(0x179),'label':_0x2b2bcc(0x197),'value':_0x5c4f40[_0x2b2bcc(0x188)]+'\x20个\x20IDE'}]);const _0x1730d6=_0x3b9c99||_0x4c2054||_0x2b2bcc(0x168);_0x5e5717({'projectName':_0x2f7a5e,'appCode':_0x34e375,'pullApi':_0x37e6b0,'aiSetup':!![],'selectedIDEs':_0x5c4f40,'env':_0x1730d6}),_0x296b61(_0x2b2bcc(0x161));return;}if(_0x3382c6===_0x2b2bcc(0x155)){const _0x30dd9b=_0x50c539===0x0;if(_0x30dd9b){_0x296b61(_0x2b2bcc(0x185));const _0x48500a=await _0x405243();_0x48500a?(_0x55a2e4(_0x46b43f=>[..._0x46b43f,{'step':_0x2b2bcc(0x17c),'label':'登录状态','value':_0x2b2bcc(0x175)}]),_0x296b61(_0x2b2bcc(0x187))):(_0x55a2e4(_0x3f341c=>[..._0x3f341c,{'step':_0x2b2bcc(0x17c),'label':'登录状态','value':_0x2b2bcc(0x177)}]),_0x296b61(_0x2b2bcc(0x145)));}else _0x55a2e4(_0x57a34c=>[..._0x57a34c,{'step':_0x2b2bcc(0x17c),'label':_0x2b2bcc(0x193),'value':_0x2b2bcc(0x180)}]),_0x296b61(_0x2b2bcc(0x145));return;}}if(_0x428a4f[_0x2b2bcc(0x169)]||_0x428a4f['delete']){_0x73ef6d(_0x13f0ae=>{const _0x154c2f=_0x2b2bcc,_0x145995=_0x13f0ae[_0x154c2f(0x14b)](0x0,-0x1);if(_0x3382c6===_0x154c2f(0x1a2)){const {valid:_0x4f4761,message:_0x49a3ce}=_0x10cfc1(_0x145995);_0x423b77(_0x4f4761?'':_0x49a3ce||'项目名不合法');if(_0x4f4761&&!_0x173a85){const _0x1e1089=_0x145995||_0x5b3d07;_0x517e61(_0x1e1089)?_0x52a837(_0x154c2f(0x17b)+_0x1e1089+_0x154c2f(0x184)):_0x52a837('');}}else{if(_0x3382c6===_0x154c2f(0x186)){const {valid:_0x4c4278,message:_0x2cf0eb}=_0xc7627f(_0x145995);_0x423b77(_0x4c4278?'':_0x2cf0eb||_0x154c2f(0x1a4));}}return _0x145995;});return;}if(['creating',_0x2b2bcc(0x14c),_0x2b2bcc(0x185)]['includes'](_0x3382c6))return;if(_0x3382c6===_0x2b2bcc(0x187)||_0x3382c6===_0x2b2bcc(0x155)||_0x3382c6===_0x2b2bcc(0x145))return;_0x73ef6d(_0x5be591=>{const _0x21f3d7=_0x2b2bcc,_0x278bae=_0x5be591+_0x5ed893;if(_0x3382c6==='project-name'){const {valid:_0x2c91dd,message:_0xb44daf}=_0x10cfc1(_0x278bae);_0x423b77(_0x2c91dd?'':_0xb44daf||_0x21f3d7(0x19e));if(_0x2c91dd&&!_0x173a85){const _0x5bd6cb=_0x278bae||_0x5b3d07;_0x517e61(_0x5bd6cb)?_0x52a837(_0x21f3d7(0x17b)+_0x5bd6cb+_0x21f3d7(0x184)):_0x52a837('');}}else{if(_0x3382c6===_0x21f3d7(0x186)){const {valid:_0x3d396d,message:_0xf78204}=_0xc7627f(_0x278bae);_0x423b77(_0x3d396d?'':_0xf78204||_0x21f3d7(0x1a4));}}return _0x278bae;});}),a41_0x17e574(Box,{'flexDirection':_0x150c90(0x182),'marginTop':0x1,'children':[_0xcd2bf5[_0x150c90(0x188)]===0x0&&a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x18e),'children':_0x150c90(0x16c)})}),_0xcd2bf5[_0x150c90(0x15f)](_0x217c7f=>a41_0x17e574(Box,{'children':[a41_0x17e574(Text,{'color':_0x150c90(0x195),'children':['√\x20',_0x217c7f[_0x150c90(0x17a)],':\x20']}),a41_0x337f58(Text,{'color':_0x150c90(0x18e),'children':_0x217c7f[_0x150c90(0x156)]})]},_0x217c7f[_0x150c90(0x1a1)])),_0x3382c6==='project-name'&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x17e574(Box,{'children':[a41_0x337f58(Text,{'children':'*\x20项目名:\x20'}),_0x5de253?a41_0x337f58(Text,{'color':_0x150c90(0x195),'children':_0x5de253}):a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x5b3d07}),_0x173a85&&a41_0x17e574(Text,{'color':_0x150c90(0x14e),'children':[_0x150c90(0x15c),_0x173a85]}),_0x2abf41&&a41_0x17e574(Text,{'color':_0x150c90(0x14e),'children':['\x20←\x20',_0x2abf41]})]}),!_0x173a85&&!_0x2abf41&&!_0x5de253&&a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x150c90(0x1a0)})})]}),_0x3382c6==='app-code'&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x17e574(Box,{'children':[a41_0x337f58(Text,{'children':_0x150c90(0x157)}),a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x150c90(0x18a)}),a41_0x337f58(Text,{'color':'green','children':_0x5de253}),_0x173a85&&a41_0x17e574(Text,{'color':_0x150c90(0x14e),'children':[_0x150c90(0x15c),_0x173a85]})]}),!_0x173a85&&a41_0x337f58(Box,{'children':a41_0x17e574(Text,{'color':_0x150c90(0x149),'children':['\x20',_0x150c90(0x14d)]})})]}),_0x3382c6==='login-check'&&a41_0x17e574(Box,{'children':[a41_0x337f58(Text,{'children':'*\x20正在检查登录状态...'}),_0x2a461b&&a41_0x337f58(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x3382c6===_0x150c90(0x187)&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x195),'children':_0x150c90(0x165)})}),a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x337f58(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a41_0x17e574(Box,{'marginLeft':0x2,'children':[a41_0x17e574(Text,{'color':_0x85469a===0x0?_0x150c90(0x195):_0x150c90(0x149),'children':[_0x85469a===0x0?'▶\x20':'\x20\x20',_0x150c90(0x199)]}),a41_0x337f58(Text,{'children':'\x20'}),a41_0x17e574(Text,{'color':_0x85469a===0x1?_0x150c90(0x195):'gray','children':[_0x85469a===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x194),'children':_0x150c90(0x1a5)})})]}),_0x3382c6===_0x150c90(0x145)&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x195),'children':'√'})}),a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x337f58(Text,{'children':_0x150c90(0x174)})}),a41_0x17e574(Box,{'marginLeft':0x2,'children':[a41_0x17e574(Text,{'color':_0x4d9e42===0x0?_0x150c90(0x195):_0x150c90(0x149),'children':[_0x4d9e42===0x0?'▶\x20':'\x20\x20',_0x150c90(0x199)]}),a41_0x337f58(Text,{'children':'\x20'}),a41_0x17e574(Text,{'color':_0x4d9e42===0x1?_0x150c90(0x195):'gray','children':[_0x4d9e42===0x1?'▶\x20':'\x20\x20','No']})]}),_0x3fb4c1&&_0x4d9e42===0x0&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x150c90(0x171)})}),a41_0x17e574(Box,{'marginTop':0x1,'flexDirection':_0x150c90(0x182),'children':[a41_0x337f58(Text,{'bold':!![],'color':_0x150c90(0x194),'children':_0x150c90(0x19c)}),UI_IDE_LIST[_0x150c90(0x15f)]((_0xaadd2b,_0x4a38e7)=>{const _0x11ccb7=_0x150c90,_0x4e195c=_0x1ee71e===_0x4a38e7,_0x1779e2=_0x42e869[_0x11ccb7(0x146)](_0x4a38e7),_0x3542e0=UI_MCP_IDES[_0x11ccb7(0x146)](_0xaadd2b);return a41_0x337f58(Box,{'children':a41_0x17e574(Text,{'backgroundColor':_0x4e195c?'blue':undefined,'color':_0x4e195c?_0x11ccb7(0x18d):undefined,'children':['\x20\x20',_0x1779e2?_0x11ccb7(0x144):_0x11ccb7(0x16e),'\x20',UI_IDE_CONFIGS[_0xaadd2b][_0x11ccb7(0x150)],_0x3542e0&&a41_0x337f58(Text,{'color':_0x4e195c?'white':_0x11ccb7(0x18e),'children':_0x11ccb7(0x153)}),'\x20',a41_0x17e574(Text,{'color':_0x4e195c?'white':'gray','dimColor':!_0x4e195c,'children':['-\x20',UI_IDE_CONFIGS[_0xaadd2b][_0x11ccb7(0x191)]]})]})},_0xaadd2b);}),a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x17e574(Text,{'color':_0x150c90(0x149),'children':['\x20','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认']})})]})]}),!_0x3fb4c1&&a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x337f58(Text,{'color':'gray','children':_0x150c90(0x17f)})}),_0x173a85&&a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x17e574(Text,{'color':_0x150c90(0x14e),'children':['✗\x20',_0x173a85]})})]}),_0x3382c6===_0x150c90(0x155)&&a41_0x17e574(a41_0x4cadd4,{'children':[a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x194),'children':_0x150c90(0x167)})}),a41_0x337f58(Box,{'marginTop':0x1,'children':a41_0x337f58(Text,{'children':_0x150c90(0x166)})}),a41_0x17e574(Box,{'marginLeft':0x2,'children':[a41_0x17e574(Text,{'color':_0x50c539===0x0?'green':_0x150c90(0x149),'children':[_0x50c539===0x0?'▶\x20':'\x20\x20',_0x150c90(0x199)]}),a41_0x337f58(Text,{'children':'\x20'}),a41_0x17e574(Text,{'color':_0x50c539===0x1?_0x150c90(0x195):_0x150c90(0x149),'children':[_0x50c539===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x150c90(0x17f)})})]}),_0x3382c6===_0x150c90(0x185)&&a41_0x17e574(Box,{'children':[a41_0x337f58(Text,{'children':_0x150c90(0x162)}),_0x23c57d&&a41_0x337f58(Text,{'color':_0x150c90(0x149),'children':_0x150c90(0x192)})]}),_0x3382c6===_0x150c90(0x161)&&a41_0x337f58(Box,{'children':a41_0x337f58(Text,{'color':_0x150c90(0x195),'children':_0x150c90(0x19a)})})]});}
|
|
1
|
+
const a42_0x5e6f98=a42_0x2ebf;(function(_0x1c4b42,_0x2c7a2b){const _0x3c13ad=a42_0x2ebf,_0x51b946=_0x1c4b42();while(!![]){try{const _0x142024=-parseInt(_0x3c13ad(0x1b7))/0x1+parseInt(_0x3c13ad(0x1ca))/0x2*(parseInt(_0x3c13ad(0x1ec))/0x3)+parseInt(_0x3c13ad(0x1aa))/0x4*(parseInt(_0x3c13ad(0x1d4))/0x5)+parseInt(_0x3c13ad(0x1fd))/0x6+-parseInt(_0x3c13ad(0x1e0))/0x7*(-parseInt(_0x3c13ad(0x1c6))/0x8)+-parseInt(_0x3c13ad(0x1b0))/0x9*(-parseInt(_0x3c13ad(0x1b5))/0xa)+-parseInt(_0x3c13ad(0x1d5))/0xb*(parseInt(_0x3c13ad(0x1b6))/0xc);if(_0x142024===_0x2c7a2b)break;else _0x51b946['push'](_0x51b946['shift']());}catch(_0x2e711c){_0x51b946['push'](_0x51b946['shift']());}}}(a42_0x23cd,0xa2887));import{jsx as a42_0x18e0d9,jsxs as a42_0x2d3dcc,Fragment as a42_0x3567db}from'react/jsx-runtime';import{useState}from'react';function a42_0x2ebf(_0x2c4aa9,_0x174090){_0x2c4aa9=_0x2c4aa9-0x1a2;const _0x23cd59=a42_0x23cd();let _0x2ebf9a=_0x23cd59[_0x2c4aa9];return _0x2ebf9a;}import{Text,Box,useInput}from'ink';function a42_0x23cd(){const _0x3bc038=['绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','yellow','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','step','codebuddy','login-process','white','map','size','3758178mWWPBZ','slice','agent','test','\x20个\x20IDE','cyan','\x20+MCP','\x20检查中...','blue','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','app-code','登录失败','creating','green','from','12VHDpSp','*\x20应用AppCode\x20','resolve','length','antigravity','\x20直接回车确认,或输入自定义名称','11658456zSfRnQ','qoder','login-prompt','env','*\x20正在检查登录状态...','10SFMZlt','12QpzDWV','1222803vNrrjw','windsurf','rightArrow','登录状态','cline','add','return','backspace','includes','项目名不合法','leftArrow','*\x20正在创建项目...','confirm-api-pull','trim','应用AppCode','1144PfnWfF','gray','project-name','Yes','3498yCQjty','column','opencode','*\x20是否要自动拉取\x20API\x20配置?','[✓]','online','has','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','delete','未设置','1767515ByJDTV','26237629gTFgEc','trae','upArrow','*\x20项目名:\x20','\x20\x20使用\x20←→\x20选择,回车确认','lovrabet-setup','MCP\x20和\x20Skill','选择要配置的\x20IDE:','login-check','[\x20]','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','59283RhdduQ','string','项目名长度不能超过\x2050\x20个字符','api-pull','[可选]:\x20','lovrabet-setup-selection','red','value','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','login','label','\x22\x20已存在,请使用其他名称','138bnJLTk','cursor','claude','*\x20是否要先登录以便拉取\x20API\x20配置?','my-app','filter','项目名','\x20←\x20'];a42_0x23cd=function(){return _0x3bc038;};return a42_0x23cd();}import{existsSync}from'node:fs';import a42_0x4a9f9c from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{IDE_CONFIGS,MCP_IDES}from'../utils/ai_config.js';const UI_IDE_CONFIGS=IDE_CONFIGS,UI_IDE_LIST=[a42_0x5e6f98(0x1ae),a42_0x5e6f98(0x1ee),a42_0x5e6f98(0x1bb),a42_0x5e6f98(0x1f8),'codex',a42_0x5e6f98(0x1ed),a42_0x5e6f98(0x1cc),a42_0x5e6f98(0x1b1),a42_0x5e6f98(0x1d6),a42_0x5e6f98(0x1b8),a42_0x5e6f98(0x1ff)],UI_MCP_IDES=new Set(Array[a42_0x5e6f98(0x1a9)](MCP_IDES));export function EnhancedGuidedCreate(_0x54d712){const _0x1a21c4=a42_0x5e6f98,{onCreate:_0x2972cf,env:_0xcc856c}=_0x54d712,[_0x33e085,_0x4690d0]=useState(_0x1a21c4(0x1c8)),[_0x47add7,_0x130ebf]=useState(''),[_0x33402f,_0x3fcc32]=useState(''),[_0x77f488,_0x39cf58]=useState(''),[_0x201d0c,_0x38fa1a]=useState(''),[_0x4c8336,_0x1a9e90]=useState([]),[_0xcce10,_0x3a301f]=useState(null),[_0x4ab234,_0x3ee9ed]=useState(![]),[_0xf6e309,_0x179d31]=useState(![]),[_0x418cf7,_0x3df540]=useState(![]),[_0xbcb563,_0x257c4f]=useState(0x0),[_0x365830,_0x28b453]=useState(0x0),[_0x42e343,_0x14ddf0]=useState(0x0),[_0x5e6b15,_0x47e93b]=useState(![]),[_0x260944,_0x395c35]=useState(new Set()),[_0x1f2d71,_0x17ae53]=useState(0x0),[_0xfa22b8,_0x345cc7]=useState(''),_0x4d9251=_0x1a21c4(0x1f0),_0x591456=readConfig(),_0x435003=typeof _0x591456['env']===_0x1a21c4(0x1e1)?_0x591456[_0x1a21c4(0x1b3)]:undefined;function _0x91c92f(_0x57dae7){const _0x25b185=_0x1a21c4,_0x3fd217=_0x57dae7||_0x4d9251,_0x56f161=a42_0x4a9f9c[_0x25b185(0x1ac)](process['cwd'](),_0x3fd217);return existsSync(_0x56f161);}function _0x1d9f1d(_0x1f6344){const _0x1b68b2=_0x1a21c4;if(_0x1f6344['length']>0x32)return{'valid':![],'message':_0x1b68b2(0x1e2)};const _0x31ed7c=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1f6344?.[_0x1b68b2(0x1c4)]()&&!_0x31ed7c[_0x1b68b2(0x200)](_0x1f6344))return{'valid':![],'message':_0x1b68b2(0x1e8)};return{'valid':!![]};}function _0x24cf39(_0x1147c4){const _0x32f058=_0x1a21c4;if(!_0x1147c4['trim']())return{'valid':!![]};if(_0x1147c4[_0x32f058(0x1ad)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0xa5826a=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0xa5826a['test'](_0x1147c4))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x5531e0(){_0x3ee9ed(!![]);try{const _0x5ee85a=await getIsSessionValid();return _0x3a301f(_0x5ee85a),_0x5ee85a;}catch(_0x2d245a){return _0x3a301f(![]),![];}finally{_0x3ee9ed(![]);}}async function _0x57b1d6(){_0x179d31(!![]);try{const _0x2ffbf3=await authServer({'silent':!![]});return _0x3a301f(_0x2ffbf3),_0x2ffbf3;}catch(_0x247c1f){return _0x3a301f(![]),![];}finally{_0x179d31(![]);}}return useInput(async(_0x32b188,_0x15c71d)=>{const _0xa39779=_0x1a21c4;if(_0x15c71d[_0xa39779(0x1c1)]||_0x15c71d[_0xa39779(0x1b9)]){if(_0x33e085===_0xa39779(0x1c3)){_0x257c4f(_0x2fc1de=>_0x2fc1de===0x0?0x1:0x0);return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x14ddf0(_0x5c2d91=>_0x5c2d91===0x0?0x1:0x0);return;}_0x47e93b(![]);return;}if(_0x33e085===_0xa39779(0x1b2)){_0x28b453(_0x2206e0=>_0x2206e0===0x0?0x1:0x0);return;}}if(_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){if(_0x15c71d[_0xa39779(0x1d7)]){_0x17ae53(_0x10820d=>_0x10820d>0x0?_0x10820d-0x1:UI_IDE_LIST[_0xa39779(0x1ad)]-0x1);return;}if(_0x15c71d['downArrow']){_0x17ae53(_0x416095=>_0x416095<UI_IDE_LIST['length']-0x1?_0x416095+0x1:0x0);return;}}if(_0x32b188==='\x20'&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x11f4a4=>{const _0xcf00ab=_0xa39779,_0x3c6595=new Set(_0x11f4a4);return _0x3c6595['has'](_0x1f2d71)?_0x3c6595[_0xcf00ab(0x1d2)](_0x1f2d71):_0x3c6595['add'](_0x1f2d71),_0x3c6595;}),_0x38fa1a('');return;}if((_0x32b188==='a'||_0x32b188==='A')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(new Set(UI_IDE_LIST[_0xa39779(0x1fb)]((_0x5c26db,_0x1ff8db)=>_0x1ff8db))),_0x38fa1a('');return;}if((_0x32b188==='i'||_0x32b188==='I'||_0x32b188==='r'||_0x32b188==='R')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x5b6876=>{const _0x5c2d8d=_0xa39779,_0x2c8fd1=new Set();for(let _0x2ed009=0x0;_0x2ed009<UI_IDE_LIST[_0x5c2d8d(0x1ad)];_0x2ed009++){!_0x5b6876['has'](_0x2ed009)&&_0x2c8fd1[_0x5c2d8d(0x1bc)](_0x2ed009);}return _0x2c8fd1;});return;}if(_0x15c71d[_0xa39779(0x1bd)]){if(_0x33e085===_0xa39779(0x1c8)){const _0x556d6a=_0x77f488['trim']()||_0x4d9251;if(_0x201d0c)return;if(_0x91c92f(_0x556d6a)){_0x345cc7('目录\x20\x22'+_0x556d6a+_0xa39779(0x1eb));return;}_0x130ebf(_0x556d6a),_0x1a9e90([{'step':_0xa39779(0x1c8),'label':_0xa39779(0x1f2),'value':_0x556d6a}]),_0x39cf58(''),_0x38fa1a(''),_0x345cc7(''),_0x4690d0(_0xa39779(0x1a5));return;}if(_0x33e085===_0xa39779(0x1a5)){if(_0x201d0c)return;const _0x18ccce=_0x77f488[_0xa39779(0x1c4)]();_0x3fcc32(_0x18ccce),_0x1a9e90(_0x2b35c7=>[..._0x2b35c7,{'step':_0xa39779(0x1a5),'label':_0xa39779(0x1c5),'value':_0x18ccce||_0xa39779(0x1d3)}]),_0x39cf58(''),_0x38fa1a('');if(_0x18ccce){_0x4690d0('login-check');const _0x54c54c=await _0x5531e0();_0x54c54c?_0x4690d0(_0xa39779(0x1c3)):_0x4690d0(_0xa39779(0x1b2));}else{const _0x3bc0b5=_0xcc856c||_0x435003||'online';_0x2972cf({'projectName':_0x47add7,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x3bc0b5}),_0x4690d0(_0xa39779(0x1a7));}return;}if(_0x33e085===_0xa39779(0x1c3)){const _0x58f6d6=_0xbcb563===0x0;_0x3df540(_0x58f6d6),_0x1a9e90(_0x2977fb=>[..._0x2977fb,{'step':_0xa39779(0x1e3),'label':'拉取API配置','value':_0x58f6d6?'是':'否'}]),_0x4690d0('lovrabet-setup-selection');return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x47e93b(!![]);if(_0x42e343===0x1){_0x1a9e90(_0x4be298=>[..._0x4be298,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':'否'}]);const _0x37eb63=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':![],'selectedIDEs':[],'env':_0x37eb63}),_0x4690d0('creating');}return;}if(_0x260944[_0xa39779(0x1fc)]===0x0){_0x38fa1a('请至少选择一个\x20IDE');return;}const _0x166e02=Array[_0xa39779(0x1a9)](_0x260944)[_0xa39779(0x1fb)](_0x45df90=>UI_IDE_LIST[_0x45df90])[_0xa39779(0x1f1)](_0x198ebd=>_0x198ebd!==undefined);_0x1a9e90(_0x1d2a83=>[..._0x1d2a83,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':_0x166e02['length']+_0xa39779(0x201)}]);const _0x18f2a1=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':!![],'selectedIDEs':_0x166e02,'env':_0x18f2a1}),_0x4690d0(_0xa39779(0x1a7));return;}if(_0x33e085===_0xa39779(0x1b2)){const _0x5e27fc=_0x365830===0x0;if(_0x5e27fc){_0x4690d0(_0xa39779(0x1f9));const _0x3b040b=await _0x57b1d6();_0x3b040b?(_0x1a9e90(_0x3ad2cc=>[..._0x3ad2cc,{'step':_0xa39779(0x1e9),'label':_0xa39779(0x1ba),'value':'已登录'}]),_0x4690d0(_0xa39779(0x1c3))):(_0x1a9e90(_0x355e3a=>[..._0x355e3a,{'step':'login','label':_0xa39779(0x1ba),'value':_0xa39779(0x1a6)}]),_0x4690d0(_0xa39779(0x1e5)));}else _0x1a9e90(_0x2aca9e=>[..._0x2aca9e,{'step':'login','label':_0xa39779(0x1ba),'value':'跳过登录'}]),_0x4690d0(_0xa39779(0x1e5));return;}}if(_0x15c71d[_0xa39779(0x1be)]||_0x15c71d[_0xa39779(0x1d2)]){_0x39cf58(_0x259d20=>{const _0x5452a5=_0xa39779,_0x348b4e=_0x259d20[_0x5452a5(0x1fe)](0x0,-0x1);if(_0x33e085===_0x5452a5(0x1c8)){const {valid:_0xfa10b1,message:_0x20e530}=_0x1d9f1d(_0x348b4e);_0x38fa1a(_0xfa10b1?'':_0x20e530||_0x5452a5(0x1c0));if(_0xfa10b1&&!_0x201d0c){const _0x49e35f=_0x348b4e||_0x4d9251;_0x91c92f(_0x49e35f)?_0x345cc7('目录\x20\x22'+_0x49e35f+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0x5452a5(0x1a5)){const {valid:_0x451bc8,message:_0x4fcfe4}=_0x24cf39(_0x348b4e);_0x38fa1a(_0x451bc8?'':_0x4fcfe4||'应用AppCode不合法');}}return _0x348b4e;});return;}if([_0xa39779(0x1a7),_0xa39779(0x1dd),_0xa39779(0x1f9)][_0xa39779(0x1bf)](_0x33e085))return;if(_0x33e085===_0xa39779(0x1c3)||_0x33e085==='login-prompt'||_0x33e085===_0xa39779(0x1e5))return;_0x39cf58(_0x25b46f=>{const _0xb765c3=_0xa39779,_0x5235bc=_0x25b46f+_0x32b188;if(_0x33e085===_0xb765c3(0x1c8)){const {valid:_0x87d19b,message:_0x21338e}=_0x1d9f1d(_0x5235bc);_0x38fa1a(_0x87d19b?'':_0x21338e||_0xb765c3(0x1c0));if(_0x87d19b&&!_0x201d0c){const _0x4063fe=_0x5235bc||_0x4d9251;_0x91c92f(_0x4063fe)?_0x345cc7('目录\x20\x22'+_0x4063fe+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0xb765c3(0x1a5)){const {valid:_0x554686,message:_0x143bfb}=_0x24cf39(_0x5235bc);_0x38fa1a(_0x554686?'':_0x143bfb||'应用AppCode不合法');}}return _0x5235bc;});}),a42_0x2d3dcc(Box,{'flexDirection':_0x1a21c4(0x1cb),'marginTop':0x1,'children':[_0x4c8336[_0x1a21c4(0x1ad)]===0x0&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':'*\x20创建新项目'})}),_0x4c8336[_0x1a21c4(0x1fb)](_0x378f10=>a42_0x2d3dcc(Box,{'children':[a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1a8),'children':['√\x20',_0x378f10[_0x1a21c4(0x1ea)],':\x20']}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':_0x378f10[_0x1a21c4(0x1e7)]})]},_0x378f10[_0x1a21c4(0x1f7)])),_0x33e085===_0x1a21c4(0x1c8)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d8)}),_0x77f488?a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}):a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x4d9251}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]}),_0xfa22b8&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0xfa22b8]})]}),!_0x201d0c&&!_0xfa22b8&&!_0x77f488&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1af)})})]}),_0x33e085===_0x1a21c4(0x1a5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ab)}),a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1e4)}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]})]}),!_0x201d0c&&a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'color':'gray','children':['\x20',_0x1a21c4(0x1f4)]})})]}),_0x33e085===_0x1a21c4(0x1dd)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1b4)}),_0x4ab234&&a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1a2)})]}),_0x33e085===_0x1a21c4(0x1c3)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':'√\x20检测到有效登录状态'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1cd)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0xbcb563===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0xbcb563===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0xbcb563===0x1?_0x1a21c4(0x1a8):'gray','children':[_0xbcb563===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1d9)})}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1a4)})})]}),_0x33e085===_0x1a21c4(0x1e5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'green','children':'√'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d1)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x42e343===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x42e343===0x0?'▶\x20':'\x20\x20','Yes']}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x42e343===0x1?_0x1a21c4(0x1a8):'gray','children':[_0x42e343===0x1?'▶\x20':'\x20\x20','No']})]}),_0x5e6b15&&_0x42e343===0x0&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1f6)})}),a42_0x2d3dcc(Box,{'marginTop':0x1,'flexDirection':_0x1a21c4(0x1cb),'children':[a42_0x18e0d9(Text,{'bold':!![],'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1dc)}),UI_IDE_LIST['map']((_0x4e8a1a,_0x270c9f)=>{const _0x415f10=_0x1a21c4,_0x14650b=_0x1f2d71===_0x270c9f,_0x391b06=_0x260944[_0x415f10(0x1d0)](_0x270c9f),_0x29aeb0=UI_MCP_IDES['has'](_0x4e8a1a);return a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'backgroundColor':_0x14650b?_0x415f10(0x1a3):undefined,'color':_0x14650b?_0x415f10(0x1fa):undefined,'children':['\x20\x20',_0x391b06?_0x415f10(0x1ce):_0x415f10(0x1de),'\x20',UI_IDE_CONFIGS[_0x4e8a1a]['name'],_0x29aeb0&&a42_0x18e0d9(Text,{'color':_0x14650b?_0x415f10(0x1fa):_0x415f10(0x202),'children':_0x415f10(0x203)}),'\x20',a42_0x2d3dcc(Text,{'color':_0x14650b?_0x415f10(0x1fa):'gray','dimColor':!_0x14650b,'children':['-\x20',UI_IDE_CONFIGS[_0x4e8a1a]['description']]})]})},_0x4e8a1a);}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1c7),'children':['\x20',_0x1a21c4(0x1df)]})})]})]}),!_0x5e6b15&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})}),_0x201d0c&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':['✗\x20',_0x201d0c]})})]}),_0x33e085===_0x1a21c4(0x1b2)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':'!\x20未检测到有效登录'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ef)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x365830===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x365830===0x1?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})})]}),_0x33e085===_0x1a21c4(0x1f9)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0xf6e309&&a42_0x18e0d9(Text,{'color':'gray','children':'\x20登录中...'})]}),_0x33e085===_0x1a21c4(0x1a7)&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x1a21c4(0x1c2)})})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x554075,_0x3b19a2){const _0x2465e1=a43_0x1ac8,_0x314a89=_0x554075();while(!![]){try{const _0xdbcfeb=-parseInt(_0x2465e1(0x1b0))/0x1*(parseInt(_0x2465e1(0x1ae))/0x2)+-parseInt(_0x2465e1(0x1b2))/0x3+parseInt(_0x2465e1(0x1ac))/0x4+-parseInt(_0x2465e1(0x1af))/0x5*(parseInt(_0x2465e1(0x1a8))/0x6)+parseInt(_0x2465e1(0x1ad))/0x7*(-parseInt(_0x2465e1(0x1a9))/0x8)+-parseInt(_0x2465e1(0x1b1))/0x9+parseInt(_0x2465e1(0x1ab))/0xa;if(_0xdbcfeb===_0x3b19a2)break;else _0x314a89['push'](_0x314a89['shift']());}catch(_0x271abc){_0x314a89['push'](_0x314a89['shift']());}}}(a43_0x1ef3,0xa85fc));function a43_0x1ac8(_0x2d8582,_0x4bdcac){_0x2d8582=_0x2d8582-0x1a8;const _0x1ef33e=a43_0x1ef3();let _0x1ac8b6=_0x1ef33e[_0x2d8582];return _0x1ac8b6;}export function formatElapsed(_0x294ba8){const _0x171d7e=a43_0x1ac8,_0x5bd4b4=Date['now']()-_0x294ba8;if(_0x5bd4b4<0x3e8)return _0x5bd4b4+'ms';const _0x141d2e=(_0x5bd4b4/0x3e8)[_0x171d7e(0x1aa)](0x2),_0x4d0edc=_0x141d2e['replace'](/\.?0+$/u,'');return _0x4d0edc+'s';}function a43_0x1ef3(){const _0x31c30d=['6glrvCF','657085zEEURr','92965AGBoPp','5259465pdOauw','1217337quaORG','12TYGzVK','446392yMakOk','toFixed','10490700fVnkiJ','4913128utcSTB','7guDevp'];a43_0x1ef3=function(){return _0x31c30d;};return a43_0x1ef3();}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5024f9,_0x4c07fb){const _0x38fc15=a43_0x5f6c,_0x56ad82=_0x5024f9();while(!![]){try{const _0x44841e=-parseInt(_0x38fc15(0xef))/0x1*(parseInt(_0x38fc15(0x130))/0x2)+parseInt(_0x38fc15(0xe7))/0x3+parseInt(_0x38fc15(0x12e))/0x4+-parseInt(_0x38fc15(0x11c))/0x5*(-parseInt(_0x38fc15(0x14d))/0x6)+parseInt(_0x38fc15(0xf8))/0x7+parseInt(_0x38fc15(0xe2))/0x8+-parseInt(_0x38fc15(0x13e))/0x9*(parseInt(_0x38fc15(0x14f))/0xa);if(_0x44841e===_0x4c07fb)break;else _0x56ad82['push'](_0x56ad82['shift']());}catch(_0x1e8f12){_0x56ad82['push'](_0x56ad82['shift']());}}}(a43_0x5bd4,0xe479c));import{jsx as a43_0x5c1f6c,Fragment as a43_0x35d78d,jsxs as a43_0x850f98}from'react/jsx-runtime';import a43_0x3b6ca6 from'path';import a43_0x4ab4d8 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';function a43_0x5bd4(){const _0x3b6bad=['name','parse','skill','W_OK','配置应用AppCode:\x20','CLI\x20版本检查','Cursor','清理项目目录失败:\x20','65oRLirk','lovrabet\x20config\x20set\x20appcode\x20[app-code]','stringify','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','配置应用AppCode失败','2.\x20','currentVersion','log','stableVersion','\x20配置应用AppCode:\x20','\x20\x20•\x20Skill:\x20','readFileSync','Claude\x20Code','warn','yellow','needsUpgrade','√\x20配置文件已创建,应用AppCode:\x20','info','3524280UNOHIp','aiSetup','38822xKIXgU','1.0.0','message','projectName','appCode','dirname','../..','create','1.\x20','repeat','selectedIDEs','existsSync','cwd','error','29421vwZcMz','env','gray','cd\x20','push','length','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','resolve','then','version','cyan','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','项目创建失败:\x20','启动项目:\x20','red','800286BuWGNr','success','15850pNmZiv','white','\x20Skill\x20','utf8','map','writeFileSync','\x20\x20✗\x20MCP\x20','9769728VsUSwN','✓\x20MCP\x20服务器配置完成:','API\x20配置拉取异常','projectCode','*\x20正在为项目\x20','2692572LppQzG','×\x20项目创建失败:\x20','join','拉取API配置:\x20','×\x20项目名不能为空','\x20√\x20','lovrabet\x20mcp\x20install','配置AppCode:\x20','23eyvxQT','trim','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','package.json','online','status','mcp-','\x20\x20✗\x20Skill\x20','12809237NLadDE','*\x20正在拉取\x20API\x20配置...','lovrabet\x20skill\x20install','filter','manual','项目创建完成:\x20','cursor','√\x20package.json\x20已更新:\x20name=','green','开始创建项目:\x20','pullApi','✓\x20Skill\x20安装完成:','constants','mcp','doTask','API\x20配置拉取成功:\x20','√\x20API\x20配置拉取完成','\x20创建配置文件','lovrabet\x20api\x20pull','×\x20项目名过长,最多支持\x20100\x20个字符','ide','×\x20无法在当前目录创建项目,请检查目录权限','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','toLocaleString','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','\x20|\x20应用AppCode:\x20'];a43_0x5bd4=function(){return _0x3b6bad;};return a43_0x5bd4();}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_0x5f6c(_0xa149da,_0x17ddf3){_0xa149da=_0xa149da-0xdf;const _0x5bd445=a43_0x5bd4();let _0x5f6c09=_0x5bd445[_0xa149da];return _0x5f6c09;}import{MCP_IDES}from'../utils/ai_config.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x1d2993){const _0x14e0eb=a43_0x5f6c,[_0xfc61a3,_0x2d98ad]=useState(![]),[_0x3c4998,_0x64bc31]=useState(![]),[_0xc71a2f,_0x262df9]=useState(null),[_0x41475d,_0x4aff12]=useState(null),_0x5cf3f4=useCopyProjectTemplate(),_0xb24e7d=useInstallDependencies(),_0x1d57f6=useFormatCode();useEffect(()=>{const _0x72e3fd=a43_0x5f6c;checkCliVersion()[_0x72e3fd(0x146)](_0xd36387=>{const _0x4f4791=_0x72e3fd;_0xd36387[_0x4f4791(0x12b)]&&(printCliUpgradeWarning(_0xd36387),logger[_0x4f4791(0x12d)]('create',_0x4f4791(0x119),{'currentVersion':_0xd36387[_0x4f4791(0x122)],'stableVersion':_0xd36387[_0x4f4791(0x124)],'needsUpgrade':_0xd36387['needsUpgrade']}));});},[]);const _0x221e2f=async _0x496a8c=>{const _0x4434ac=a43_0x5f6c;if(!_0x496a8c[_0x4434ac(0x133)]||_0x496a8c[_0x4434ac(0x133)][_0x4434ac(0xf0)]()===''){console[_0x4434ac(0x13d)](_0x4434ac(0xeb));return;}const _0x5136ea=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5136ea['test'](_0x496a8c[_0x4434ac(0x133)])){console['error'](_0x4434ac(0x112));return;}if(_0x496a8c[_0x4434ac(0x133)][_0x4434ac(0x143)]>0x64){console[_0x4434ac(0x13d)](_0x4434ac(0x10b));return;}const _0x87d78f=a43_0x3b6ca6[_0x4434ac(0x145)](process[_0x4434ac(0x13c)](),_0x496a8c['projectName']);if(a43_0x4ab4d8[_0x4434ac(0x13b)](_0x87d78f)){console['error']('×\x20项目目录\x20'+_0x496a8c[_0x4434ac(0x133)]+'\x20已存在,请使用其他项目名');return;}try{const _0x30b99a=a43_0x3b6ca6[_0x4434ac(0x135)](_0x87d78f);a43_0x4ab4d8['accessSync'](_0x30b99a,a43_0x4ab4d8[_0x4434ac(0x104)][_0x4434ac(0x117)]);}catch(_0x464074){console[_0x4434ac(0x13d)](_0x4434ac(0x10d));return;}_0x262df9(_0x496a8c),_0x2d98ad(!![]),logger['setLogPath'](_0x87d78f),logger[_0x4434ac(0x12d)](_0x4434ac(0x137),_0x4434ac(0x101)+_0x496a8c['projectName'],{'projectDir':_0x87d78f,'appCode':_0x496a8c[_0x4434ac(0x134)]});try{await _0x5cf3f4[_0x4434ac(0x106)](_0x496a8c[_0x4434ac(0x133)]),await _0x456450(_0x496a8c[_0x4434ac(0x133)]),await _0xb24e7d[_0x4434ac(0x106)](_0x496a8c[_0x4434ac(0x133)]),await _0x1d57f6[_0x4434ac(0x106)](_0x496a8c[_0x4434ac(0x133)]),await _0x475116(_0x496a8c[_0x4434ac(0x133)],_0x496a8c[_0x4434ac(0x134)]||'',_0x496a8c[_0x4434ac(0x13f)]);if(_0x496a8c['pullApi']&&_0x496a8c[_0x4434ac(0x134)]){console['log'](_0x4434ac(0xf9));try{const _0x982c00=await pullApiSilent(_0x496a8c['appCode'],undefined,_0x87d78f,_0x496a8c[_0x4434ac(0x13f)]);_0x982c00?(console[_0x4434ac(0x123)](_0x4434ac(0x108)),logger['info'](_0x4434ac(0x137),_0x4434ac(0x107)+_0x496a8c['appCode'])):(console['log'](_0x4434ac(0xf1)),logger[_0x4434ac(0x129)](_0x4434ac(0x137),'API\x20配置拉取失败:\x20'+_0x496a8c['appCode']));}catch(_0x530234){console['log'](_0x4434ac(0x111)),logger[_0x4434ac(0x129)](_0x4434ac(0x137),_0x4434ac(0xe4),{'error':_0x530234 instanceof Error?_0x530234[_0x4434ac(0x132)]:String(_0x530234)});}}if(_0x496a8c[_0x4434ac(0x12f)]&&_0x496a8c[_0x4434ac(0x13a)]&&_0x496a8c[_0x4434ac(0x13a)]['length']>0x0&&_0x496a8c['appCode']){console['log'](_0x4434ac(0xf2));const _0x1791eb=[],_0xe1b685=[],_0xb5c568=_0x496a8c[_0x4434ac(0x13a)][_0x4434ac(0xfb)](_0x18e114=>MCP_IDES['has'](_0x18e114)),_0x48ff96=_0x496a8c[_0x4434ac(0x13a)];for(const _0x269cfb of _0xb5c568){try{const _0x5a646d=await configureMcp(_0x269cfb,_0x87d78f);_0x1791eb['push']({'ide':_0x269cfb===_0x4434ac(0xfe)?_0x4434ac(0x11a):_0x4434ac(0x128),'status':_0x5a646d[_0x4434ac(0xf5)],'message':_0x5a646d[_0x4434ac(0x132)]}),console[_0x4434ac(0x123)]('\x20\x20'+(_0x5a646d[_0x4434ac(0xf5)]===_0x4434ac(0x14e)?'✓':_0x5a646d[_0x4434ac(0xf5)]===_0x4434ac(0xfc)?'⚠️':'✗')+'\x20MCP\x20'+_0x269cfb+':\x20'+_0x5a646d['message']);}catch(_0x566476){_0x1791eb[_0x4434ac(0x142)]({'ide':_0x269cfb===_0x4434ac(0xfe)?_0x4434ac(0x11a):'Claude\x20Code','status':'error','message':_0x566476 instanceof Error?_0x566476[_0x4434ac(0x132)]:String(_0x566476)}),console[_0x4434ac(0x123)](_0x4434ac(0xe1)+_0x269cfb+':\x20'+(_0x566476 instanceof Error?_0x566476[_0x4434ac(0x132)]:String(_0x566476)));}}await copySharedSkills(_0x87d78f);for(const _0x198a46 of _0x48ff96){try{const _0x374c95=await installSkill(_0x198a46,_0x87d78f);_0xe1b685['push']({'ide':_0x374c95['ide'],'status':_0x374c95['status'],'message':_0x374c95['message']}),console[_0x4434ac(0x123)]('\x20\x20'+(_0x374c95[_0x4434ac(0xf5)]==='success'?'✓':'✗')+_0x4434ac(0x151)+_0x374c95[_0x4434ac(0x10c)]+':\x20'+_0x374c95['message']);}catch(_0xb325dc){_0xe1b685[_0x4434ac(0x142)]({'ide':_0x198a46,'status':_0x4434ac(0x13d),'message':_0xb325dc instanceof Error?_0xb325dc[_0x4434ac(0x132)]:String(_0xb325dc)}),console[_0x4434ac(0x123)](_0x4434ac(0xf7)+_0x198a46+':\x20'+(_0xb325dc instanceof Error?_0xb325dc['message']:String(_0xb325dc)));}}if(_0xe1b685[_0x4434ac(0x143)]>0x0){const _0x4d8cd2=_0xe1b685[_0x4434ac(0xfb)](_0x47f25b=>_0x47f25b[_0x4434ac(0xf5)]===_0x4434ac(0x14e))[_0x4434ac(0xdf)](_0x3c7d20=>_0x3c7d20[_0x4434ac(0x10c)]);_0x4d8cd2[_0x4434ac(0x143)]>0x0&&createSkillManifest(_0x87d78f,_0x4d8cd2);}_0x4aff12({'mcp':_0x1791eb,'skill':_0xe1b685}),console['log'](_0x4434ac(0x10e));}logger[_0x4434ac(0x14e)]('create',_0x4434ac(0xfd)+_0x496a8c['projectName']),_0x64bc31(!![]),_0x2d98ad(![]);}catch(_0x311c19){logger[_0x4434ac(0x13d)]('create',_0x4434ac(0x14a)+_0x496a8c[_0x4434ac(0x133)],{'error':_0x311c19 instanceof Error?_0x311c19[_0x4434ac(0x132)]:String(_0x311c19)});try{a43_0x4ab4d8['existsSync'](_0x87d78f)&&(console[_0x4434ac(0x123)]('*\x20清理失败的项目目录:\x20'+_0x87d78f),a43_0x4ab4d8['rmSync'](_0x87d78f,{'recursive':!![],'force':!![]}));}catch(_0x5c5f4a){logger[_0x4434ac(0x129)](_0x4434ac(0x137),_0x4434ac(0x11b)+_0x87d78f);}_0x2d98ad(![]),console[_0x4434ac(0x13d)](_0x4434ac(0xe8)+(_0x311c19 instanceof Error?_0x311c19[_0x4434ac(0x132)]:String(_0x311c19)));}},_0x4a4e63=async _0x25c380=>{const _0x3bc689=a43_0x5f6c;await _0x221e2f({'projectName':_0x25c380,'env':_0x1d2993[_0x3bc689(0x13f)]});},_0x456450=async _0x97a146=>{const _0x148980=a43_0x5f6c,_0x593279=a43_0x3b6ca6['resolve'](process['cwd'](),_0x97a146),_0x30fba4=a43_0x3b6ca6['join'](_0x593279,_0x148980(0xf3));try{console[_0x148980(0x123)](_0x148980(0x11f));const _0x128975=fileURLToPath(import.meta.url),_0x29ffe1=a43_0x3b6ca6['resolve'](a43_0x3b6ca6[_0x148980(0x135)](_0x128975),'../..'),_0x329361=a43_0x3b6ca6[_0x148980(0xe9)](_0x29ffe1,'package.json');let _0x2550d0=_0x148980(0x131);try{const _0x12cee4=JSON[_0x148980(0x115)](a43_0x4ab4d8['readFileSync'](_0x329361,_0x148980(0x152)));_0x2550d0=_0x12cee4[_0x148980(0x147)]||'1.0.0';}catch(_0x505d96){}const _0x169f80=a43_0x4ab4d8[_0x148980(0x127)](_0x30fba4,_0x148980(0x152)),_0x1d4b6c=JSON[_0x148980(0x115)](_0x169f80);_0x1d4b6c[_0x148980(0x114)]=_0x97a146,_0x1d4b6c['description']=_0x97a146+'\x20Generated\x20by\x20lovrabet\x20cli\x20'+_0x2550d0,a43_0x4ab4d8[_0x148980(0xe0)](_0x30fba4,JSON[_0x148980(0x11e)](_0x1d4b6c,null,0x2)+'\x0a',_0x148980(0x152)),console[_0x148980(0x123)](_0x148980(0xff)+_0x97a146),logger[_0x148980(0x12d)]('create','更新\x20package.json\x20name');}catch(_0x2fa352){logger[_0x148980(0x13d)](_0x148980(0x137),'更新\x20package.json\x20失败');throw _0x2fa352;}},_0x475116=async(_0xcdf068,_0x2096f8,_0x27af31)=>{const _0x368b72=a43_0x5f6c,_0xdeb172=a43_0x3b6ca6[_0x368b72(0x145)](process[_0x368b72(0x13c)](),_0xcdf068),_0x100886=a43_0x3b6ca6['join'](_0xdeb172,'.lovrabetrc');try{_0x2096f8?console[_0x368b72(0x123)](_0x368b72(0xe6)+_0xcdf068+_0x368b72(0x125)+_0x2096f8):console[_0x368b72(0x123)](_0x368b72(0xe6)+_0xcdf068+_0x368b72(0x109));const _0x23051b=fileURLToPath(import.meta.url),_0x2a4c7f=a43_0x3b6ca6[_0x368b72(0x145)](a43_0x3b6ca6['dirname'](_0x23051b),_0x368b72(0x136)),_0x1650cb=a43_0x3b6ca6[_0x368b72(0xe9)](_0x2a4c7f,_0x368b72(0xf3));let _0x53656e=_0x368b72(0x131);try{const _0x3decbb=JSON[_0x368b72(0x115)](a43_0x4ab4d8[_0x368b72(0x127)](_0x1650cb,_0x368b72(0x152)));_0x53656e=_0x3decbb[_0x368b72(0x147)]||_0x368b72(0x131);}catch(_0x3ed1b0){}const _0x1574b3=readConfig(),_0x151e65=typeof _0x1574b3[_0x368b72(0x13f)]==='string'?_0x1574b3[_0x368b72(0x13f)]:undefined,{app:_0x10030f,appcode:_0x4457a3,..._0x12cd1c}=_0x1574b3,_0x2608fe={..._0x12cd1c,'appcode':_0x2096f8||'','env':_0x27af31||_0x151e65||_0x368b72(0xf4),'createdAt':new Date()[_0x368b72(0x10f)](),'version':_0x53656e};a43_0x4ab4d8['writeFileSync'](_0x100886,JSON[_0x368b72(0x11e)](_0x2608fe,null,0x2),_0x368b72(0x152)),_0x2096f8?console[_0x368b72(0x123)](_0x368b72(0x12c)+_0x2096f8):console['log'](_0x368b72(0x144)),logger[_0x368b72(0x12d)](_0x368b72(0x137),_0x368b72(0x118)+_0x2096f8);}catch(_0x5c5599){logger['error'](_0x368b72(0x137),_0x368b72(0x120));}};useEffect(()=>{const _0x2f6ca6=a43_0x5f6c;_0x1d2993[_0x2f6ca6(0xe5)]&&_0x4a4e63(_0x1d2993[_0x2f6ca6(0xe5)]);},[_0x1d2993[_0x14e0eb(0xe5)]]);if(!_0xfc61a3&&!_0x3c4998&&!_0x1d2993['projectCode'])return a43_0x5c1f6c(EnhancedGuidedCreate,{'onCreate':_0x221e2f,'env':_0x1d2993[_0x14e0eb(0x13f)]});if(_0xfc61a3)return a43_0x850f98(a43_0x35d78d,{'children':[a43_0x850f98(Box,{'marginTop':0x1,'children':[a43_0x5c1f6c(Box,{'width':'1'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':_0x14e0eb(0xec)}),a43_0x5c1f6c(Text,{'children':'项目名称:\x20'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':_0xc71a2f?.[_0x14e0eb(0x133)]}),_0xc71a2f?.[_0x14e0eb(0x134)]&&a43_0x850f98(a43_0x35d78d,{'children':[a43_0x5c1f6c(Text,{'children':_0x14e0eb(0x113)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'children':_0xc71a2f[_0x14e0eb(0x134)]})]})]}),a43_0x5c1f6c(TaskRunning,{..._0x5cf3f4}),a43_0x5c1f6c(TaskRunning,{..._0xb24e7d}),a43_0x5c1f6c(TaskRunning,{..._0x1d57f6})]});if(_0x3c4998){const _0x58b5e2=_0x41475d&&(_0x41475d[_0x14e0eb(0x105)][_0x14e0eb(0x143)]>0x0||_0x41475d['skill'][_0x14e0eb(0x143)]>0x0);return a43_0x850f98(a43_0x35d78d,{'children':[a43_0x850f98(Box,{'marginTop':0x1,'children':[a43_0x5c1f6c(Box,{'width':'1'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':'\x20√\x20'}),a43_0x5c1f6c(Text,{'children':'项目名称:\x20'}),a43_0x5c1f6c(Text,{'color':'green','children':_0xc71a2f?.['projectName']}),_0xc71a2f?.[_0x14e0eb(0x134)]&&a43_0x850f98(a43_0x35d78d,{'children':[a43_0x5c1f6c(Text,{'children':_0x14e0eb(0x113)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'children':_0xc71a2f['appCode']})]})]}),a43_0x5c1f6c(TaskFinished,{..._0x5cf3f4}),a43_0x5c1f6c(TaskFinished,{..._0xb24e7d}),a43_0x5c1f6c(TaskFinished,{..._0x1d57f6}),a43_0x5c1f6c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':'─'[_0x14e0eb(0x139)](0x3c)})}),_0x58b5e2&&a43_0x850f98(a43_0x35d78d,{'children':[_0x41475d[_0x14e0eb(0x105)]['length']>0x0&&a43_0x850f98(a43_0x35d78d,{'children':[a43_0x5c1f6c(Box,{'marginTop':0x1,'children':a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'bold':!![],'children':_0x14e0eb(0xe3)})}),_0x41475d[_0x14e0eb(0x105)][_0x14e0eb(0xdf)]((_0x3d4f11,_0x427c14)=>a43_0x5c1f6c(Box,{'marginLeft':0x2,'children':a43_0x850f98(Text,{'color':_0x3d4f11[_0x14e0eb(0xf5)]===_0x14e0eb(0x14e)?_0x14e0eb(0x150):_0x3d4f11['status']===_0x14e0eb(0xfc)?_0x14e0eb(0x12a):_0x14e0eb(0x14c),'children':[_0x3d4f11[_0x14e0eb(0x10c)],':\x20',_0x3d4f11[_0x14e0eb(0x132)]]})},_0x14e0eb(0xf6)+_0x427c14))]}),_0x41475d['skill'][_0x14e0eb(0x143)]>0x0&&a43_0x850f98(a43_0x35d78d,{'children':[a43_0x5c1f6c(Box,{'marginTop':_0x41475d['mcp'][_0x14e0eb(0x143)]>0x0?0x1:0x0,'children':a43_0x5c1f6c(Text,{'color':'green','bold':!![],'children':_0x14e0eb(0x103)})}),_0x41475d[_0x14e0eb(0x116)][_0x14e0eb(0xdf)]((_0x16d36f,_0x390f83)=>a43_0x5c1f6c(Box,{'marginLeft':0x2,'children':a43_0x850f98(Text,{'color':_0x16d36f[_0x14e0eb(0xf5)]===_0x14e0eb(0x14e)?'white':_0x14e0eb(0x14c),'children':[_0x16d36f[_0x14e0eb(0x10c)],':\x20',_0x16d36f['message']]})},'skill-'+_0x390f83))]}),a43_0x5c1f6c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':'─'['repeat'](0x3c)})})]}),a43_0x5c1f6c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x5c1f6c(Text,{'color':'cyan','bold':!![],'children':'🚀\x20接下来:'})}),a43_0x850f98(Box,{'marginLeft':0x2,'flexDirection':'column','children':[_0x58b5e2?a43_0x850f98(a43_0x35d78d,{'children':[a43_0x850f98(Box,{'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':_0x14e0eb(0x138)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x150),'children':_0x14e0eb(0x14b)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x141)+_0xc71a2f?.[_0x14e0eb(0x133)]+'\x20&&\x20lovrabet\x20start'})]}),_0xc71a2f?.[_0x14e0eb(0x134)]&&!_0xc71a2f?.[_0x14e0eb(0x102)]&&a43_0x850f98(Box,{'children':[a43_0x5c1f6c(Text,{'color':'yellow','children':_0x14e0eb(0x121)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x150),'children':'拉取API配置:\x20'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x10a)})]})]}):a43_0x850f98(a43_0x35d78d,{'children':[a43_0x5c1f6c(Box,{'children':a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x12a),'bold':!![],'children':_0x14e0eb(0x110)})}),a43_0x850f98(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a43_0x5c1f6c(Text,{'color':'white','children':_0x14e0eb(0x126)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0xfa)})]}),a43_0x850f98(Box,{'marginLeft':0x2,'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x150),'children':'\x20\x20•\x20MCP\x20服务器:\x20'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0xed)})]}),a43_0x850f98(Box,{'marginTop':0x1,'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':'2.\x20'}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x150),'children':_0x14e0eb(0x14b)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x141)+_0xc71a2f?.[_0x14e0eb(0x133)]+'\x20&&\x20lovrabet\x20start'})]}),_0xc71a2f?.[_0x14e0eb(0x134)]&&!_0xc71a2f?.[_0x14e0eb(0x102)]&&a43_0x850f98(Box,{'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x12a),'children':'3.\x20'}),a43_0x5c1f6c(Text,{'color':'white','children':_0x14e0eb(0xea)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x10a)})]})]}),!_0xc71a2f?.[_0x14e0eb(0x134)]&&a43_0x850f98(a43_0x35d78d,{'children':[a43_0x850f98(Box,{'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x140),'children':_0x14e0eb(0x121)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x150),'children':_0x14e0eb(0xee)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x11d)})]}),a43_0x850f98(Box,{'children':[a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x140),'children':'3.\x20'}),a43_0x5c1f6c(Text,{'color':'white','children':_0x14e0eb(0xea)}),a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x148),'bold':!![],'children':_0x14e0eb(0x149)})]})]})]}),a43_0x5c1f6c(Box,{'marginTop':0x1,'children':a43_0x5c1f6c(Text,{'color':_0x14e0eb(0x100),'children':'─'[_0x14e0eb(0x139)](0x3c)})})]});}return null;}
|
|
1
|
+
(function(_0x5c1f6f,_0x40cb47){const _0xfd5c42=a44_0x4577,_0x113bed=_0x5c1f6f();while(!![]){try{const _0x31657b=parseInt(_0xfd5c42(0x86))/0x1*(-parseInt(_0xfd5c42(0x7d))/0x2)+-parseInt(_0xfd5c42(0x81))/0x3+-parseInt(_0xfd5c42(0x95))/0x4+-parseInt(_0xfd5c42(0xa0))/0x5*(parseInt(_0xfd5c42(0x8a))/0x6)+-parseInt(_0xfd5c42(0xc9))/0x7+-parseInt(_0xfd5c42(0x90))/0x8+parseInt(_0xfd5c42(0x8f))/0x9*(parseInt(_0xfd5c42(0x6e))/0xa);if(_0x31657b===_0x40cb47)break;else _0x113bed['push'](_0x113bed['shift']());}catch(_0x551fa8){_0x113bed['push'](_0x113bed['shift']());}}}(a44_0x5d60,0x2e3ed));import{jsx as a44_0x38635c,Fragment as a44_0x430e68,jsxs as a44_0x41552b}from'react/jsx-runtime';function a44_0x5d60(){const _0xce88d9=['message','170MFEqJk','doTask','green','log','red','×\x20无法在当前目录创建项目,请检查目录权限','\x20&&\x20lovrabet\x20start','currentVersion','3.\x20','env','*\x20正在拉取\x20API\x20配置...','length','version','配置应用AppCode:\x20','repeat','119542LeBytA','cyan','stableVersion','description','437793NNaIBz','resolve','filter','mcp','cwd','1yRKefv','cursor','readFileSync','info','5844ACkdGB','skill','\x20MCP\x20','success','*\x20清理失败的项目目录:\x20','525816dPpwpb','1116288xUEwrh','W_OK','existsSync','×\x20项目目录\x20','error','1095448FljKYq','projectName','toLocaleString','../..','create','name','\x20已存在,请使用其他项目名','yellow','white','API\x20配置拉取异常','1.\x20','590haKJLf','Claude\x20Code','配置AppCode:\x20','gray','✓\x20Skill\x20安装完成:','×\x20项目名不能为空','rmSync','mcp-','.lovrabetrc','更新\x20package.json\x20失败','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','pullApi','2.\x20','warn','stringify','启动项目:\x20','parse','dirname','√\x20package.json\x20已更新:\x20name=','trim','*\x20正在为项目\x20','API\x20配置拉取失败:\x20','utf8','test','online','\x20\x20•\x20Skill:\x20','×\x20项目名过长,最多支持\x20100\x20个字符','更新\x20package.json\x20name','needsUpgrade','map','1.0.0','selectedIDEs','column','√\x20配置文件已创建,应用AppCode:\x20','skill-','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','项目名称:\x20','\x20Generated\x20by\x20lovrabet\x20cli\x20','string','\x20\x20•\x20MCP\x20服务器:\x20','appCode','488285GvCMrX','清理项目目录失败:\x20','✓\x20MCP\x20服务器配置完成:','Cursor','cd\x20','\x20Skill\x20','🚀\x20接下来:','status','项目创建失败:\x20','writeFileSync','manual','拉取API配置:\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','package.json','\x20创建配置文件','push','projectCode','ide','\x20√\x20','\x20\x20✗\x20MCP\x20','join','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','×\x20项目创建失败:\x20','\x20|\x20应用AppCode:\x20','lovrabet\x20api\x20pull'];a44_0x5d60=function(){return _0xce88d9;};return a44_0x5d60();}import a44_0x114825 from'path';import a44_0x5379d5 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 a44_0x4577(_0xda5274,_0x1ba0f9){_0xda5274=_0xda5274-0x67;const _0x5d606c=a44_0x5d60();let _0x4577d8=_0x5d606c[_0xda5274];return _0x4577d8;}import{MCP_IDES}from'../utils/ai_config.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x2a9a6f){const _0x906934=a44_0x4577,[_0x146472,_0x5db085]=useState(![]),[_0xe36d94,_0x35d6cd]=useState(![]),[_0x28737a,_0x21d0d6]=useState(null),[_0xfe05d7,_0x14b7ea]=useState(null),_0x2d7dea=useCopyProjectTemplate(),_0x205ff7=useInstallDependencies(),_0x1704fe=useFormatCode();useEffect(()=>{checkCliVersion()['then'](_0x10bb6a=>{const _0x5bf35e=a44_0x4577;_0x10bb6a[_0x5bf35e(0xbc)]&&(printCliUpgradeWarning(_0x10bb6a),logger[_0x5bf35e(0x89)](_0x5bf35e(0x99),'CLI\x20版本检查',{'currentVersion':_0x10bb6a[_0x5bf35e(0x75)],'stableVersion':_0x10bb6a[_0x5bf35e(0x7f)],'needsUpgrade':_0x10bb6a[_0x5bf35e(0xbc)]}));});},[]);const _0x463cb5=async _0x51e0c1=>{const _0x33053d=a44_0x4577;if(!_0x51e0c1[_0x33053d(0x96)]||_0x51e0c1[_0x33053d(0x96)][_0x33053d(0xb3)]()===''){console[_0x33053d(0x94)](_0x33053d(0xa5));return;}const _0xe0c01a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xe0c01a[_0x33053d(0xb7)](_0x51e0c1[_0x33053d(0x96)])){console[_0x33053d(0x94)](_0x33053d(0xc3));return;}if(_0x51e0c1['projectName'][_0x33053d(0x79)]>0x64){console['error'](_0x33053d(0xba));return;}const _0x531352=a44_0x114825['resolve'](process[_0x33053d(0x85)](),_0x51e0c1['projectName']);if(a44_0x5379d5['existsSync'](_0x531352)){console[_0x33053d(0x94)](_0x33053d(0x93)+_0x51e0c1[_0x33053d(0x96)]+_0x33053d(0x9b));return;}try{const _0x2932f7=a44_0x114825[_0x33053d(0xb1)](_0x531352);a44_0x5379d5['accessSync'](_0x2932f7,a44_0x5379d5['constants'][_0x33053d(0x91)]);}catch(_0x121149){console[_0x33053d(0x94)](_0x33053d(0x73));return;}_0x21d0d6(_0x51e0c1),_0x5db085(!![]),logger['setLogPath'](_0x531352),logger['info'](_0x33053d(0x99),'开始创建项目:\x20'+_0x51e0c1[_0x33053d(0x96)],{'projectDir':_0x531352,'appCode':_0x51e0c1[_0x33053d(0xc8)]});try{await _0x2d7dea[_0x33053d(0x6f)](_0x51e0c1[_0x33053d(0x96)]),await _0x278af5(_0x51e0c1[_0x33053d(0x96)]),await _0x205ff7['doTask'](_0x51e0c1[_0x33053d(0x96)]),await _0x1704fe[_0x33053d(0x6f)](_0x51e0c1[_0x33053d(0x96)]),await _0x5bc9b5(_0x51e0c1[_0x33053d(0x96)],_0x51e0c1[_0x33053d(0xc8)]||'',_0x51e0c1[_0x33053d(0x77)]);if(_0x51e0c1[_0x33053d(0xab)]&&_0x51e0c1[_0x33053d(0xc8)]){console[_0x33053d(0x71)](_0x33053d(0x78));try{const _0x3c6d7e=await pullApiSilent(_0x51e0c1[_0x33053d(0xc8)],undefined,_0x531352,_0x51e0c1[_0x33053d(0x77)]);_0x3c6d7e?(console[_0x33053d(0x71)]('√\x20API\x20配置拉取完成'),logger[_0x33053d(0x89)](_0x33053d(0x99),'API\x20配置拉取成功:\x20'+_0x51e0c1[_0x33053d(0xc8)])):(console[_0x33053d(0x71)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x33053d(0xad)]('create',_0x33053d(0xb5)+_0x51e0c1[_0x33053d(0xc8)]));}catch(_0x3b21a6){console[_0x33053d(0x71)]('!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x33053d(0xad)](_0x33053d(0x99),_0x33053d(0x9e),{'error':_0x3b21a6 instanceof Error?_0x3b21a6[_0x33053d(0x6d)]:String(_0x3b21a6)});}}if(_0x51e0c1['aiSetup']&&_0x51e0c1['selectedIDEs']&&_0x51e0c1[_0x33053d(0xbf)][_0x33053d(0x79)]>0x0&&_0x51e0c1[_0x33053d(0xc8)]){console[_0x33053d(0x71)](_0x33053d(0xaa));const _0x2b3a9a=[],_0x3107b2=[],_0x3fae47=_0x51e0c1[_0x33053d(0xbf)][_0x33053d(0x83)](_0x506e5d=>MCP_IDES['has'](_0x506e5d)),_0x1bda31=_0x51e0c1[_0x33053d(0xbf)];for(const _0x194afc of _0x3fae47){try{const _0x4501c6=await configureMcp(_0x194afc,_0x531352);_0x2b3a9a['push']({'ide':_0x194afc===_0x33053d(0x87)?_0x33053d(0xcc):_0x33053d(0xa1),'status':_0x4501c6['status'],'message':_0x4501c6[_0x33053d(0x6d)]}),console[_0x33053d(0x71)]('\x20\x20'+(_0x4501c6[_0x33053d(0xd0)]===_0x33053d(0x8d)?'✓':_0x4501c6[_0x33053d(0xd0)]===_0x33053d(0xd3)?'⚠️':'✗')+_0x33053d(0x8c)+_0x194afc+':\x20'+_0x4501c6[_0x33053d(0x6d)]);}catch(_0x5309d9){_0x2b3a9a[_0x33053d(0xd9)]({'ide':_0x194afc===_0x33053d(0x87)?_0x33053d(0xcc):_0x33053d(0xa1),'status':_0x33053d(0x94),'message':_0x5309d9 instanceof Error?_0x5309d9['message']:String(_0x5309d9)}),console[_0x33053d(0x71)](_0x33053d(0x67)+_0x194afc+':\x20'+(_0x5309d9 instanceof Error?_0x5309d9['message']:String(_0x5309d9)));}}await copySharedSkills(_0x531352);for(const _0x55f40f of _0x1bda31){try{const _0x5236d5=await installSkill(_0x55f40f,_0x531352);_0x3107b2[_0x33053d(0xd9)]({'ide':_0x5236d5[_0x33053d(0xdb)],'status':_0x5236d5[_0x33053d(0xd0)],'message':_0x5236d5[_0x33053d(0x6d)]}),console[_0x33053d(0x71)]('\x20\x20'+(_0x5236d5[_0x33053d(0xd0)]===_0x33053d(0x8d)?'✓':'✗')+_0x33053d(0xce)+_0x5236d5[_0x33053d(0xdb)]+':\x20'+_0x5236d5[_0x33053d(0x6d)]);}catch(_0x4cb4d5){_0x3107b2[_0x33053d(0xd9)]({'ide':_0x55f40f,'status':'error','message':_0x4cb4d5 instanceof Error?_0x4cb4d5['message']:String(_0x4cb4d5)}),console['log']('\x20\x20✗\x20Skill\x20'+_0x55f40f+':\x20'+(_0x4cb4d5 instanceof Error?_0x4cb4d5[_0x33053d(0x6d)]:String(_0x4cb4d5)));}}if(_0x3107b2[_0x33053d(0x79)]>0x0){const _0xb2972f=_0x3107b2[_0x33053d(0x83)](_0x852bf3=>_0x852bf3[_0x33053d(0xd0)]==='success')['map'](_0x323a9d=>_0x323a9d[_0x33053d(0xdb)]);_0xb2972f[_0x33053d(0x79)]>0x0&&createSkillManifest(_0x531352,_0xb2972f);}_0x14b7ea({'mcp':_0x2b3a9a,'skill':_0x3107b2}),console[_0x33053d(0x71)](_0x33053d(0x69));}logger[_0x33053d(0x8d)]('create','项目创建完成:\x20'+_0x51e0c1['projectName']),_0x35d6cd(!![]),_0x5db085(![]);}catch(_0x4ac13a){logger['error']('create',_0x33053d(0xd1)+_0x51e0c1[_0x33053d(0x96)],{'error':_0x4ac13a instanceof Error?_0x4ac13a[_0x33053d(0x6d)]:String(_0x4ac13a)});try{a44_0x5379d5[_0x33053d(0x92)](_0x531352)&&(console[_0x33053d(0x71)](_0x33053d(0x8e)+_0x531352),a44_0x5379d5[_0x33053d(0xa6)](_0x531352,{'recursive':!![],'force':!![]}));}catch(_0x31abe2){logger[_0x33053d(0xad)](_0x33053d(0x99),_0x33053d(0xca)+_0x531352);}_0x5db085(![]),console[_0x33053d(0x94)](_0x33053d(0x6a)+(_0x4ac13a instanceof Error?_0x4ac13a[_0x33053d(0x6d)]:String(_0x4ac13a)));}},_0x42d63a=async _0x3c5007=>{const _0x35a598=a44_0x4577;await _0x463cb5({'projectName':_0x3c5007,'env':_0x2a9a6f[_0x35a598(0x77)]});},_0x278af5=async _0x57a51b=>{const _0x4f537f=a44_0x4577,_0x48c944=a44_0x114825[_0x4f537f(0x82)](process['cwd'](),_0x57a51b),_0xcfa1dc=a44_0x114825[_0x4f537f(0x68)](_0x48c944,'package.json');try{console[_0x4f537f(0x71)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0xde3e37=fileURLToPath(import.meta.url),_0x1fed6d=a44_0x114825['resolve'](a44_0x114825['dirname'](_0xde3e37),_0x4f537f(0x98)),_0x47ad69=a44_0x114825[_0x4f537f(0x68)](_0x1fed6d,_0x4f537f(0xd7));let _0x522f13=_0x4f537f(0xbe);try{const _0x39be66=JSON[_0x4f537f(0xb0)](a44_0x5379d5[_0x4f537f(0x88)](_0x47ad69,'utf8'));_0x522f13=_0x39be66[_0x4f537f(0x7a)]||_0x4f537f(0xbe);}catch(_0x14021f){}const _0x2eee47=a44_0x5379d5[_0x4f537f(0x88)](_0xcfa1dc,_0x4f537f(0xb6)),_0x29b161=JSON['parse'](_0x2eee47);_0x29b161[_0x4f537f(0x9a)]=_0x57a51b,_0x29b161[_0x4f537f(0x80)]=_0x57a51b+_0x4f537f(0xc5)+_0x522f13,a44_0x5379d5[_0x4f537f(0xd2)](_0xcfa1dc,JSON[_0x4f537f(0xae)](_0x29b161,null,0x2)+'\x0a','utf8'),console[_0x4f537f(0x71)](_0x4f537f(0xb2)+_0x57a51b),logger[_0x4f537f(0x89)](_0x4f537f(0x99),_0x4f537f(0xbb));}catch(_0x1360a3){logger[_0x4f537f(0x94)](_0x4f537f(0x99),_0x4f537f(0xa9));throw _0x1360a3;}},_0x5bc9b5=async(_0x43f591,_0x6712d8,_0x15abbe)=>{const _0x10af85=a44_0x4577,_0x5db5c1=a44_0x114825[_0x10af85(0x82)](process[_0x10af85(0x85)](),_0x43f591),_0x13170b=a44_0x114825[_0x10af85(0x68)](_0x5db5c1,_0x10af85(0xa8));try{_0x6712d8?console[_0x10af85(0x71)](_0x10af85(0xb4)+_0x43f591+'\x20配置应用AppCode:\x20'+_0x6712d8):console[_0x10af85(0x71)]('*\x20正在为项目\x20'+_0x43f591+_0x10af85(0xd8));const _0x535944=fileURLToPath(import.meta.url),_0x285957=a44_0x114825['resolve'](a44_0x114825[_0x10af85(0xb1)](_0x535944),_0x10af85(0x98)),_0x18c3ed=a44_0x114825[_0x10af85(0x68)](_0x285957,_0x10af85(0xd7));let _0x1dbcaa='1.0.0';try{const _0x1f0727=JSON['parse'](a44_0x5379d5[_0x10af85(0x88)](_0x18c3ed,'utf8'));_0x1dbcaa=_0x1f0727[_0x10af85(0x7a)]||_0x10af85(0xbe);}catch(_0x177117){}const _0x19f91c=readConfig(),_0x33eb10=typeof _0x19f91c[_0x10af85(0x77)]===_0x10af85(0xc6)?_0x19f91c[_0x10af85(0x77)]:undefined,{app:_0x570791,appcode:_0x58af66,..._0x56c5e5}=_0x19f91c,_0x35b028={..._0x56c5e5,'appcode':_0x6712d8||'','env':_0x15abbe||_0x33eb10||_0x10af85(0xb8),'createdAt':new Date()[_0x10af85(0x97)](),'version':_0x1dbcaa};a44_0x5379d5[_0x10af85(0xd2)](_0x13170b,JSON['stringify'](_0x35b028,null,0x2),_0x10af85(0xb6)),_0x6712d8?console[_0x10af85(0x71)](_0x10af85(0xc1)+_0x6712d8):console[_0x10af85(0x71)](_0x10af85(0xd6)),logger[_0x10af85(0x89)](_0x10af85(0x99),_0x10af85(0x7b)+_0x6712d8);}catch(_0x647b2d){logger[_0x10af85(0x94)]('create','配置应用AppCode失败');}};useEffect(()=>{const _0x532db4=a44_0x4577;_0x2a9a6f[_0x532db4(0xda)]&&_0x42d63a(_0x2a9a6f[_0x532db4(0xda)]);},[_0x2a9a6f[_0x906934(0xda)]]);if(!_0x146472&&!_0xe36d94&&!_0x2a9a6f[_0x906934(0xda)])return a44_0x38635c(EnhancedGuidedCreate,{'onCreate':_0x463cb5,'env':_0x2a9a6f['env']});if(_0x146472)return a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Box,{'width':'1'}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'\x20√\x20'}),a44_0x38635c(Text,{'children':_0x906934(0xc4)}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x28737a?.[_0x906934(0x96)]}),_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Text,{'children':_0x906934(0x6b)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'children':_0x28737a[_0x906934(0xc8)]})]})]}),a44_0x38635c(TaskRunning,{..._0x2d7dea}),a44_0x38635c(TaskRunning,{..._0x205ff7}),a44_0x38635c(TaskRunning,{..._0x1704fe})]});if(_0xe36d94){const _0x1e9c88=_0xfe05d7&&(_0xfe05d7[_0x906934(0x84)][_0x906934(0x79)]>0x0||_0xfe05d7[_0x906934(0x8b)][_0x906934(0x79)]>0x0);return a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Box,{'width':'1'}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x906934(0xdc)}),a44_0x38635c(Text,{'children':_0x906934(0xc4)}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x28737a?.[_0x906934(0x96)]}),_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Text,{'children':_0x906934(0x6b)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'children':_0x28737a[_0x906934(0xc8)]})]})]}),a44_0x38635c(TaskFinished,{..._0x2d7dea}),a44_0x38635c(TaskFinished,{..._0x205ff7}),a44_0x38635c(TaskFinished,{..._0x1704fe}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'─'['repeat'](0x3c)})}),_0x1e9c88&&a44_0x41552b(a44_0x430e68,{'children':[_0xfe05d7[_0x906934(0x84)][_0x906934(0x79)]>0x0&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'marginTop':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'bold':!![],'children':_0x906934(0xcb)})}),_0xfe05d7[_0x906934(0x84)]['map']((_0x930230,_0x13a8c0)=>a44_0x38635c(Box,{'marginLeft':0x2,'children':a44_0x41552b(Text,{'color':_0x930230['status']==='success'?_0x906934(0x9d):_0x930230[_0x906934(0xd0)]==='manual'?_0x906934(0x9c):_0x906934(0x72),'children':[_0x930230['ide'],':\x20',_0x930230[_0x906934(0x6d)]]})},_0x906934(0xa7)+_0x13a8c0))]}),_0xfe05d7[_0x906934(0x8b)][_0x906934(0x79)]>0x0&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'marginTop':_0xfe05d7['mcp'][_0x906934(0x79)]>0x0?0x1:0x0,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'bold':!![],'children':_0x906934(0xa4)})}),_0xfe05d7[_0x906934(0x8b)][_0x906934(0xbd)]((_0x5c3f2d,_0x3d083a)=>a44_0x38635c(Box,{'marginLeft':0x2,'children':a44_0x41552b(Text,{'color':_0x5c3f2d[_0x906934(0xd0)]===_0x906934(0x8d)?'white':_0x906934(0x72),'children':[_0x5c3f2d[_0x906934(0xdb)],':\x20',_0x5c3f2d[_0x906934(0x6d)]]})},_0x906934(0xc2)+_0x3d083a))]}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'─'['repeat'](0x3c)})})]}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcf)})}),a44_0x41552b(Box,{'marginLeft':0x2,'flexDirection':_0x906934(0xc0),'children':[_0x1e9c88?a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x906934(0x9f)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xaf)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcd)+_0x28737a?.[_0x906934(0x96)]+_0x906934(0x74)})]}),_0x28737a?.[_0x906934(0xc8)]&&!_0x28737a?.[_0x906934(0xab)]&&a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x9c),'children':_0x906934(0xac)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':'拉取API配置:\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0x6c)})]})]}):a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'children':a44_0x38635c(Text,{'color':_0x906934(0x9c),'bold':!![],'children':'1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill'})}),a44_0x41552b(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xb9)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20skill\x20install'})]}),a44_0x41552b(Box,{'marginLeft':0x2,'children':[a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xc7)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20mcp\x20install'})]}),a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'2.\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xaf)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcd)+_0x28737a?.['projectName']+_0x906934(0x74)})]}),_0x28737a?.[_0x906934(0xc8)]&&!_0x28737a?.[_0x906934(0xab)]&&a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x9c),'children':_0x906934(0x76)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':'拉取API配置:\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0x6c)})]})]}),!_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0xa3),'children':_0x906934(0xac)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xa2)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xd5)})]}),a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':'gray','children':_0x906934(0x76)}),a44_0x38635c(Text,{'color':'white','children':_0x906934(0xd4)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a44_0x38635c(Box,{'marginTop':0x1,'children':a44_0x38635c(Text,{'color':'green','children':'─'[_0x906934(0x7c)](0x3c)})})]});}return null;}
|