@lovrabet/cli 1.3.1 → 1.3.2-beta.1

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.
Files changed (80) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -0
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
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_0xb58d90=a32_0x16ca;(function(_0x2cd9bd,_0x5864d2){const _0x225554=a32_0x16ca,_0x32d00b=_0x2cd9bd();while(!![]){try{const _0x21a4ff=parseInt(_0x225554(0x95))/0x1*(-parseInt(_0x225554(0x92))/0x2)+-parseInt(_0x225554(0x86))/0x3*(-parseInt(_0x225554(0xac))/0x4)+parseInt(_0x225554(0xaf))/0x5+-parseInt(_0x225554(0xb9))/0x6+parseInt(_0x225554(0x9a))/0x7*(-parseInt(_0x225554(0x94))/0x8)+-parseInt(_0x225554(0xbc))/0x9+parseInt(_0x225554(0xca))/0xa;if(_0x21a4ff===_0x5864d2)break;else _0x32d00b['push'](_0x32d00b['shift']());}catch(_0x12d86b){_0x32d00b['push'](_0x32d00b['shift']());}}}(a32_0x1cc0,0xa7463));import{jsx as a32_0x2be163}from'react/jsx-runtime';import a32_0x1e819e 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';function a32_0x16ca(_0x322eb8,_0x38cbf5){_0x322eb8=_0x322eb8-0x84;const _0x1cc0c0=a32_0x1cc0();let _0x16ca03=_0x1cc0c0[_0x322eb8];return _0x16ca03;}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;function a32_0x1cc0(){const _0x141668=['\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','length','exit','appcode','mcpClaude','codebuddy','menu','nonInteractive','page','clear','argv','执行预览命令','codex','setLogPath','180SiZTCU','logout','all','3327910QeQXcI','help','./create-app/non-interactive.js','install','skill-install','start','执行更新菜单\x20CDN\x20资源命令','./mcp/mcp-install-non-interactive.js','执行启动命令','cline','4975026wDDmEc','mcpCursor','boolean','10929366RJzWmq','menu-sync','build','trim','执行配置\x20MCP\x20命令','auth','执行初始化配置命令','env','lovrabet\x20','create','isTTY','init','push','antigravity','27845570Txhpjg','claude','mcpOther','skill','执行构建命令','info','./skills/skill-install-non-interactive.js','setRawCommand','opencode','./cli-flags.js','preview','执行安装技能包命令','32061jHRIJT','config','./skills/main.js','flags','windsurf','mcp','qoder','非交互模式创建项目:\x20','error','cursor','menu-update-cdn','--help','4218ltIpBw','input','8WMAnlf','263atqhxr','api','执行添加页面命令','cwd','trae','4533809ogAcdL','update','agent','string'];a32_0x1cc0=function(){return _0x141668;};return a32_0x1cc0();}try{dynamicCliFlags=(await import(a32_0xb58d90(0xd3)))['dynamicCliFlags'];}catch{}const mergedFlags={...dynamicCliFlags||{}};function isNonInteractiveMode(_0x25d89d){const _0x193fca=a32_0xb58d90;return!!(_0x25d89d[_0x193fca(0xa5)]||_0x25d89d['ci']||process[_0x193fca(0xc3)]['LOVRABET_CI']==='true'||process[_0x193fca(0xc3)]['CI']==='true'||!process['stdout'][_0x193fca(0xc6)]);}const cli=a32_0x1e819e(a32_0xb58d90(0x9e),{'importMeta':import.meta,'flags':{'name':{'type':a32_0xb58d90(0x9d)},'clear':{'type':'boolean'},'env':{'type':a32_0xb58d90(0x9d)},'watch':{'type':a32_0xb58d90(0xbb)},'help':{'type':a32_0xb58d90(0xbb)},'appcode':{'type':'string'},'output':{'type':a32_0xb58d90(0x9d)},'params':{'type':a32_0xb58d90(0x9d)},'datasetcode':{'type':a32_0xb58d90(0x9d)},'mcpCursor':{'type':a32_0xb58d90(0xbb)},'mcpClaude':{'type':a32_0xb58d90(0xbb)},'mcpOther':{'type':'boolean'},'cursor':{'type':'boolean'},'windsurf':{'type':'boolean'},'claude':{'type':a32_0xb58d90(0xbb)},'cline':{'type':'boolean'},'codex':{'type':a32_0xb58d90(0xbb)},'opencode':{'type':a32_0xb58d90(0xbb)},'qoder':{'type':a32_0xb58d90(0xbb)},'codebuddy':{'type':'boolean'},'trae':{'type':a32_0xb58d90(0xbb)},'agent':{'type':a32_0xb58d90(0xbb)},'antigravity':{'type':a32_0xb58d90(0xbb)},'all':{'type':a32_0xb58d90(0xbb)},'nonInteractive':{'type':a32_0xb58d90(0xbb)},'ci':{'type':'boolean'},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x131c13=a32_0xb58d90,_0x5a7d39=cli[_0x131c13(0x93)][0x0],_0xf7a9fe=cli[_0x131c13(0x93)][0x1],_0x624b8b=cli[_0x131c13(0x93)][0x2],_0x1e1ed3=(_0x131c13(0xc4)+process[_0x131c13(0xa8)]['slice'](0x2)['join']('\x20'))['trim']();logger[_0x131c13(0xd1)](_0x1e1ed3);switch(_0x5a7d39){case _0x131c13(0xc7):{const _0x21f1d3=cli[_0x131c13(0x89)][_0x131c13(0xa1)],_0x10be4f=cli[_0x131c13(0x89)][_0x131c13(0xc3)];logger[_0x131c13(0xab)](process[_0x131c13(0x98)]()),logger['info'](_0x131c13(0xc7),_0x131c13(0xc2)),render(a32_0x2be163(Init,{'appcode':_0x21f1d3,'env':_0x10be4f}));break;}case'create':{const _0xfa5d45=cli['input'][0x1]?.[_0x131c13(0xbf)](),_0xb2dda5=cli['flags'][_0x131c13(0xc3)],_0x559a4e=isNonInteractiveMode(cli[_0x131c13(0x89)]);if(_0x559a4e&&_0xfa5d45){logger[_0x131c13(0xab)](process[_0x131c13(0x98)]()),logger['info'](_0x131c13(0xc5),_0x131c13(0x8d)+_0xfa5d45);const {createProjectNonInteractive:_0x181dcc}=await import(_0x131c13(0xb1));await _0x181dcc(_0xfa5d45,_0xb2dda5);}else render(a32_0x2be163(CreateApp,{'projectCode':_0xfa5d45,'env':_0xb2dda5}));break;}case'add':{cli['input'][0x1]===_0x131c13(0xa6)&&(logger[_0x131c13(0xab)](process[_0x131c13(0x98)]()),logger[_0x131c13(0xcf)]('add-page',_0x131c13(0x97)),render(a32_0x2be163(AddPage,{})));break;}case _0x131c13(0xb4):{try{logger[_0x131c13(0xab)](process[_0x131c13(0x98)]()),logger[_0x131c13(0xcf)](_0x131c13(0xb4),_0x131c13(0xb7)),await runStart();}catch(_0xf2cc9e){console[_0x131c13(0x8e)](_0xf2cc9e),process[_0x131c13(0xa0)](0x1);}break;}case _0x131c13(0xbe):{try{logger[_0x131c13(0xab)](process['cwd']()),logger[_0x131c13(0xcf)](_0x131c13(0xbe),_0x131c13(0xce)),await runBuild();}catch(_0x2367e6){console[_0x131c13(0x8e)](_0x2367e6),process[_0x131c13(0xa0)](0x1);}break;}case _0x131c13(0x84):{const _0x1ad1b5=cli[_0x131c13(0x89)]['watch'];logger[_0x131c13(0xab)](process[_0x131c13(0x98)]()),logger[_0x131c13(0xcf)]('preview',_0x131c13(0xa9)+(_0x1ad1b5?'\x20(监听模式)':''));if(_0x1ad1b5)try{await Promise[_0x131c13(0xae)]([runBuildWatch(),runPreview()]);}catch(_0x3d5d4c){console[_0x131c13(0x8e)](_0x3d5d4c),process[_0x131c13(0xa0)](0x1);}else try{await runPreview();}catch(_0x5bb426){console['error'](_0x5bb426),process['exit'](0x1);}break;}case _0x131c13(0x87):{render(a32_0x2be163(Config,{'cli':cli}));break;}case _0x131c13(0x96):{await apiCli(cli);break;}case _0x131c13(0xc1):{render(a32_0x2be163(AuthServer,{}));break;}case _0x131c13(0xa4):{if(_0xf7a9fe===_0x131c13(0x9b)){logger['setLogPath'](process[_0x131c13(0x98)]()),logger['info'](_0x131c13(0x90),_0x131c13(0xb5)),render(a32_0x2be163(AppMenuUpdateCdn,{}));break;}else logger[_0x131c13(0xab)](process['cwd']()),logger[_0x131c13(0xcf)](_0x131c13(0xbd),'同步菜单命令'),render(a32_0x2be163(AppMenuSyncUI,{}));break;}case _0x131c13(0xad):{logout();break;}case _0x131c13(0x8b):{const _0x470d3d=cli[_0x131c13(0x93)][0x1];logger['setLogPath'](process['cwd']());if(_0x470d3d===_0x131c13(0xb2)){const _0x47a10f=[];if(cli[_0x131c13(0x89)][_0x131c13(0xba)]||cli[_0x131c13(0x89)][_0x131c13(0x8f)])_0x47a10f[_0x131c13(0xc8)](_0x131c13(0x8f));if(cli[_0x131c13(0x89)][_0x131c13(0xa2)]||cli[_0x131c13(0x89)][_0x131c13(0xcb)])_0x47a10f['push'](_0x131c13(0xcb));if(cli[_0x131c13(0x89)][_0x131c13(0xcc)])_0x47a10f[_0x131c13(0xc8)]('other');logger[_0x131c13(0xcf)]('mcp-install',_0x131c13(0xc0),{'preselected':_0x47a10f});if(isNonInteractiveMode(cli['flags'])&&_0x47a10f['length']>0x0){const {installMcpNonInteractive:_0x2268e6}=await import(_0x131c13(0xb6));await _0x2268e6(_0x47a10f);}else render(a32_0x2be163(McpInstallUI,{'preselectedIDEs':_0x47a10f}));}else _0x470d3d===_0x131c13(0x91)||cli[_0x131c13(0x89)][_0x131c13(0xb0)]?await mcpCommand(_0x470d3d,[],{'help':!![]}):await mcpCommand(_0x470d3d,[],cli['flags']);break;}case _0x131c13(0xcd):{const _0x4b1df5=cli[_0x131c13(0x93)][0x1];logger[_0x131c13(0xab)](process[_0x131c13(0x98)]());if(_0x4b1df5===_0x131c13(0xb2)){const _0x17a076=[];if(cli[_0x131c13(0x89)][_0x131c13(0xae)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0x8f),_0x131c13(0x8a),'claude',_0x131c13(0xb8),'codex',_0x131c13(0xd2),_0x131c13(0x8c),_0x131c13(0xa3),_0x131c13(0x99),'agent',_0x131c13(0xc9));else{if(cli[_0x131c13(0x89)]['cursor'])_0x17a076['push'](_0x131c13(0x8f));if(cli[_0x131c13(0x89)]['windsurf'])_0x17a076['push']('windsurf');if(cli['flags'][_0x131c13(0xcb)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0xcb));if(cli['flags']['cline'])_0x17a076['push'](_0x131c13(0xb8));if(cli[_0x131c13(0x89)]['codex'])_0x17a076[_0x131c13(0xc8)](_0x131c13(0xaa));if(cli['flags'][_0x131c13(0xd2)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0xd2));if(cli[_0x131c13(0x89)]['qoder'])_0x17a076['push'](_0x131c13(0x8c));if(cli[_0x131c13(0x89)][_0x131c13(0xa3)])_0x17a076['push'](_0x131c13(0xa3));if(cli[_0x131c13(0x89)][_0x131c13(0x99)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0x99));if(cli[_0x131c13(0x89)][_0x131c13(0x9c)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0x9c));if(cli[_0x131c13(0x89)][_0x131c13(0xc9)])_0x17a076[_0x131c13(0xc8)](_0x131c13(0xc9));}const {getAllProvidedFlags:_0x313929}=await import(_0x131c13(0x88)),_0x191fcb=_0x313929(cli[_0x131c13(0x89)]);logger['info'](_0x131c13(0xb3),_0x131c13(0x85),{'preselected':_0x17a076,'providedFlags':_0x191fcb});if(isNonInteractiveMode(cli['flags'])&&_0x17a076[_0x131c13(0x9f)]>0x0){const {installSkillsNonInteractive:_0x13f5d0}=await import(_0x131c13(0xd0));await _0x13f5d0(_0x17a076,_0x191fcb);}else render(a32_0x2be163(SkillInstallUI,{'preselectedIDEs':_0x17a076,'providedFlags':_0x191fcb}));}else _0x4b1df5===_0x131c13(0x91)||cli[_0x131c13(0x89)][_0x131c13(0xb0)]?await skillsCommand(_0x4b1df5,[],{'help':!![]}):await skillsCommand(_0x4b1df5,[],cli[_0x131c13(0x89)]);break;}case'logs':{cli[_0x131c13(0x89)][_0x131c13(0xa7)]?clearLogs():showLogs();break;}default:render(a32_0x2be163(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x67d1b4,_0x7fba7c){const _0x80439e=a32_0x5db1,_0x36499b=_0x67d1b4();while(!![]){try{const _0x5254e8=parseInt(_0x80439e(0x1e2))/0x1+parseInt(_0x80439e(0x1d9))/0x2+-parseInt(_0x80439e(0x1dc))/0x3+parseInt(_0x80439e(0x1e7))/0x4+parseInt(_0x80439e(0x1e9))/0x5*(-parseInt(_0x80439e(0x1dd))/0x6)+parseInt(_0x80439e(0x1e8))/0x7*(-parseInt(_0x80439e(0x1e3))/0x8)+-parseInt(_0x80439e(0x1db))/0x9*(-parseInt(_0x80439e(0x1e5))/0xa);if(_0x5254e8===_0x7fba7c)break;else _0x36499b['push'](_0x36499b['shift']());}catch(_0x397624){_0x36499b['push'](_0x36499b['shift']());}}}(a32_0x4e07,0xdf402));import{spawn}from'node:child_process';function a32_0x5db1(_0x550bca,_0x41880d){_0x550bca=_0x550bca-0x1d7;const _0x4e073e=a32_0x4e07();let _0x5db100=_0x4e073e[_0x550bca];return _0x5db100;}function a32_0x4e07(){const _0x25f379=['6563896cxrioz','7xCKpwq','1205BZCzor','.bin','inherit','200636xMWRDe','env','7481736jSDYek','1406490UCvqsd','35634HsTKwm','npm\x20run\x20build\x20exited\x20with\x20code\x20','error','PATH','close','1709788bHoMiU','11742568ARWYWW','node_modules','10GJgFPe','vite'];a32_0x4e07=function(){return _0x25f379;};return a32_0x4e07();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x1a01f8,_0x5d6ad4)=>{const _0x52c6c4=a32_0x5db1,_0x8b247f=spawn(_0x52c6c4(0x1e6),['build','--watch'],{'stdio':_0x52c6c4(0x1d8),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x52c6c4(0x1e4),_0x52c6c4(0x1d7))+delimiter+process[_0x52c6c4(0x1da)][_0x52c6c4(0x1e0)]}});_0x8b247f['on'](_0x52c6c4(0x1e1),_0x2a5bbb=>{const _0x502047=_0x52c6c4;if(_0x2a5bbb===0x0||_0x2a5bbb===null)_0x1a01f8();else _0x5d6ad4(new Error(_0x502047(0x1de)+_0x2a5bbb));}),_0x8b247f['on'](_0x52c6c4(0x1df),_0x5d6ad4);});}
1
+ (function(_0x5005ce,_0x366db5){const _0x1b5fa2=a33_0x1ffe,_0x2716e4=_0x5005ce();while(!![]){try{const _0x1b9d57=parseInt(_0x1b5fa2(0x14e))/0x1*(parseInt(_0x1b5fa2(0x13e))/0x2)+-parseInt(_0x1b5fa2(0x144))/0x3*(parseInt(_0x1b5fa2(0x14f))/0x4)+-parseInt(_0x1b5fa2(0x14c))/0x5+-parseInt(_0x1b5fa2(0x147))/0x6*(parseInt(_0x1b5fa2(0x143))/0x7)+parseInt(_0x1b5fa2(0x141))/0x8+-parseInt(_0x1b5fa2(0x140))/0x9+parseInt(_0x1b5fa2(0x149))/0xa;if(_0x1b9d57===_0x366db5)break;else _0x2716e4['push'](_0x2716e4['shift']());}catch(_0x4dc18e){_0x2716e4['push'](_0x2716e4['shift']());}}}(a33_0x1e1a,0x447f8));function a33_0x1e1a(){const _0xeb9913=['build','226802SsPHHO','cwd','4730355mHZIDu','4435920tvWcZd','env','14RCwKpx','2793kqrsYF','npm\x20run\x20build\x20exited\x20with\x20code\x20','error','607182uwURGd','close','7429900HMzBqv','vite','.bin','1474485yBRZIm','--watch','3qLJPBM','1436YCVTxE'];a33_0x1e1a=function(){return _0xeb9913;};return a33_0x1e1a();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a33_0x1ffe(_0x1c1394,_0xa430f5){_0x1c1394=_0x1c1394-0x13d;const _0x1e1a45=a33_0x1e1a();let _0x1ffea8=_0x1e1a45[_0x1c1394];return _0x1ffea8;}export function runBuildWatch(){return new Promise((_0x1bd310,_0x327e0e)=>{const _0xb35c26=a33_0x1ffe,_0x2ace3c=spawn(_0xb35c26(0x14a),[_0xb35c26(0x13d),_0xb35c26(0x14d)],{'stdio':'inherit','shell':!![],'env':{...process[_0xb35c26(0x142)],'PATH':''+join(process[_0xb35c26(0x13f)](),'node_modules',_0xb35c26(0x14b))+delimiter+process[_0xb35c26(0x142)]['PATH']}});_0x2ace3c['on'](_0xb35c26(0x148),_0x512c44=>{const _0x35f428=_0xb35c26;if(_0x512c44===0x0||_0x512c44===null)_0x1bd310();else _0x327e0e(new Error(_0x35f428(0x145)+_0x512c44));}),_0x2ace3c['on'](_0xb35c26(0x146),_0x327e0e);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x38ea07,_0x4a086e){const _0x31f7e9=a33_0x4af5,_0x3c7936=_0x38ea07();while(!![]){try{const _0xc16858=parseInt(_0x31f7e9(0x1d2))/0x1*(parseInt(_0x31f7e9(0x1d6))/0x2)+parseInt(_0x31f7e9(0x1ba))/0x3+parseInt(_0x31f7e9(0x1c8))/0x4+parseInt(_0x31f7e9(0x1d3))/0x5*(parseInt(_0x31f7e9(0x1d9))/0x6)+-parseInt(_0x31f7e9(0x1c7))/0x7*(-parseInt(_0x31f7e9(0x1cc))/0x8)+-parseInt(_0x31f7e9(0x1ca))/0x9*(-parseInt(_0x31f7e9(0x1ce))/0xa)+-parseInt(_0x31f7e9(0x1c3))/0xb;if(_0xc16858===_0x4a086e)break;else _0x3c7936['push'](_0x3c7936['shift']());}catch(_0x32806d){_0x3c7936['push'](_0x3c7936['shift']());}}}(a33_0x8247,0x71c5f));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a33_0x4af5(_0x43dd5c,_0x4d8716){_0x43dd5c=_0x43dd5c-0x1ba;const _0x8247c5=a33_0x8247();let _0x4af505=_0x8247c5[_0x43dd5c];return _0x4af505;}function a33_0x8247(){const _0xe90210=['success','4897277okSXEh','748564HlNuVN','cwd','315NfnjHy','npm\x20run\x20build','8IGrNZG','pipe','58250JSwCCQ','inherit','toString','close','498cclMJs','2822760xXvaaX','node_modules','trim','2108RwIbtF','开始构建项目','error','6tyFFgv','now','npm','962493WDaZyG','build','data','stderr','npm\x20run\x20build\x20exited\x20with\x20code\x20','项目构建出错','env','info','项目构建成功','22383757UyVGJv','项目构建失败','run'];a33_0x8247=function(){return _0xe90210;};return a33_0x8247();}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x478486,_0x534312)=>{const _0x3f82cc=a33_0x4af5,_0x4132ff=Date[_0x3f82cc(0x1da)]();logger[_0x3f82cc(0x1c1)](_0x3f82cc(0x1bb),_0x3f82cc(0x1d7),{'command':_0x3f82cc(0x1cb)});let _0x31ae75='';const _0x149384=spawn(_0x3f82cc(0x1db),[_0x3f82cc(0x1c5),_0x3f82cc(0x1bb)],{'stdio':[_0x3f82cc(0x1cf),_0x3f82cc(0x1cf),_0x3f82cc(0x1cd)],'shell':!![],'env':{...process[_0x3f82cc(0x1c0)],'PATH':''+join(process['cwd'](),_0x3f82cc(0x1d4),'.bin')+delimiter+process['env']['PATH']}});_0x149384[_0x3f82cc(0x1bd)]?.['on'](_0x3f82cc(0x1bc),_0x2ab142=>{const _0x44b5c7=_0x3f82cc;_0x31ae75+=_0x2ab142[_0x44b5c7(0x1d0)]();}),_0x149384['on'](_0x3f82cc(0x1d1),_0x35ad3b=>{const _0x143e11=_0x3f82cc,_0x5b8608=Date[_0x143e11(0x1da)]()-_0x4132ff;if(_0x35ad3b===0x0||_0x35ad3b===null)logger[_0x143e11(0x1c6)](_0x143e11(0x1bb),_0x143e11(0x1c2),_0x5b8608),_0x478486();else{const _0x14ebc8={'exitCode':_0x35ad3b,'duration':_0x5b8608,'command':'npm\x20run\x20build','cwd':process[_0x143e11(0x1c9)]()};_0x31ae75[_0x143e11(0x1d5)]()&&(_0x14ebc8[_0x143e11(0x1bd)]=_0x31ae75[_0x143e11(0x1d5)]()),logger[_0x143e11(0x1d8)](_0x143e11(0x1bb),_0x143e11(0x1c4),_0x14ebc8),_0x534312(new Error(_0x143e11(0x1be)+_0x35ad3b));}}),_0x149384['on'](_0x3f82cc(0x1d8),_0x391099=>{const _0xc36c88=_0x3f82cc,_0x28c89c=Date[_0xc36c88(0x1da)]()-_0x4132ff;logger['error'](_0xc36c88(0x1bb),_0xc36c88(0x1bf),{'error':_0x391099['message'],'duration':_0x28c89c,'stderr':_0x31ae75[_0xc36c88(0x1d5)]()||undefined}),_0x534312(_0x391099);});});}
1
+ (function(_0x144448,_0xcbd4d4){const _0x34fde0=a34_0x197f,_0x2fc00d=_0x144448();while(!![]){try{const _0x5a8fba=-parseInt(_0x34fde0(0x12f))/0x1*(parseInt(_0x34fde0(0x143))/0x2)+parseInt(_0x34fde0(0x142))/0x3+-parseInt(_0x34fde0(0x147))/0x4*(-parseInt(_0x34fde0(0x13c))/0x5)+-parseInt(_0x34fde0(0x13a))/0x6*(-parseInt(_0x34fde0(0x139))/0x7)+parseInt(_0x34fde0(0x13f))/0x8*(-parseInt(_0x34fde0(0x14f))/0x9)+parseInt(_0x34fde0(0x146))/0xa*(parseInt(_0x34fde0(0x145))/0xb)+parseInt(_0x34fde0(0x138))/0xc;if(_0x5a8fba===_0xcbd4d4)break;else _0x2fc00d['push'](_0x2fc00d['shift']());}catch(_0x4f1266){_0x2fc00d['push'](_0x2fc00d['shift']());}}}(a34_0x11e5,0x9f611));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a34_0x11e5(){const _0x904776=['4gHynlU','build','now','项目构建失败','.bin','run','项目构建出错','npm\x20run\x20build','9RFsLxU','success','1melBFy','error','toString','开始构建项目','inherit','node_modules','pipe','info','data','1635480PVaPiH','7aPmjyd','138678ROiziE','message','2178345NmDgdI','stderr','close','3975944aqBVPd','cwd','trim','1830174NjrByK','1813588sZmtIx','npm','143MBXWhC','654980CXslcR'];a34_0x11e5=function(){return _0x904776;};return a34_0x11e5();}import{logger}from'../utils/logger.js';function a34_0x197f(_0x49d119,_0x5a1b08){_0x49d119=_0x49d119-0x12e;const _0x11e59d=a34_0x11e5();let _0x197f3a=_0x11e59d[_0x49d119];return _0x197f3a;}export function runBuild(){return new Promise((_0x41c4d1,_0x26c58b)=>{const _0x100798=a34_0x197f,_0x42c127=Date['now']();logger[_0x100798(0x136)](_0x100798(0x148),_0x100798(0x132),{'command':_0x100798(0x14e)});let _0x13fcb6='';const _0x1d5432=spawn(_0x100798(0x144),[_0x100798(0x14c),_0x100798(0x148)],{'stdio':[_0x100798(0x133),_0x100798(0x133),_0x100798(0x135)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x100798(0x140)](),_0x100798(0x134),_0x100798(0x14b))+delimiter+process['env']['PATH']}});_0x1d5432[_0x100798(0x13d)]?.['on'](_0x100798(0x137),_0x2c2790=>{const _0x7bcc05=_0x100798;_0x13fcb6+=_0x2c2790[_0x7bcc05(0x131)]();}),_0x1d5432['on'](_0x100798(0x13e),_0x13a6e0=>{const _0xc8390b=_0x100798,_0x3f5606=Date[_0xc8390b(0x149)]()-_0x42c127;if(_0x13a6e0===0x0||_0x13a6e0===null)logger[_0xc8390b(0x12e)](_0xc8390b(0x148),'项目构建成功',_0x3f5606),_0x41c4d1();else{const _0x2e7da0={'exitCode':_0x13a6e0,'duration':_0x3f5606,'command':_0xc8390b(0x14e),'cwd':process[_0xc8390b(0x140)]()};_0x13fcb6['trim']()&&(_0x2e7da0['stderr']=_0x13fcb6[_0xc8390b(0x141)]()),logger[_0xc8390b(0x130)](_0xc8390b(0x148),_0xc8390b(0x14a),_0x2e7da0),_0x26c58b(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x13a6e0));}}),_0x1d5432['on']('error',_0xb321df=>{const _0x91af3c=_0x100798,_0x5b4c66=Date[_0x91af3c(0x149)]()-_0x42c127;logger[_0x91af3c(0x130)](_0x91af3c(0x148),_0x91af3c(0x14d),{'error':_0xb321df[_0x91af3c(0x13b)],'duration':_0x5b4c66,'stderr':_0x13fcb6[_0x91af3c(0x141)]()||undefined}),_0x26c58b(_0xb321df);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function a34_0x5f93(){const _0x5dc155=['2581824XQkifr','readLogs','*\x20日志已清空','47588nsXiZJ','error','toLocaleString','length','3cMDDOB','level','6zakcMG','command','20331VWkmOv','forEach','success','details','\x20\x20\x20时间:\x20','clearLogs','3052856kBECiB','8666EMnTMb','1011165HuasnA','log','61PPhDat','cwd','keys','6117920ZnWhSB','duration','\x20\x20\x20详情:\x20','timestamp','setLogPath'];a34_0x5f93=function(){return _0x5dc155;};return a34_0x5f93();}(function(_0x5a9ebb,_0x9ec8b4){const _0xbd6ad8=a34_0x449b,_0x5b738a=_0x5a9ebb();while(!![]){try{const _0x2cfe2e=-parseInt(_0xbd6ad8(0xfd))/0x1*(-parseInt(_0xbd6ad8(0xfa))/0x2)+-parseInt(_0xbd6ad8(0xef))/0x3*(-parseInt(_0xbd6ad8(0xeb))/0x4)+parseInt(_0xbd6ad8(0xfb))/0x5*(-parseInt(_0xbd6ad8(0xf1))/0x6)+parseInt(_0xbd6ad8(0xe8))/0x7+parseInt(_0xbd6ad8(0xf9))/0x8+-parseInt(_0xbd6ad8(0xf3))/0x9+-parseInt(_0xbd6ad8(0xe3))/0xa;if(_0x2cfe2e===_0x9ec8b4)break;else _0x5b738a['push'](_0x5b738a['shift']());}catch(_0x131f7a){_0x5b738a['push'](_0x5b738a['shift']());}}}(a34_0x5f93,0x335bd));import{logger}from'../utils/logger.js';function a34_0x449b(_0x5c3516,_0x4470c8){_0x5c3516=_0x5c3516-0xe3;const _0x5f93cb=a34_0x5f93();let _0x449b91=_0x5f93cb[_0x5c3516];return _0x449b91;}export function showLogs(){const _0x568968=a34_0x449b;logger[_0x568968(0xe7)](process[_0x568968(0xfe)]());const _0x2cb040=logger[_0x568968(0xe9)]();if(_0x2cb040['length']===0x0){console['log']('*\x20暂无日志记录');return;}console[_0x568968(0xfc)]('*\x20Lovrabet\x20CLI\x20日志记录:\x0a'),_0x2cb040[_0x568968(0xf4)]((_0x2c37fc,_0x47ce09)=>{const _0x4b49a5=_0x568968,_0x6eaf27=new Date(_0x2c37fc[_0x4b49a5(0xe6)])[_0x4b49a5(0xed)]('zh-CN'),_0x223247=_0x2c37fc['level']===_0x4b49a5(0xf5)?'√':_0x2c37fc[_0x4b49a5(0xf0)]===_0x4b49a5(0xec)?'×':_0x2c37fc[_0x4b49a5(0xf0)]==='warn'?'!':'i';console[_0x4b49a5(0xfc)](_0x47ce09+0x1+'.\x20'+_0x223247+'\x20['+_0x2c37fc[_0x4b49a5(0xf2)]+']\x20'+_0x2c37fc['message']),console[_0x4b49a5(0xfc)](_0x4b49a5(0xf7)+_0x6eaf27),_0x2c37fc[_0x4b49a5(0xe4)]&&console['log']('\x20\x20\x20耗时:\x20'+_0x2c37fc['duration']+'ms'),_0x2c37fc[_0x4b49a5(0xf6)]&&Object[_0x4b49a5(0xff)](_0x2c37fc['details'])[_0x4b49a5(0xee)]>0x0&&console[_0x4b49a5(0xfc)](_0x4b49a5(0xe5)+JSON['stringify'](_0x2c37fc[_0x4b49a5(0xf6)],null,0x2)),console[_0x4b49a5(0xfc)]('');});}export function clearLogs(){const _0x1e7d6b=a34_0x449b;logger[_0x1e7d6b(0xe7)](process[_0x1e7d6b(0xfe)]()),logger[_0x1e7d6b(0xf8)](),console[_0x1e7d6b(0xfc)](_0x1e7d6b(0xea));}
1
+ (function(_0x34a563,_0x530557){const _0xb423d1=a35_0x3751,_0x5390cb=_0x34a563();while(!![]){try{const _0x3a5ec0=parseInt(_0xb423d1(0x19a))/0x1+-parseInt(_0xb423d1(0x195))/0x2*(-parseInt(_0xb423d1(0x19d))/0x3)+-parseInt(_0xb423d1(0x1a0))/0x4+-parseInt(_0xb423d1(0x18c))/0x5+-parseInt(_0xb423d1(0x192))/0x6+-parseInt(_0xb423d1(0x18e))/0x7+parseInt(_0xb423d1(0x19c))/0x8;if(_0x3a5ec0===_0x530557)break;else _0x5390cb['push'](_0x5390cb['shift']());}catch(_0x5399cc){_0x5390cb['push'](_0x5390cb['shift']());}}}(a35_0x57a2,0x4a03d));import{logger}from'../utils/logger.js';function a35_0x3751(_0x294ce1,_0xd70050){_0x294ce1=_0x294ce1-0x18a;const _0x57a252=a35_0x57a2();let _0x3751c8=_0x57a252[_0x294ce1];return _0x3751c8;}export function showLogs(){const _0x5561c1=a35_0x3751;logger[_0x5561c1(0x191)](process[_0x5561c1(0x19b)]());const _0x9443c9=logger['readLogs']();if(_0x9443c9[_0x5561c1(0x1a2)]===0x0){console['log'](_0x5561c1(0x18d));return;}console[_0x5561c1(0x18f)](_0x5561c1(0x198)),_0x9443c9[_0x5561c1(0x1a1)]((_0x51f608,_0x18cb28)=>{const _0x41e023=_0x5561c1,_0x3afe30=new Date(_0x51f608['timestamp'])['toLocaleString']('zh-CN'),_0x2f3a54=_0x51f608[_0x41e023(0x19e)]===_0x41e023(0x193)?'√':_0x51f608[_0x41e023(0x19e)]==='error'?'×':_0x51f608[_0x41e023(0x19e)]===_0x41e023(0x18a)?'!':'i';console[_0x41e023(0x18f)](_0x18cb28+0x1+'.\x20'+_0x2f3a54+'\x20['+_0x51f608[_0x41e023(0x18b)]+']\x20'+_0x51f608[_0x41e023(0x196)]),console[_0x41e023(0x18f)]('\x20\x20\x20时间:\x20'+_0x3afe30),_0x51f608['duration']&&console['log'](_0x41e023(0x190)+_0x51f608[_0x41e023(0x194)]+'ms'),_0x51f608['details']&&Object[_0x41e023(0x199)](_0x51f608[_0x41e023(0x1a3)])['length']>0x0&&console[_0x41e023(0x18f)](_0x41e023(0x19f)+JSON['stringify'](_0x51f608[_0x41e023(0x1a3)],null,0x2)),console[_0x41e023(0x18f)]('');});}export function clearLogs(){const _0x3e5b2f=a35_0x3751;logger['setLogPath'](process[_0x3e5b2f(0x19b)]()),logger[_0x3e5b2f(0x197)](),console['log']('*\x20日志已清空');}function a35_0x57a2(){const _0x5042fb=['\x20\x20\x20详情:\x20','335628xLmTnP','forEach','length','details','warn','command','254035KnrUzl','*\x20暂无日志记录','2865933MGpbgg','log','\x20\x20\x20耗时:\x20','setLogPath','2914182HpnEmq','success','duration','66NXGCqC','message','clearLogs','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','keys','525296oDfLSO','cwd','4453344blIsjT','22821zkaqpA','level'];a35_0x57a2=function(){return _0x5042fb;};return a35_0x57a2();}
@@ -1 +1 @@
1
- (function(_0x4a6561,_0x2aa9ff){const _0xfb0a52=a35_0x2c49,_0x240174=_0x4a6561();while(!![]){try{const _0x2121b8=-parseInt(_0xfb0a52(0xdd))/0x1+parseInt(_0xfb0a52(0xd7))/0x2*(parseInt(_0xfb0a52(0xe5))/0x3)+-parseInt(_0xfb0a52(0xd6))/0x4*(-parseInt(_0xfb0a52(0xd9))/0x5)+parseInt(_0xfb0a52(0xe6))/0x6+-parseInt(_0xfb0a52(0xe2))/0x7+parseInt(_0xfb0a52(0xd8))/0x8+parseInt(_0xfb0a52(0xe7))/0x9;if(_0x2121b8===_0x2aa9ff)break;else _0x240174['push'](_0x240174['shift']());}catch(_0x59a47b){_0x240174['push'](_0x240174['shift']());}}}(a35_0x243f,0x72939));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a35_0x243f(){const _0x190d10=['6330592NpSIpr','38000QuXNFe','stderr','success','启动预览服务器','737752omCHrE','预览服务器启动成功','inherit','info','preview','3988229kSKIhx','PATH','预览服务器启动失败','27Tmwsya','2579556TsqPlj','2346876dDzFwP','now','trim','vite\x20preview\x20exited\x20with\x20code\x20','data','预览服务器启动出错','close','.bin','error','env','4wYNPSS','63820ZPpbMI'];a35_0x243f=function(){return _0x190d10;};return a35_0x243f();}import{logger}from'../utils/logger.js';function a35_0x2c49(_0x5ba76b,_0x56de42){_0x5ba76b=_0x5ba76b-0xd3;const _0x243fb0=a35_0x243f();let _0x2c49b2=_0x243fb0[_0x5ba76b];return _0x2c49b2;}export function runPreview(){return new Promise((_0x565e93,_0x4e4ea4)=>{const _0x412f9d=a35_0x2c49,_0x3ed397=Date[_0x412f9d(0xe8)]();logger[_0x412f9d(0xe0)](_0x412f9d(0xe1),_0x412f9d(0xdc),{'command':'vite\x20preview'});let _0x558c17='';const _0x128145=spawn('vite',['preview'],{'stdio':[_0x412f9d(0xdf),_0x412f9d(0xdf),'pipe'],'shell':!![],'env':{...process[_0x412f9d(0xd5)],'PATH':''+join(process['cwd'](),'node_modules',_0x412f9d(0xd3))+delimiter+process[_0x412f9d(0xd5)][_0x412f9d(0xe3)]}});_0x128145[_0x412f9d(0xda)]?.['on'](_0x412f9d(0xeb),_0x45122c=>{_0x558c17+=_0x45122c['toString']();}),_0x128145['on'](_0x412f9d(0xed),_0xfada42=>{const _0x2345dc=_0x412f9d,_0x1197c3=Date[_0x2345dc(0xe8)]()-_0x3ed397;if(_0xfada42===0x0||_0xfada42===null)logger[_0x2345dc(0xdb)](_0x2345dc(0xe1),_0x2345dc(0xde),_0x1197c3),_0x565e93();else{const _0x5a7e9b={'exitCode':_0xfada42,'duration':_0x1197c3,'command':'vite\x20preview','cwd':process['cwd']()};_0x558c17['trim']()&&(_0x5a7e9b[_0x2345dc(0xda)]=_0x558c17[_0x2345dc(0xe9)]()),logger[_0x2345dc(0xd4)](_0x2345dc(0xe1),_0x2345dc(0xe4),_0x5a7e9b),_0x4e4ea4(new Error(_0x2345dc(0xea)+_0xfada42));}}),_0x128145['on'](_0x412f9d(0xd4),_0x3dc2f1=>{const _0x149080=_0x412f9d,_0x318b95=Date[_0x149080(0xe8)]()-_0x3ed397;logger[_0x149080(0xd4)](_0x149080(0xe1),_0x149080(0xec),{'error':_0x3dc2f1['message'],'duration':_0x318b95,'stderr':_0x558c17[_0x149080(0xe9)]()||undefined}),_0x4e4ea4(_0x3dc2f1);});});}
1
+ (function(_0x5cb44c,_0x5f5735){const _0x32c8af=a36_0x1a85,_0x405a62=_0x5cb44c();while(!![]){try{const _0x2a6e68=-parseInt(_0x32c8af(0xe2))/0x1+-parseInt(_0x32c8af(0xe5))/0x2+parseInt(_0x32c8af(0xd6))/0x3*(-parseInt(_0x32c8af(0xe3))/0x4)+parseInt(_0x32c8af(0xdc))/0x5+parseInt(_0x32c8af(0xdb))/0x6*(-parseInt(_0x32c8af(0xd2))/0x7)+-parseInt(_0x32c8af(0xcc))/0x8+parseInt(_0x32c8af(0xd8))/0x9;if(_0x2a6e68===_0x5f5735)break;else _0x405a62['push'](_0x405a62['shift']());}catch(_0x12bcfc){_0x405a62['push'](_0x405a62['shift']());}}}(a36_0x42de,0xa1497));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a36_0x42de(){const _0x38d218=['1078980XxlEWb','toString','close','cwd','node_modules','preview','预览服务器启动成功','5301040NXWGXF','vite','info','PATH','pipe','.bin','994LAXDrr','now','vite\x20preview','inherit','73089iJHjZd','error','18316089moEQQH','success','stderr','32106LTmtMs','5406265XUcIQg','trim','message','启动预览服务器','env','data','250151swQCbd','40EEmsQS','预览服务器启动失败'];a36_0x42de=function(){return _0x38d218;};return a36_0x42de();}function a36_0x1a85(_0x1a9bc7,_0x1fb73d){_0x1a9bc7=_0x1a9bc7-0xc9;const _0x42ded2=a36_0x42de();let _0x1a859d=_0x42ded2[_0x1a9bc7];return _0x1a859d;}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x2dca17,_0x32fe47)=>{const _0x4dbb48=a36_0x1a85,_0x6abdc=Date[_0x4dbb48(0xd3)]();logger[_0x4dbb48(0xce)](_0x4dbb48(0xca),_0x4dbb48(0xdf),{'command':_0x4dbb48(0xd4)});let _0x258819='';const _0xa7cce8=spawn(_0x4dbb48(0xcd),['preview'],{'stdio':[_0x4dbb48(0xd5),_0x4dbb48(0xd5),_0x4dbb48(0xd0)],'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x4dbb48(0xc9),_0x4dbb48(0xd1))+delimiter+process[_0x4dbb48(0xe0)][_0x4dbb48(0xcf)]}});_0xa7cce8['stderr']?.['on'](_0x4dbb48(0xe1),_0x2599bb=>{const _0x4bf963=_0x4dbb48;_0x258819+=_0x2599bb[_0x4bf963(0xe6)]();}),_0xa7cce8['on'](_0x4dbb48(0xe7),_0x4e0b76=>{const _0x47a28b=_0x4dbb48,_0x223da6=Date[_0x47a28b(0xd3)]()-_0x6abdc;if(_0x4e0b76===0x0||_0x4e0b76===null)logger[_0x47a28b(0xd9)](_0x47a28b(0xca),_0x47a28b(0xcb),_0x223da6),_0x2dca17();else{const _0x5978ed={'exitCode':_0x4e0b76,'duration':_0x223da6,'command':'vite\x20preview','cwd':process[_0x47a28b(0xe8)]()};_0x258819[_0x47a28b(0xdd)]()&&(_0x5978ed[_0x47a28b(0xda)]=_0x258819[_0x47a28b(0xdd)]()),logger[_0x47a28b(0xd7)](_0x47a28b(0xca),_0x47a28b(0xe4),_0x5978ed),_0x32fe47(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x4e0b76));}}),_0xa7cce8['on'](_0x4dbb48(0xd7),_0x5856a8=>{const _0x38380f=_0x4dbb48,_0x4422b4=Date[_0x38380f(0xd3)]()-_0x6abdc;logger['error'](_0x38380f(0xca),'预览服务器启动出错',{'error':_0x5856a8[_0x38380f(0xde)],'duration':_0x4422b4,'stderr':_0x258819[_0x38380f(0xdd)]()||undefined}),_0x32fe47(_0x5856a8);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- function a36_0x18a6(){const _0x1ed6ac=['3355872BSJnAD','toString','PATH','80XjrMlO','warn','vite','cwd','close','currentVersion','start','375208iTFmoG','2159454OvZmwF','1689303gUyHvk','开发服务器启动出错','success','inherit','stderr','SDK\x20版本有更新','needsUpgrade','now','5SUylwO','env','error','12Ifobxm','开发服务器启动成功','开发服务器启动失败','trim','5360598JKYCtc','node_modules','stableVersion','CLI\x20版本有更新','启动开发服务器','4hzeBeW','177932PJyeLe','version','write','.bin','message','1971678MTvLCo'];a36_0x18a6=function(){return _0x1ed6ac;};return a36_0x18a6();}(function(_0x1d9bd2,_0x1f79a0){const _0x2b52e4=a36_0x4e2c,_0x980914=_0x1d9bd2();while(!![]){try{const _0x464316=-parseInt(_0x2b52e4(0xac))/0x1*(parseInt(_0x2b52e4(0xab))/0x2)+-parseInt(_0x2b52e4(0xb1))/0x3+parseInt(_0x2b52e4(0x95))/0x4*(parseInt(_0x2b52e4(0x9f))/0x5)+parseInt(_0x2b52e4(0xa2))/0x6*(-parseInt(_0x2b52e4(0x97))/0x7)+-parseInt(_0x2b52e4(0xb2))/0x8+parseInt(_0x2b52e4(0xa6))/0x9+parseInt(_0x2b52e4(0x8e))/0xa*(parseInt(_0x2b52e4(0x96))/0xb);if(_0x464316===_0x1f79a0)break;else _0x980914['push'](_0x980914['shift']());}catch(_0x9f910f){_0x980914['push'](_0x980914['shift']());}}}(a36_0x18a6,0x54280));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a36_0x4e2c(_0x4c0c94,_0x4e4118){_0x4c0c94=_0x4c0c94-0x8c;const _0x18a6b4=a36_0x18a6();let _0x4e2c44=_0x18a6b4[_0x4c0c94];return _0x4e2c44;}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x525dc6){const _0x20fbaf=a36_0x4e2c,_0x7f5f35=Date[_0x20fbaf(0x9e)](),_0x2e7e16=_0x525dc6||process[_0x20fbaf(0x91)](),_0x4ec3ab=await checkCliVersion();_0x4ec3ab[_0x20fbaf(0x9d)]&&(printCliUpgradeWarning(_0x4ec3ab),logger[_0x20fbaf(0x8f)](_0x20fbaf(0x94),_0x20fbaf(0xa9),{'currentVersion':_0x4ec3ab[_0x20fbaf(0x93)],'stableVersion':_0x4ec3ab[_0x20fbaf(0xa8)]}));const _0x262c01=await checkSdkVersion(_0x2e7e16);_0x262c01[_0x20fbaf(0x9d)]&&(printSdkUpgradeWarning(_0x262c01),logger[_0x20fbaf(0x8f)](_0x20fbaf(0x94),_0x20fbaf(0x9c),{'currentVersion':_0x262c01[_0x20fbaf(0xad)],'stableVersion':_0x262c01['stableVersion']}));logger['info']('start',_0x20fbaf(0xaa),{'command':'vite','cwd':_0x2e7e16});let _0xe182eb='';const _0x360c9e=spawn('vite',{'stdio':[_0x20fbaf(0x9a),_0x20fbaf(0x9a),'pipe'],'shell':!![],'cwd':_0x2e7e16,'env':{...process['env'],'PATH':''+join(_0x2e7e16,_0x20fbaf(0xa7),_0x20fbaf(0xaf))+delimiter+process[_0x20fbaf(0xa0)][_0x20fbaf(0x8d)]}});return _0x360c9e[_0x20fbaf(0x9b)]?.['on']('data',_0x5d8bdd=>{const _0x3c9275=_0x20fbaf,_0x5b82cf=_0x5d8bdd[_0x3c9275(0x8c)]();_0xe182eb+=_0x5b82cf,process[_0x3c9275(0x9b)][_0x3c9275(0xae)](_0x5b82cf);}),new Promise((_0x1b8bf7,_0x4f0dd2)=>{const _0x2bd50d=_0x20fbaf;_0x360c9e['on'](_0x2bd50d(0x92),_0x1bd835=>{const _0x489c73=_0x2bd50d,_0x5317ef=Date[_0x489c73(0x9e)]()-_0x7f5f35;if(_0x1bd835===0x0||_0x1bd835===null)logger[_0x489c73(0x99)]('start',_0x489c73(0xa3),_0x5317ef),_0x1b8bf7();else{const _0x20d83d={'exitCode':_0x1bd835,'duration':_0x5317ef,'command':'vite','cwd':_0x2e7e16};_0xe182eb[_0x489c73(0xa5)]()&&(_0x20d83d[_0x489c73(0x9b)]=_0xe182eb[_0x489c73(0xa5)]()),logger[_0x489c73(0xa1)](_0x489c73(0x94),_0x489c73(0xa4),_0x20d83d),_0x4f0dd2(new Error('vite\x20exited\x20with\x20code\x20'+_0x1bd835));}}),_0x360c9e['on']('error',_0x74c98a=>{const _0x1f73bf=_0x2bd50d,_0xeee46b=Date[_0x1f73bf(0x9e)]()-_0x7f5f35,_0x3a6680={'error':_0x74c98a[_0x1f73bf(0xb0)],'duration':_0xeee46b,'command':_0x1f73bf(0x90),'cwd':_0x2e7e16};_0xe182eb[_0x1f73bf(0xa5)]()&&(_0x3a6680[_0x1f73bf(0x9b)]=_0xe182eb[_0x1f73bf(0xa5)]()),logger[_0x1f73bf(0xa1)](_0x1f73bf(0x94),_0x1f73bf(0x98),_0x3a6680),_0x4f0dd2(_0x74c98a);});});}
1
+ (function(_0x524d13,_0x5457cf){const _0x42dff8=a37_0x27a6,_0x49e11a=_0x524d13();while(!![]){try{const _0x6dfc14=-parseInt(_0x42dff8(0x1bc))/0x1*(-parseInt(_0x42dff8(0x1a1))/0x2)+-parseInt(_0x42dff8(0x1a6))/0x3+-parseInt(_0x42dff8(0x1a5))/0x4+-parseInt(_0x42dff8(0x1b0))/0x5*(parseInt(_0x42dff8(0x1b9))/0x6)+-parseInt(_0x42dff8(0x1b3))/0x7+parseInt(_0x42dff8(0x1af))/0x8+parseInt(_0x42dff8(0x19d))/0x9*(parseInt(_0x42dff8(0x1ae))/0xa);if(_0x6dfc14===_0x5457cf)break;else _0x49e11a['push'](_0x49e11a['shift']());}catch(_0x2dd94a){_0x49e11a['push'](_0x49e11a['shift']());}}}(a37_0x435a,0x2df82));import{delimiter,join}from'node:path';function a37_0x27a6(_0x178909,_0x41e74b){_0x178909=_0x178909-0x19a;const _0x435a3f=a37_0x435a();let _0x27a6f5=_0x435a3f[_0x178909];return _0x27a6f5;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a37_0x435a(){const _0x1cd67e=['start','58059ackOGf','开发服务器启动成功','开发服务器启动失败','write','113732xaakoI','success','data','toString','1141412HFNIzj','534456haJacC','inherit','vite\x20exited\x20with\x20code\x20','env','node_modules','message','needsUpgrade','version','810OqTWYy','1713848tgRxgm','110JPbAya','SDK\x20版本有更新','pipe','502691RlJgyr','now','PATH','error','vite','启动开发服务器','81132jTvrhm','trim','.bin','5vLEDxH','currentVersion','开发服务器启动出错','stableVersion'];a37_0x435a=function(){return _0x1cd67e;};return a37_0x435a();}export async function runStart(_0x1ddaa1){const _0x284e50=a37_0x27a6,_0x130983=Date[_0x284e50(0x1b4)](),_0x4d9b87=_0x1ddaa1||process['cwd'](),_0x515182=await checkCliVersion();_0x515182[_0x284e50(0x1ac)]&&(printCliUpgradeWarning(_0x515182),logger['warn'](_0x284e50(0x19c),'CLI\x20版本有更新',{'currentVersion':_0x515182[_0x284e50(0x1bd)],'stableVersion':_0x515182[_0x284e50(0x19b)]}));const _0xf39fcd=await checkSdkVersion(_0x4d9b87);_0xf39fcd['needsUpgrade']&&(printSdkUpgradeWarning(_0xf39fcd),logger['warn']('start',_0x284e50(0x1b1),{'currentVersion':_0xf39fcd[_0x284e50(0x1ad)],'stableVersion':_0xf39fcd[_0x284e50(0x19b)]}));logger['info']('start',_0x284e50(0x1b8),{'command':_0x284e50(0x1b7),'cwd':_0x4d9b87});let _0x11f212='';const _0x5a6e9f=spawn(_0x284e50(0x1b7),{'stdio':[_0x284e50(0x1a7),_0x284e50(0x1a7),_0x284e50(0x1b2)],'shell':!![],'cwd':_0x4d9b87,'env':{...process[_0x284e50(0x1a9)],'PATH':''+join(_0x4d9b87,_0x284e50(0x1aa),_0x284e50(0x1bb))+delimiter+process['env'][_0x284e50(0x1b5)]}});return _0x5a6e9f['stderr']?.['on'](_0x284e50(0x1a3),_0x33e638=>{const _0x36d32e=_0x284e50,_0x51163e=_0x33e638[_0x36d32e(0x1a4)]();_0x11f212+=_0x51163e,process['stderr'][_0x36d32e(0x1a0)](_0x51163e);}),new Promise((_0x52dd41,_0x2d997f)=>{const _0x590a60=_0x284e50;_0x5a6e9f['on']('close',_0x60f009=>{const _0x46af7f=a37_0x27a6,_0x3e5a60=Date['now']()-_0x130983;if(_0x60f009===0x0||_0x60f009===null)logger[_0x46af7f(0x1a2)](_0x46af7f(0x19c),_0x46af7f(0x19e),_0x3e5a60),_0x52dd41();else{const _0x30d071={'exitCode':_0x60f009,'duration':_0x3e5a60,'command':_0x46af7f(0x1b7),'cwd':_0x4d9b87};_0x11f212[_0x46af7f(0x1ba)]()&&(_0x30d071['stderr']=_0x11f212[_0x46af7f(0x1ba)]()),logger[_0x46af7f(0x1b6)](_0x46af7f(0x19c),_0x46af7f(0x19f),_0x30d071),_0x2d997f(new Error(_0x46af7f(0x1a8)+_0x60f009));}}),_0x5a6e9f['on'](_0x590a60(0x1b6),_0x348bfe=>{const _0x440f38=_0x590a60,_0x4b6e21=Date[_0x440f38(0x1b4)]()-_0x130983,_0x57b40d={'error':_0x348bfe[_0x440f38(0x1ab)],'duration':_0x4b6e21,'command':'vite','cwd':_0x4d9b87};_0x11f212['trim']()&&(_0x57b40d['stderr']=_0x11f212[_0x440f38(0x1ba)]()),logger[_0x440f38(0x1b6)]('start',_0x440f38(0x19a),_0x57b40d),_0x2d997f(_0x348bfe);});});}
@@ -1 +1 @@
1
- function a37_0x48aa(){const _0x33fb16=['\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','设置环境\x20(online/daily)','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','2162881zSMvXX','206YXpEhH','map','description','3335695cybQoz','列出所有配置项','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','设置配置项','7087914xxNMHg','16509mIMIjb','529060DGSqDl','获取配置项','\x20*\x20配置示例:','gray','配置当前项目的\x20App\x20Code','662980UdXcJo','7191688Vwmrjl'];a37_0x48aa=function(){return _0x33fb16;};return a37_0x48aa();}(function(_0x158d72,_0x4504a6){const _0x457b4b=a37_0x5219,_0x3ccc0a=_0x158d72();while(!![]){try{const _0x230f65=-parseInt(_0x457b4b(0x117))/0x1+-parseInt(_0x457b4b(0x109))/0x2*(parseInt(_0x457b4b(0x111))/0x3)+parseInt(_0x457b4b(0x112))/0x4+-parseInt(_0x457b4b(0x10c))/0x5+parseInt(_0x457b4b(0x110))/0x6+parseInt(_0x457b4b(0x108))/0x7+parseInt(_0x457b4b(0x102))/0x8;if(_0x230f65===_0x4504a6)break;else _0x3ccc0a['push'](_0x3ccc0a['shift']());}catch(_0xf187fe){_0x3ccc0a['push'](_0x3ccc0a['shift']());}}}(a37_0x48aa,0x987d8));function a37_0x5219(_0x449b6d,_0x24bd76){_0x449b6d=_0x449b6d-0x102;const _0x48aa47=a37_0x48aa();let _0x521929=_0x48aa47[_0x449b6d];return _0x521929;}import{jsxs as a37_0x191f67,jsx as a37_0x248be6}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x4fca9b=a37_0x5219,_0x3843e6=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x4fca9b(0x10f)},{'command':_0x4fca9b(0x10e),'description':_0x4fca9b(0x113)},{'command':_0x4fca9b(0x104),'description':_0x4fca9b(0x10d)}],_0x26131a=[{'command':_0x4fca9b(0x107),'description':_0x4fca9b(0x116)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x4fca9b(0x106)}];return a37_0x191f67(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a37_0x248be6(Box,{'marginBottom':0x1,'children':a37_0x191f67(Text,{'color':_0x4fca9b(0x115),'children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x3843e6[_0x4fca9b(0x10a)](_0x243ec3=>a37_0x191f67(Box,{'children':[a37_0x191f67(Text,{'children':[_0x4fca9b(0x103),_0x243ec3[_0x4fca9b(0x105)]]}),a37_0x248be6(Text,{'color':_0x4fca9b(0x115),'children':_0x243ec3['description']})]},_0x243ec3[_0x4fca9b(0x105)])),a37_0x248be6(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a37_0x248be6(Text,{'color':_0x4fca9b(0x115),'children':_0x4fca9b(0x114)})}),_0x26131a['map'](_0x50d1d3=>a37_0x191f67(Box,{'children':[a37_0x191f67(Text,{'children':[_0x4fca9b(0x103),_0x50d1d3['command']]}),a37_0x248be6(Text,{'color':_0x4fca9b(0x115),'children':_0x50d1d3[_0x4fca9b(0x10b)]})]},_0x50d1d3[_0x4fca9b(0x105)]))]});}
1
+ (function(_0x558268,_0x30b340){const _0x173a89=a38_0x4405,_0x7d356=_0x558268();while(!![]){try{const _0x4a3bcd=parseInt(_0x173a89(0x11e))/0x1*(-parseInt(_0x173a89(0x122))/0x2)+parseInt(_0x173a89(0x123))/0x3*(parseInt(_0x173a89(0x130))/0x4)+-parseInt(_0x173a89(0x11c))/0x5*(-parseInt(_0x173a89(0x12d))/0x6)+parseInt(_0x173a89(0x12e))/0x7+parseInt(_0x173a89(0x12b))/0x8+-parseInt(_0x173a89(0x125))/0x9+parseInt(_0x173a89(0x11b))/0xa*(-parseInt(_0x173a89(0x124))/0xb);if(_0x4a3bcd===_0x30b340)break;else _0x7d356['push'](_0x7d356['shift']());}catch(_0x33a346){_0x7d356['push'](_0x7d356['shift']());}}}(a38_0x48b2,0x87411));import{jsxs as a38_0x327f15,jsx as a38_0x1b84e0}from'react/jsx-runtime';function a38_0x4405(_0x268fa5,_0x295d5e){_0x268fa5=_0x268fa5-0x11b;const _0x48b21c=a38_0x48b2();let _0x440521=_0x48b21c[_0x268fa5];return _0x440521;}import{Box,Text}from'ink';function a38_0x48b2(){const _0x53af5c=['lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','列出所有配置项','gray','2GzEbWm','12YgBZnd','10738959EQtyBa','1263024LNXwGA','command','map','column','设置环境\x20(online/daily)','获取配置项','4744232LBPSvo','无效的命令,可用命令如下:','4614348Riahry','1683976drxaMw','配置当前项目的\x20App\x20Code','634324EDWbhH','10wMgWfD','5xRzwMi','\x20\x20\x20\x20','566373zdAzUx'];a38_0x48b2=function(){return _0x53af5c;};return a38_0x48b2();}export function ConfigHelp(){const _0x51c746=a38_0x4405,_0x59e5de=[{'command':_0x51c746(0x11f),'description':'设置配置项'},{'command':'lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x51c746(0x12a)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x51c746(0x120)}],_0x37d55f=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x51c746(0x12f)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x51c746(0x129)}];return a38_0x327f15(Box,{'flexDirection':_0x51c746(0x128),'marginTop':0x1,'marginBottom':0x1,'children':[a38_0x1b84e0(Box,{'marginBottom':0x1,'children':a38_0x327f15(Text,{'color':_0x51c746(0x121),'children':['\x20!','\x20\x20',_0x51c746(0x12c)]})}),_0x59e5de[_0x51c746(0x127)](_0x740032=>a38_0x327f15(Box,{'children':[a38_0x327f15(Text,{'children':['\x20\x20\x20\x20',_0x740032[_0x51c746(0x126)]]}),a38_0x1b84e0(Text,{'color':_0x51c746(0x121),'children':_0x740032['description']})]},_0x740032[_0x51c746(0x126)])),a38_0x1b84e0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a38_0x1b84e0(Text,{'color':_0x51c746(0x121),'children':'\x20*\x20配置示例:'})}),_0x37d55f['map'](_0x4512bb=>a38_0x327f15(Box,{'children':[a38_0x327f15(Text,{'children':[_0x51c746(0x11d),_0x4512bb[_0x51c746(0x126)]]}),a38_0x1b84e0(Text,{'color':_0x51c746(0x121),'children':_0x4512bb['description']})]},_0x4512bb[_0x51c746(0x126)]))]});}
@@ -1 +1 @@
1
- (function(_0x400ab8,_0x2600bd){const _0x3ba1f8=a38_0x1ace,_0x1b5327=_0x400ab8();while(!![]){try{const _0x514b09=-parseInt(_0x3ba1f8(0x11a))/0x1+-parseInt(_0x3ba1f8(0x11b))/0x2*(-parseInt(_0x3ba1f8(0x119))/0x3)+-parseInt(_0x3ba1f8(0x131))/0x4*(-parseInt(_0x3ba1f8(0x128))/0x5)+-parseInt(_0x3ba1f8(0x137))/0x6+parseInt(_0x3ba1f8(0x13c))/0x7*(parseInt(_0x3ba1f8(0x127))/0x8)+parseInt(_0x3ba1f8(0x115))/0x9*(parseInt(_0x3ba1f8(0x116))/0xa)+-parseInt(_0x3ba1f8(0x133))/0xb;if(_0x514b09===_0x2600bd)break;else _0x1b5327['push'](_0x1b5327['shift']());}catch(_0xe82209){_0x1b5327['push'](_0x1b5327['shift']());}}}(a38_0x581d,0x36b5e));import{jsx as a38_0x4d2654,jsxs as a38_0x3ce473}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a38_0x464518 from'node:fs';import a38_0x44593a from'node:path';function a38_0x581d(){const _0x5bd194=['red','app','配置值无效或过长','14YRyWzl','9gSmxHK','1597070Fiyjjf','message','error','96BKKaLr','27460czRVRI','23994YFgSXD','stringify','daily','string','环境配置已设置为:\x20','dirname','parse','flags','.tmp','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','保存配置失败','includes','1440856GUicng','660MiPZYi','online','get','log','help','length','list','input','config','1588fHCweu','env','6843441TEKeof','undefined','保存配置失败:\x20','appcode','495264YYfALb','utf8'];a38_0x581d=function(){return _0x5bd194;};return a38_0x581d();}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a38_0x1ace(_0x2ec58d,_0x29c4bb){_0x2ec58d=_0x2ec58d-0x115;const _0x581d3d=a38_0x581d();let _0x1ace7e=_0x581d3d[_0x2ec58d];return _0x1ace7e;}import{logger}from'../utils/logger.js';export function Config(_0x33388f){const _0x5d7c82=a38_0x1ace,{cli:_0x1e3bb6}=_0x33388f,_0x4f1bd1=_0x1e3bb6[_0x5d7c82(0x12f)][0x1],_0x220aa3=_0x1e3bb6[_0x5d7c82(0x12f)][0x2],_0x189d7b=['set',_0x5d7c82(0x12a)][_0x5d7c82(0x126)](_0x4f1bd1||''),_0x2cbe73=_0x1e3bb6[_0x5d7c82(0x12f)][_0x5d7c82(0x12d)]>=0x3;if(_0x220aa3==='--help'||_0x1e3bb6[_0x5d7c82(0x122)][_0x5d7c82(0x12c)])return a38_0x4d2654(ConfigHelp,{});const _0x2915e4=readConfig();if(_0x4f1bd1==='set'){if(_0x220aa3){const _0x33614a=_0x1e3bb6[_0x5d7c82(0x12f)][0x3];if(typeof _0x33614a!==_0x5d7c82(0x134)){if(_0x220aa3==='env'&&![_0x5d7c82(0x129),_0x5d7c82(0x11d)][_0x5d7c82(0x126)](_0x33614a))return a38_0x4d2654(Box,{'children':a38_0x4d2654(Text,{'color':'red','children':_0x5d7c82(0x124)})});const _0x43ae5b=isInProject(),_0x46a18f=_0x43ae5b?projectConfigPath:globalConfigPath;let _0x352717={};try{if(existsSync(_0x46a18f)){const _0x4640de=readFileSync(_0x46a18f,{'encoding':_0x5d7c82(0x138)});_0x4640de&&(_0x352717=JSON[_0x5d7c82(0x121)](_0x4640de));}}catch(_0x35e81b){}if(typeof _0x33614a!==_0x5d7c82(0x11e)||_0x33614a['length']>0x1f4)return a38_0x4d2654(Box,{'children':a38_0x4d2654(Text,{'color':_0x5d7c82(0x139),'children':_0x5d7c82(0x13b)})});let _0x427ffc=_0x220aa3;_0x220aa3===_0x5d7c82(0x13a)&&(_0x427ffc=_0x5d7c82(0x136),delete _0x352717['app']);_0x220aa3==='appcode'&&delete _0x352717['app'];_0x352717[_0x427ffc]=_0x33614a;try{const _0x1eebe3=a38_0x44593a[_0x5d7c82(0x120)](_0x46a18f);!existsSync(_0x1eebe3)&&a38_0x464518['mkdirSync'](_0x1eebe3,{'recursive':!![]});const _0x4ff7bc=_0x46a18f+_0x5d7c82(0x123);writeFileSync(_0x4ff7bc,JSON[_0x5d7c82(0x11c)](_0x352717,null,0x2),{'encoding':'utf8','mode':0x180}),a38_0x464518['renameSync'](_0x4ff7bc,_0x46a18f);if(_0x220aa3===_0x5d7c82(0x132)){const _0xb713e7=_0x43ae5b?'项目':'全局';console[_0x5d7c82(0x12b)]('✓\x20'+_0xb713e7+_0x5d7c82(0x11f)+_0x33614a);}}catch(_0x4b2a3b){const _0x3d18da=_0x46a18f+_0x5d7c82(0x123);try{existsSync(_0x3d18da)&&a38_0x464518['unlinkSync'](_0x3d18da);}catch(_0x21e0be){}return logger[_0x5d7c82(0x118)](_0x5d7c82(0x130),_0x5d7c82(0x125),{'error':_0x4b2a3b instanceof Error?_0x4b2a3b[_0x5d7c82(0x117)]:String(_0x4b2a3b),'configKey':_0x220aa3,'configValue':_0x33614a,'targetConfigPath':_0x46a18f}),a38_0x4d2654(Box,{'children':a38_0x3ce473(Text,{'color':'red','children':[_0x5d7c82(0x135),_0x4b2a3b instanceof Error?_0x4b2a3b[_0x5d7c82(0x117)]:String(_0x4b2a3b)]})});}return null;}return a38_0x4d2654(Box,{'children':a38_0x4d2654(Text,{'color':'red','children':'未提供配置值'})});}}if(_0x4f1bd1===_0x5d7c82(0x12a)){if(_0x220aa3){let _0xc58e7b=_0x220aa3;return _0x220aa3===_0x5d7c82(0x13a)&&(_0xc58e7b=_0x5d7c82(0x136)),console[_0x5d7c82(0x12b)](_0x2915e4[_0xc58e7b]||_0x5d7c82(0x134)),null;}return null;}if(_0x4f1bd1===_0x5d7c82(0x12e))return console[_0x5d7c82(0x12b)](JSON[_0x5d7c82(0x11c)](_0x2915e4,null,0x2)),null;if(!_0x189d7b||!_0x2cbe73)return a38_0x4d2654(ConfigHelp,{});return null;}
1
+ (function(_0x5f2905,_0x2f3ac9){const _0x20f9f5=a39_0x9b3f,_0x419e74=_0x5f2905();while(!![]){try{const _0xe51d68=parseInt(_0x20f9f5(0x160))/0x1+-parseInt(_0x20f9f5(0x158))/0x2*(-parseInt(_0x20f9f5(0x167))/0x3)+-parseInt(_0x20f9f5(0x16c))/0x4+-parseInt(_0x20f9f5(0x16d))/0x5+-parseInt(_0x20f9f5(0x156))/0x6+parseInt(_0x20f9f5(0x153))/0x7*(parseInt(_0x20f9f5(0x16e))/0x8)+parseInt(_0x20f9f5(0x14e))/0x9;if(_0xe51d68===_0x2f3ac9)break;else _0x419e74['push'](_0x419e74['shift']());}catch(_0x30a0b2){_0x419e74['push'](_0x419e74['shift']());}}}(a39_0x4cd4,0x600c1));import{jsx as a39_0x99f034,jsxs as a39_0x3e06f2}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a39_0xb12354 from'node:fs';function a39_0x9b3f(_0x4f3017,_0x527739){_0x4f3017=_0x4f3017-0x149;const _0x4cd4e7=a39_0x4cd4();let _0x9b3f9f=_0x4cd4e7[_0x4f3017];return _0x9b3f9f;}function a39_0x4cd4(){const _0x162101=['环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','length','online','.tmp','mkdirSync','help','app','73944jtTUzB','未提供配置值','parse','undefined','utf8','dirname','flags','12234RcNzAV','message','includes','daily','red','1162092ymsECQ','3600740SRnvuj','3857688MLIYBH','get','error','set','stringify','配置值无效或过长','renameSync','5327082MgWSSj','log','环境配置已设置为:\x20','unlinkSync','appcode','7vXpFna','config','input','2721270KSgFfy','保存配置失败','348kWykmp'];a39_0x4cd4=function(){return _0x162101;};return a39_0x4cd4();}import a39_0x208e5c from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x540322){const _0x48210a=a39_0x9b3f,{cli:_0x550f50}=_0x540322,_0xef4b51=_0x550f50[_0x48210a(0x155)][0x1],_0x3d1bdc=_0x550f50['input'][0x2],_0xa08b6c=[_0x48210a(0x14a),_0x48210a(0x16f)][_0x48210a(0x169)](_0xef4b51||''),_0x469507=_0x550f50['input']['length']>=0x3;if(_0x3d1bdc==='--help'||_0x550f50[_0x48210a(0x166)][_0x48210a(0x15e)])return a39_0x99f034(ConfigHelp,{});const _0x57723a=readConfig();if(_0xef4b51===_0x48210a(0x14a)){if(_0x3d1bdc){const _0x37ca7a=_0x550f50['input'][0x3];if(typeof _0x37ca7a!==_0x48210a(0x163)){if(_0x3d1bdc==='env'&&![_0x48210a(0x15b),_0x48210a(0x16a)][_0x48210a(0x169)](_0x37ca7a))return a39_0x99f034(Box,{'children':a39_0x99f034(Text,{'color':_0x48210a(0x16b),'children':_0x48210a(0x159)})});const _0x211648=isInProject(),_0x527b7d=_0x211648?projectConfigPath:globalConfigPath;let _0x276cc6={};try{if(existsSync(_0x527b7d)){const _0x3e5a0e=readFileSync(_0x527b7d,{'encoding':_0x48210a(0x164)});_0x3e5a0e&&(_0x276cc6=JSON[_0x48210a(0x162)](_0x3e5a0e));}}catch(_0x32d937){}if(typeof _0x37ca7a!=='string'||_0x37ca7a[_0x48210a(0x15a)]>0x1f4)return a39_0x99f034(Box,{'children':a39_0x99f034(Text,{'color':_0x48210a(0x16b),'children':_0x48210a(0x14c)})});let _0x1ab725=_0x3d1bdc;_0x3d1bdc==='app'&&(_0x1ab725=_0x48210a(0x152),delete _0x276cc6[_0x48210a(0x15f)]);_0x3d1bdc===_0x48210a(0x152)&&delete _0x276cc6[_0x48210a(0x15f)];_0x276cc6[_0x1ab725]=_0x37ca7a;try{const _0x29b241=a39_0x208e5c[_0x48210a(0x165)](_0x527b7d);!existsSync(_0x29b241)&&a39_0xb12354[_0x48210a(0x15d)](_0x29b241,{'recursive':!![]});const _0x488cd9=_0x527b7d+_0x48210a(0x15c);writeFileSync(_0x488cd9,JSON['stringify'](_0x276cc6,null,0x2),{'encoding':_0x48210a(0x164),'mode':0x180}),a39_0xb12354[_0x48210a(0x14d)](_0x488cd9,_0x527b7d);if(_0x3d1bdc==='env'){const _0x98766a=_0x211648?'项目':'全局';console[_0x48210a(0x14f)]('✓\x20'+_0x98766a+_0x48210a(0x150)+_0x37ca7a);}}catch(_0x5375c4){const _0x41ee9e=_0x527b7d+_0x48210a(0x15c);try{existsSync(_0x41ee9e)&&a39_0xb12354[_0x48210a(0x151)](_0x41ee9e);}catch(_0x1bcaf0){}return logger[_0x48210a(0x149)](_0x48210a(0x154),_0x48210a(0x157),{'error':_0x5375c4 instanceof Error?_0x5375c4['message']:String(_0x5375c4),'configKey':_0x3d1bdc,'configValue':_0x37ca7a,'targetConfigPath':_0x527b7d}),a39_0x99f034(Box,{'children':a39_0x3e06f2(Text,{'color':_0x48210a(0x16b),'children':['保存配置失败:\x20',_0x5375c4 instanceof Error?_0x5375c4[_0x48210a(0x168)]:String(_0x5375c4)]})});}return null;}return a39_0x99f034(Box,{'children':a39_0x99f034(Text,{'color':_0x48210a(0x16b),'children':_0x48210a(0x161)})});}}if(_0xef4b51===_0x48210a(0x16f)){if(_0x3d1bdc){let _0x1b6d8c=_0x3d1bdc;return _0x3d1bdc===_0x48210a(0x15f)&&(_0x1b6d8c='appcode'),console[_0x48210a(0x14f)](_0x57723a[_0x1b6d8c]||_0x48210a(0x163)),null;}return null;}if(_0xef4b51==='list')return console['log'](JSON[_0x48210a(0x14b)](_0x57723a,null,0x2)),null;if(!_0xa08b6c||!_0x469507)return a39_0x99f034(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a39_0x3a015c=a39_0x1451;function a39_0x1451(_0x4c6dd8,_0x4fb893){_0x4c6dd8=_0x4c6dd8-0x169;const _0x1d880c=a39_0x1d88();let _0x1451d4=_0x1d880c[_0x4c6dd8];return _0x1451d4;}function a39_0x1d88(){const _0x1869fc=['674750RkwybV','198XNWWGp','172460WRUeNn','3094883bIPdfp','21dQqHxT','online','897604TfhLkm','https://api.lovrabet.com','https://user-daily.lovrabet.com','12OaIrva','9878ktTDac','202712DVToqI','https://user.lovrabet.com','https://daily-api.lovrabet.com','2728710GwEjfU','5CuveQI','27TETwrZ'];a39_0x1d88=function(){return _0x1869fc;};return a39_0x1d88();}(function(_0x1a1e15,_0x216ca4){const _0x4dc957=a39_0x1451,_0x3f9b3a=_0x1a1e15();while(!![]){try{const _0x9a96e2=parseInt(_0x4dc957(0x170))/0x1+-parseInt(_0x4dc957(0x178))/0x2*(parseInt(_0x4dc957(0x16f))/0x3)+-parseInt(_0x4dc957(0x174))/0x4+-parseInt(_0x4dc957(0x16c))/0x5*(-parseInt(_0x4dc957(0x16b))/0x6)+parseInt(_0x4dc957(0x172))/0x7*(parseInt(_0x4dc957(0x179))/0x8)+parseInt(_0x4dc957(0x16d))/0x9*(-parseInt(_0x4dc957(0x16e))/0xa)+parseInt(_0x4dc957(0x171))/0xb*(parseInt(_0x4dc957(0x177))/0xc);if(_0x9a96e2===_0x216ca4)break;else _0x3f9b3a['push'](_0x3f9b3a['shift']());}catch(_0x2e1ff2){_0x3f9b3a['push'](_0x3f9b3a['shift']());}}}(a39_0x1d88,0x38987));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a39_0x3a015c(0x173)?a39_0x3a015c(0x169):a39_0x3a015c(0x176);export const getApiDomain=()=>getEnv()===a39_0x3a015c(0x173)?a39_0x3a015c(0x175):a39_0x3a015c(0x16a);
1
+ const a40_0x2144a3=a40_0x1436;(function(_0x35e03e,_0x40a8a7){const _0x593bee=a40_0x1436,_0x448338=_0x35e03e();while(!![]){try{const _0x2c7b23=parseInt(_0x593bee(0x7c))/0x1*(parseInt(_0x593bee(0x71))/0x2)+-parseInt(_0x593bee(0x76))/0x3*(parseInt(_0x593bee(0x7e))/0x4)+parseInt(_0x593bee(0x78))/0x5+-parseInt(_0x593bee(0x77))/0x6+parseInt(_0x593bee(0x73))/0x7+-parseInt(_0x593bee(0x7d))/0x8+parseInt(_0x593bee(0x72))/0x9;if(_0x2c7b23===_0x40a8a7)break;else _0x448338['push'](_0x448338['shift']());}catch(_0x244dbb){_0x448338['push'](_0x448338['shift']());}}}(a40_0x1af3,0x37214));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a40_0x2144a3(0x75)?a40_0x2144a3(0x7a):a40_0x2144a3(0x74);function a40_0x1436(_0x4fe1b4,_0x4324d9){_0x4fe1b4=_0x4fe1b4-0x71;const _0x1af311=a40_0x1af3();let _0x143692=_0x1af311[_0x4fe1b4];return _0x143692;}export const getApiDomain=()=>getEnv()==='online'?a40_0x2144a3(0x7b):a40_0x2144a3(0x79);function a40_0x1af3(){const _0x36b685=['https://user-daily.lovrabet.com','online','27PyAUIj','2089290QVDvMW','1311580AwJYCA','https://daily-api.lovrabet.com','https://user.lovrabet.com','https://api.lovrabet.com','151VXUmQx','1859504EJtkFi','24180ZiNKaI','5914slSeBn','590418GOZjDN','605115OCLmeT'];a40_0x1af3=function(){return _0x36b685;};return a40_0x1af3();}
@@ -1 +1 @@
1
- const a40_0x1de2c4=a40_0x40f7;(function(_0x1e7637,_0x256768){const _0x5d6a11=a40_0x40f7,_0x3804be=_0x1e7637();while(!![]){try{const _0x37cd00=-parseInt(_0x5d6a11(0x1c1))/0x1+parseInt(_0x5d6a11(0x1c0))/0x2+parseInt(_0x5d6a11(0x1c3))/0x3+parseInt(_0x5d6a11(0x1bf))/0x4+parseInt(_0x5d6a11(0x1be))/0x5+parseInt(_0x5d6a11(0x1bc))/0x6*(parseInt(_0x5d6a11(0x1ba))/0x7)+parseInt(_0x5d6a11(0x1c4))/0x8*(-parseInt(_0x5d6a11(0x1c2))/0x9);if(_0x37cd00===_0x256768)break;else _0x3804be['push'](_0x3804be['shift']());}catch(_0x185693){_0x3804be['push'](_0x3804be['shift']());}}}(a40_0x290e,0x249e8));let env=process[a40_0x1de2c4(0x1bd)][a40_0x1de2c4(0x1bb)]||a40_0x1de2c4(0x1c5);function a40_0x290e(){const _0x46a87e=['28rrpSCb','LOVRABET_ENV','289134mmhYYg','env','582565bpseqM','278216sxOLyx','54116FEerNl','41555NCTedg','9kmskxQ','418077VMzntK','2829544DeOpuV','online'];a40_0x290e=function(){return _0x46a87e;};return a40_0x290e();}function a40_0x40f7(_0x507e4a,_0x2f003e){_0x507e4a=_0x507e4a-0x1ba;const _0x290e55=a40_0x290e();let _0x40f7fc=_0x290e55[_0x507e4a];return _0x40f7fc;}export function getEnv(){return env;}export function initEnv(_0x51c115){env=_0x51c115;}
1
+ function a41_0x60a5(){const _0x209ef0=['3622596VdhHsE','267504Mhryds','env','2686610NMMqKk','44QgBmFQ','3983076wLngeD','online','8xPmnXo','273okGpju','58524OYRQrq','11EErbRt','320940OTnxnc','705rqmaLv','434GriSVt'];a41_0x60a5=function(){return _0x209ef0;};return a41_0x60a5();}const a41_0x32d0e8=a41_0x4c57;(function(_0x91f365,_0x5448a7){const _0x427d53=a41_0x4c57,_0x4a4da7=_0x91f365();while(!![]){try{const _0x1bf7b9=-parseInt(_0x427d53(0x138))/0x1+parseInt(_0x427d53(0x136))/0x2*(parseInt(_0x427d53(0x135))/0x3)+parseInt(_0x427d53(0x13b))/0x4*(parseInt(_0x427d53(0x134))/0x5)+-parseInt(_0x427d53(0x132))/0x6*(-parseInt(_0x427d53(0x13f))/0x7)+-parseInt(_0x427d53(0x13e))/0x8*(-parseInt(_0x427d53(0x13c))/0x9)+parseInt(_0x427d53(0x13a))/0xa*(-parseInt(_0x427d53(0x133))/0xb)+-parseInt(_0x427d53(0x137))/0xc;if(_0x1bf7b9===_0x5448a7)break;else _0x4a4da7['push'](_0x4a4da7['shift']());}catch(_0x34863b){_0x4a4da7['push'](_0x4a4da7['shift']());}}}(a41_0x60a5,0xb5261));let env=process[a41_0x32d0e8(0x139)]['LOVRABET_ENV']||a41_0x32d0e8(0x13d);function a41_0x4c57(_0x558450,_0x2cec98){_0x558450=_0x558450-0x132;const _0x60a547=a41_0x60a5();let _0x4c5743=_0x60a547[_0x558450];return _0x4c5743;}export function getEnv(){return env;}export function initEnv(_0x4ce854){env=_0x4ce854;}
@@ -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_0x165fe3=a42_0x2381;(function(_0x382644,_0x2b05fd){const _0x1c8410=a42_0x2381,_0xeca4fe=_0x382644();while(!![]){try{const _0x3999b2=-parseInt(_0x1c8410(0xee))/0x1+-parseInt(_0x1c8410(0xb2))/0x2*(-parseInt(_0x1c8410(0x10d))/0x3)+parseInt(_0x1c8410(0xf8))/0x4*(parseInt(_0x1c8410(0xbf))/0x5)+-parseInt(_0x1c8410(0xf5))/0x6*(-parseInt(_0x1c8410(0xb5))/0x7)+-parseInt(_0x1c8410(0xe9))/0x8*(-parseInt(_0x1c8410(0x10c))/0x9)+parseInt(_0x1c8410(0xb9))/0xa+parseInt(_0x1c8410(0xf4))/0xb*(-parseInt(_0x1c8410(0x10b))/0xc);if(_0x3999b2===_0x2b05fd)break;else _0xeca4fe['push'](_0xeca4fe['shift']());}catch(_0x201ff0){_0xeca4fe['push'](_0xeca4fe['shift']());}}}(a42_0x3047,0x9358c));import{jsx as a42_0x3682b7,jsxs as a42_0x23f7a1,Fragment as a42_0x5793d9}from'react/jsx-runtime';import{useState}from'react';function a42_0x3047(){const _0x189460=['已登录','\x20个\x20IDE','737cfjGrZ','624oIesQC','has','[✓]','21468hTLNbI','red','add','string','rightArrow','项目名长度不能超过\x2050\x20个字符','选择要配置的\x20IDE:','project-name','*\x20项目名:\x20','\x20←\x20','test','confirm-api-pull','Yes','login-check','请至少选择一个\x20IDE','cursor','cwd','login-process','env','332328lIBwhi','1819341odSbtz','3nKoXok','登录失败','gray','未设置','green','MCP\x20和\x20Skill','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','login','\x20登录中...','*\x20创建新项目','1248178LxPpES','filter','slice','78477vHeRVg','agent','qoder','√\x20检测到有效登录状态','11516310EVnkPj','blue','online','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','\x20\x20使用\x20←→\x20选择,回车确认','value','335XKzMZX','yellow','app-code','backspace','\x22\x20已存在,请使用其他名称','white','my-app','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','upArrow','creating','\x20+MCP','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','codex','\x20直接回车确认,或输入自定义名称','\x22\x20已存在','trim','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','lovrabet-setup','跳过登录','trae','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','codebuddy','resolve','[可选]:\x20','应用AppCode','opencode','*\x20正在创建项目...','map','*\x20是否要先登录以便拉取\x20API\x20配置?','应用AppCode不合法','*\x20正在检查登录状态...','目录\x20\x22','lovrabet-setup-selection','!\x20未检测到有效登录','includes','return','*\x20正在登录,请前往浏览器完成登录...','claude','项目名不合法','login-prompt','登录状态','windsurf','8FMyIcz','[\x20]','leftArrow','step','delete','1044372QmeepO','length','cyan','项目名'];a42_0x3047=function(){return _0x189460;};return a42_0x3047();}function a42_0x2381(_0x3081fe,_0xe1135b){_0x3081fe=_0x3081fe-0xb1;const _0x304723=a42_0x3047();let _0x23813a=_0x304723[_0x3081fe];return _0x23813a;}import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a42_0x4a1ebb 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=['antigravity',a42_0x165fe3(0xe4),'cline',a42_0x165fe3(0xd4),a42_0x165fe3(0xcb),a42_0x165fe3(0x107),a42_0x165fe3(0xd8),a42_0x165fe3(0xb7),a42_0x165fe3(0xd2),a42_0x165fe3(0xe8),a42_0x165fe3(0xb6)],UI_MCP_IDES=new Set(Array['from'](MCP_IDES));export function EnhancedGuidedCreate(_0x5c9ff7){const _0x20da98=a42_0x165fe3,{onCreate:_0x21f893,env:_0x36e3ee}=_0x5c9ff7,[_0x2746bd,_0x53dfbb]=useState(_0x20da98(0xff)),[_0x1924ec,_0x798d72]=useState(''),[_0x211aeb,_0x2ce83c]=useState(''),[_0xae2c3c,_0x51779f]=useState(''),[_0x3fd234,_0x195a5d]=useState(''),[_0x561bd9,_0x79d5f7]=useState([]),[_0x31bccb,_0x295c0b]=useState(null),[_0x1cc6b8,_0x3d476b]=useState(![]),[_0x1884a0,_0x2992d3]=useState(![]),[_0x299daa,_0x1ba3bb]=useState(![]),[_0xf09981,_0x794a99]=useState(0x0),[_0x24404d,_0x32ac13]=useState(0x0),[_0x231d9d,_0x5a4cc2]=useState(0x0),[_0x41039f,_0x16933d]=useState(![]),[_0x17cf5f,_0xf6608c]=useState(new Set()),[_0x99a01c,_0x394f29]=useState(0x0),[_0x5e7305,_0x30cfba]=useState(''),_0x706c3d=_0x20da98(0xc5),_0x264d9b=readConfig(),_0x295c16=typeof _0x264d9b['env']===_0x20da98(0xfb)?_0x264d9b[_0x20da98(0x10a)]:undefined;function _0x492d45(_0x27f7d4){const _0x44f35c=_0x20da98,_0x4071b2=_0x27f7d4||_0x706c3d,_0x66d4ad=a42_0x4a1ebb[_0x44f35c(0xd5)](process[_0x44f35c(0x108)](),_0x4071b2);return existsSync(_0x66d4ad);}function _0x2e6514(_0x5e1c53){const _0x2b7ed3=_0x20da98;if(_0x5e1c53['length']>0x32)return{'valid':![],'message':_0x2b7ed3(0xfd)};const _0x35fe5e=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5e1c53?.[_0x2b7ed3(0xce)]()&&!_0x35fe5e['test'](_0x5e1c53))return{'valid':![],'message':_0x2b7ed3(0xbc)};return{'valid':!![]};}function _0x73d8df(_0x2d553d){const _0x20fea5=_0x20da98;if(!_0x2d553d['trim']())return{'valid':!![]};if(_0x2d553d[_0x20fea5(0xef)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x355ed4=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x355ed4[_0x20fea5(0x102)](_0x2d553d))return{'valid':![],'message':_0x20fea5(0xd3)};return{'valid':!![]};}async function _0x2c91fa(){_0x3d476b(!![]);try{const _0x5e2878=await getIsSessionValid();return _0x295c0b(_0x5e2878),_0x5e2878;}catch(_0x2e38ce){return _0x295c0b(![]),![];}finally{_0x3d476b(![]);}}async function _0xdeb939(){_0x2992d3(!![]);try{const _0x46b740=await authServer({'silent':!![]});return _0x295c0b(_0x46b740),_0x46b740;}catch(_0x5b763d){return _0x295c0b(![]),![];}finally{_0x2992d3(![]);}}return useInput(async(_0x51862e,_0x27075d)=>{const _0x2d7ab5=_0x20da98;if(_0x27075d[_0x2d7ab5(0xeb)]||_0x27075d[_0x2d7ab5(0xfc)]){if(_0x2746bd==='confirm-api-pull'){_0x794a99(_0x52016f=>_0x52016f===0x0?0x1:0x0);return;}if(_0x2746bd===_0x2d7ab5(0xdf)){if(!_0x41039f){_0x5a4cc2(_0xe9add9=>_0xe9add9===0x0?0x1:0x0);return;}_0x16933d(![]);return;}if(_0x2746bd==='login-prompt'){_0x32ac13(_0x31db40=>_0x31db40===0x0?0x1:0x0);return;}}if(_0x2746bd===_0x2d7ab5(0xdf)&&_0x41039f&&_0x231d9d===0x0){if(_0x27075d[_0x2d7ab5(0xc7)]){_0x394f29(_0x3f18a8=>_0x3f18a8>0x0?_0x3f18a8-0x1:UI_IDE_LIST[_0x2d7ab5(0xef)]-0x1);return;}if(_0x27075d['downArrow']){_0x394f29(_0x573048=>_0x573048<UI_IDE_LIST[_0x2d7ab5(0xef)]-0x1?_0x573048+0x1:0x0);return;}}if(_0x51862e==='\x20'&&_0x2746bd===_0x2d7ab5(0xdf)&&_0x41039f&&_0x231d9d===0x0){_0xf6608c(_0x4a555b=>{const _0x53e2aa=_0x2d7ab5,_0x45916c=new Set(_0x4a555b);return _0x45916c[_0x53e2aa(0xf6)](_0x99a01c)?_0x45916c[_0x53e2aa(0xed)](_0x99a01c):_0x45916c[_0x53e2aa(0xfa)](_0x99a01c),_0x45916c;}),_0x195a5d('');return;}if((_0x51862e==='a'||_0x51862e==='A')&&_0x2746bd===_0x2d7ab5(0xdf)&&_0x41039f&&_0x231d9d===0x0){_0xf6608c(new Set(UI_IDE_LIST[_0x2d7ab5(0xda)]((_0x38f94d,_0x2c4826)=>_0x2c4826))),_0x195a5d('');return;}if((_0x51862e==='i'||_0x51862e==='I'||_0x51862e==='r'||_0x51862e==='R')&&_0x2746bd===_0x2d7ab5(0xdf)&&_0x41039f&&_0x231d9d===0x0){_0xf6608c(_0x5313eb=>{const _0x229909=_0x2d7ab5,_0x55a5b5=new Set();for(let _0x137d85=0x0;_0x137d85<UI_IDE_LIST[_0x229909(0xef)];_0x137d85++){!_0x5313eb['has'](_0x137d85)&&_0x55a5b5[_0x229909(0xfa)](_0x137d85);}return _0x55a5b5;});return;}if(_0x27075d[_0x2d7ab5(0xe2)]){if(_0x2746bd===_0x2d7ab5(0xff)){const _0x2979e2=_0xae2c3c[_0x2d7ab5(0xce)]()||_0x706c3d;if(_0x3fd234)return;if(_0x492d45(_0x2979e2)){_0x30cfba('目录\x20\x22'+_0x2979e2+_0x2d7ab5(0xc3));return;}_0x798d72(_0x2979e2),_0x79d5f7([{'step':_0x2d7ab5(0xff),'label':_0x2d7ab5(0xf1),'value':_0x2979e2}]),_0x51779f(''),_0x195a5d(''),_0x30cfba(''),_0x53dfbb(_0x2d7ab5(0xc1));return;}if(_0x2746bd===_0x2d7ab5(0xc1)){if(_0x3fd234)return;const _0x4ae068=_0xae2c3c[_0x2d7ab5(0xce)]();_0x2ce83c(_0x4ae068),_0x79d5f7(_0x5e5ca9=>[..._0x5e5ca9,{'step':_0x2d7ab5(0xc1),'label':_0x2d7ab5(0xd7),'value':_0x4ae068||_0x2d7ab5(0x110)}]),_0x51779f(''),_0x195a5d('');if(_0x4ae068){_0x53dfbb(_0x2d7ab5(0x105));const _0x390739=await _0x2c91fa();_0x390739?_0x53dfbb(_0x2d7ab5(0x103)):_0x53dfbb(_0x2d7ab5(0xe6));}else{const _0x32d468=_0x36e3ee||_0x295c16||'online';_0x21f893({'projectName':_0x1924ec,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x32d468}),_0x53dfbb(_0x2d7ab5(0xc8));}return;}if(_0x2746bd===_0x2d7ab5(0x103)){const _0x459e9f=_0xf09981===0x0;_0x1ba3bb(_0x459e9f),_0x79d5f7(_0x4ed7bb=>[..._0x4ed7bb,{'step':'api-pull','label':'拉取API配置','value':_0x459e9f?'是':'否'}]),_0x53dfbb(_0x2d7ab5(0xdf));return;}if(_0x2746bd===_0x2d7ab5(0xdf)){if(!_0x41039f){_0x16933d(!![]);if(_0x231d9d===0x1){_0x79d5f7(_0x33e8cc=>[..._0x33e8cc,{'step':_0x2d7ab5(0xd0),'label':_0x2d7ab5(0x112),'value':'否'}]);const _0x341ca0=_0x36e3ee||_0x295c16||_0x2d7ab5(0xbb);_0x21f893({'projectName':_0x1924ec,'appCode':_0x211aeb,'pullApi':_0x299daa,'aiSetup':![],'selectedIDEs':[],'env':_0x341ca0}),_0x53dfbb(_0x2d7ab5(0xc8));}return;}if(_0x17cf5f['size']===0x0){_0x195a5d(_0x2d7ab5(0x106));return;}const _0x182b2c=Array['from'](_0x17cf5f)[_0x2d7ab5(0xda)](_0x47094c=>UI_IDE_LIST[_0x47094c])[_0x2d7ab5(0xb3)](_0x1a5265=>_0x1a5265!==undefined);_0x79d5f7(_0x544893=>[..._0x544893,{'step':_0x2d7ab5(0xd0),'label':'MCP\x20和\x20Skill','value':_0x182b2c[_0x2d7ab5(0xef)]+_0x2d7ab5(0xf3)}]);const _0xf256d4=_0x36e3ee||_0x295c16||_0x2d7ab5(0xbb);_0x21f893({'projectName':_0x1924ec,'appCode':_0x211aeb,'pullApi':_0x299daa,'aiSetup':!![],'selectedIDEs':_0x182b2c,'env':_0xf256d4}),_0x53dfbb(_0x2d7ab5(0xc8));return;}if(_0x2746bd===_0x2d7ab5(0xe6)){const _0x433440=_0x24404d===0x0;if(_0x433440){_0x53dfbb(_0x2d7ab5(0x109));const _0x1dfdff=await _0xdeb939();_0x1dfdff?(_0x79d5f7(_0x4cf550=>[..._0x4cf550,{'step':_0x2d7ab5(0x114),'label':'登录状态','value':_0x2d7ab5(0xf2)}]),_0x53dfbb(_0x2d7ab5(0x103))):(_0x79d5f7(_0x423420=>[..._0x423420,{'step':_0x2d7ab5(0x114),'label':_0x2d7ab5(0xe7),'value':_0x2d7ab5(0x10e)}]),_0x53dfbb(_0x2d7ab5(0xdf)));}else _0x79d5f7(_0x216d3d=>[..._0x216d3d,{'step':_0x2d7ab5(0x114),'label':_0x2d7ab5(0xe7),'value':_0x2d7ab5(0xd1)}]),_0x53dfbb(_0x2d7ab5(0xdf));return;}}if(_0x27075d[_0x2d7ab5(0xc2)]||_0x27075d[_0x2d7ab5(0xed)]){_0x51779f(_0x2871d0=>{const _0x4ab00d=_0x2d7ab5,_0x14c78f=_0x2871d0[_0x4ab00d(0xb4)](0x0,-0x1);if(_0x2746bd===_0x4ab00d(0xff)){const {valid:_0x5e2c66,message:_0x13ba0c}=_0x2e6514(_0x14c78f);_0x195a5d(_0x5e2c66?'':_0x13ba0c||'项目名不合法');if(_0x5e2c66&&!_0x3fd234){const _0x23f486=_0x14c78f||_0x706c3d;_0x492d45(_0x23f486)?_0x30cfba(_0x4ab00d(0xde)+_0x23f486+'\x22\x20已存在'):_0x30cfba('');}}else{if(_0x2746bd==='app-code'){const {valid:_0x4c6cc4,message:_0x18446d}=_0x73d8df(_0x14c78f);_0x195a5d(_0x4c6cc4?'':_0x18446d||_0x4ab00d(0xdc));}}return _0x14c78f;});return;}if([_0x2d7ab5(0xc8),_0x2d7ab5(0x105),_0x2d7ab5(0x109)][_0x2d7ab5(0xe1)](_0x2746bd))return;if(_0x2746bd==='confirm-api-pull'||_0x2746bd===_0x2d7ab5(0xe6)||_0x2746bd===_0x2d7ab5(0xdf))return;_0x51779f(_0xf5b34d=>{const _0x478d8a=_0x2d7ab5,_0x140ed9=_0xf5b34d+_0x51862e;if(_0x2746bd===_0x478d8a(0xff)){const {valid:_0xfaae5a,message:_0x3807e7}=_0x2e6514(_0x140ed9);_0x195a5d(_0xfaae5a?'':_0x3807e7||_0x478d8a(0xe5));if(_0xfaae5a&&!_0x3fd234){const _0x24f36e=_0x140ed9||_0x706c3d;_0x492d45(_0x24f36e)?_0x30cfba(_0x478d8a(0xde)+_0x24f36e+_0x478d8a(0xcd)):_0x30cfba('');}}else{if(_0x2746bd===_0x478d8a(0xc1)){const {valid:_0x28da00,message:_0x145d50}=_0x73d8df(_0x140ed9);_0x195a5d(_0x28da00?'':_0x145d50||_0x478d8a(0xdc));}}return _0x140ed9;});}),a42_0x23f7a1(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x561bd9[_0x20da98(0xef)]===0x0&&a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0xf0),'children':_0x20da98(0xb1)})}),_0x561bd9['map'](_0x4dbbbf=>a42_0x23f7a1(Box,{'children':[a42_0x23f7a1(Text,{'color':'green','children':['√\x20',_0x4dbbbf['label'],':\x20']}),a42_0x3682b7(Text,{'color':'cyan','children':_0x4dbbbf[_0x20da98(0xbe)]})]},_0x4dbbbf[_0x20da98(0xec)])),_0x2746bd===_0x20da98(0xff)&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x23f7a1(Box,{'children':[a42_0x3682b7(Text,{'children':_0x20da98(0x100)}),_0xae2c3c?a42_0x3682b7(Text,{'color':_0x20da98(0x111),'children':_0xae2c3c}):a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x706c3d}),_0x3fd234&&a42_0x23f7a1(Text,{'color':_0x20da98(0xf9),'children':[_0x20da98(0x101),_0x3fd234]}),_0x5e7305&&a42_0x23f7a1(Text,{'color':'red','children':['\x20←\x20',_0x5e7305]})]}),!_0x3fd234&&!_0x5e7305&&!_0xae2c3c&&a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0xcc)})})]}),_0x2746bd===_0x20da98(0xc1)&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x23f7a1(Box,{'children':[a42_0x3682b7(Text,{'children':'*\x20应用AppCode\x20'}),a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0xd6)}),a42_0x3682b7(Text,{'color':_0x20da98(0x111),'children':_0xae2c3c}),_0x3fd234&&a42_0x23f7a1(Text,{'color':_0x20da98(0xf9),'children':[_0x20da98(0x101),_0x3fd234]})]}),!_0x3fd234&&a42_0x3682b7(Box,{'children':a42_0x23f7a1(Text,{'color':_0x20da98(0x10f),'children':['\x20',_0x20da98(0x113)]})})]}),_0x2746bd==='login-check'&&a42_0x23f7a1(Box,{'children':[a42_0x3682b7(Text,{'children':_0x20da98(0xdd)}),_0x1cc6b8&&a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':'\x20检查中...'})]}),_0x2746bd===_0x20da98(0x103)&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x111),'children':_0x20da98(0xb8)})}),a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x3682b7(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a42_0x23f7a1(Box,{'marginLeft':0x2,'children':[a42_0x23f7a1(Text,{'color':_0xf09981===0x0?_0x20da98(0x111):_0x20da98(0x10f),'children':[_0xf09981===0x0?'▶\x20':'\x20\x20',_0x20da98(0x104)]}),a42_0x3682b7(Text,{'children':'\x20'}),a42_0x23f7a1(Text,{'color':_0xf09981===0x1?_0x20da98(0x111):_0x20da98(0x10f),'children':[_0xf09981===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0xbd)})}),a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0xc0),'children':_0x20da98(0xc6)})})]}),_0x2746bd===_0x20da98(0xdf)&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x111),'children':'√'})}),a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x3682b7(Text,{'children':_0x20da98(0xcf)})}),a42_0x23f7a1(Box,{'marginLeft':0x2,'children':[a42_0x23f7a1(Text,{'color':_0x231d9d===0x0?'green':_0x20da98(0x10f),'children':[_0x231d9d===0x0?'▶\x20':'\x20\x20',_0x20da98(0x104)]}),a42_0x3682b7(Text,{'children':'\x20'}),a42_0x23f7a1(Text,{'color':_0x231d9d===0x1?'green':_0x20da98(0x10f),'children':[_0x231d9d===0x1?'▶\x20':'\x20\x20','No']})]}),_0x41039f&&_0x231d9d===0x0&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':'\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE'})}),a42_0x23f7a1(Box,{'marginTop':0x1,'flexDirection':'column','children':[a42_0x3682b7(Text,{'bold':!![],'color':'yellow','children':_0x20da98(0xfe)}),UI_IDE_LIST['map']((_0x263dba,_0x128c71)=>{const _0xab97e0=_0x20da98,_0x21c8eb=_0x99a01c===_0x128c71,_0x2a5ed8=_0x17cf5f['has'](_0x128c71),_0x6135df=UI_MCP_IDES[_0xab97e0(0xf6)](_0x263dba);return a42_0x3682b7(Box,{'children':a42_0x23f7a1(Text,{'backgroundColor':_0x21c8eb?_0xab97e0(0xba):undefined,'color':_0x21c8eb?'white':undefined,'children':['\x20\x20',_0x2a5ed8?_0xab97e0(0xf7):_0xab97e0(0xea),'\x20',UI_IDE_CONFIGS[_0x263dba]['name'],_0x6135df&&a42_0x3682b7(Text,{'color':_0x21c8eb?'white':_0xab97e0(0xf0),'children':_0xab97e0(0xc9)}),'\x20',a42_0x23f7a1(Text,{'color':_0x21c8eb?_0xab97e0(0xc4):_0xab97e0(0x10f),'dimColor':!_0x21c8eb,'children':['-\x20',UI_IDE_CONFIGS[_0x263dba]['description']]})]})},_0x263dba);}),a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x23f7a1(Text,{'color':_0x20da98(0x10f),'children':['\x20',_0x20da98(0xca)]})})]})]}),!_0x41039f&&a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0xbd)})}),_0x3fd234&&a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x23f7a1(Text,{'color':_0x20da98(0xf9),'children':['✗\x20',_0x3fd234]})})]}),_0x2746bd===_0x20da98(0xe6)&&a42_0x23f7a1(a42_0x5793d9,{'children':[a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0xc0),'children':_0x20da98(0xe0)})}),a42_0x3682b7(Box,{'marginTop':0x1,'children':a42_0x3682b7(Text,{'children':_0x20da98(0xdb)})}),a42_0x23f7a1(Box,{'marginLeft':0x2,'children':[a42_0x23f7a1(Text,{'color':_0x24404d===0x0?'green':'gray','children':[_0x24404d===0x0?'▶\x20':'\x20\x20','Yes']}),a42_0x3682b7(Text,{'children':'\x20'}),a42_0x23f7a1(Text,{'color':_0x24404d===0x1?_0x20da98(0x111):_0x20da98(0x10f),'children':[_0x24404d===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0xbd)})})]}),_0x2746bd===_0x20da98(0x109)&&a42_0x23f7a1(Box,{'children':[a42_0x3682b7(Text,{'children':_0x20da98(0xe3)}),_0x1884a0&&a42_0x3682b7(Text,{'color':_0x20da98(0x10f),'children':_0x20da98(0x115)})]}),_0x2746bd==='creating'&&a42_0x3682b7(Box,{'children':a42_0x3682b7(Text,{'color':_0x20da98(0x111),'children':_0x20da98(0xd9)})})]});}
@@ -1 +1 @@
1
- function a42_0x3974(){const _0x56947f=['2958780LCAIGM','12zDtsjg','3419950WlxLqF','now','964063BgWeAn','81TXtDJC','10698880rLOYxd','636BttEoa','1223055xpLMgA','11846uPdGLY','6668613BIPeCm'];a42_0x3974=function(){return _0x56947f;};return a42_0x3974();}function a42_0x4ce8(_0xe9b4b2,_0x19afae){_0xe9b4b2=_0xe9b4b2-0x160;const _0x397429=a42_0x3974();let _0x4ce899=_0x397429[_0xe9b4b2];return _0x4ce899;}(function(_0x10864e,_0x423ab4){const _0x514e55=a42_0x4ce8,_0x254d0a=_0x10864e();while(!![]){try{const _0x157013=parseInt(_0x514e55(0x166))/0x1+-parseInt(_0x514e55(0x160))/0x2*(parseInt(_0x514e55(0x169))/0x3)+parseInt(_0x514e55(0x163))/0x4*(parseInt(_0x514e55(0x16a))/0x5)+-parseInt(_0x514e55(0x162))/0x6+-parseInt(_0x514e55(0x161))/0x7+-parseInt(_0x514e55(0x168))/0x8+-parseInt(_0x514e55(0x167))/0x9*(-parseInt(_0x514e55(0x164))/0xa);if(_0x157013===_0x423ab4)break;else _0x254d0a['push'](_0x254d0a['shift']());}catch(_0x13832e){_0x254d0a['push'](_0x254d0a['shift']());}}}(a42_0x3974,0xb3f02));export function formatElapsed(_0x45ed77){const _0x5d60e3=a42_0x4ce8,_0xf1f599=Date[_0x5d60e3(0x165)]()-_0x45ed77;if(_0xf1f599<0x3e8)return _0xf1f599+'ms';const _0x1e8199=(_0xf1f599/0x3e8)['toFixed'](0x2),_0x1b72c6=_0x1e8199['replace'](/\.?0+$/u,'');return _0x1b72c6+'s';}
1
+ function a43_0x3ed9(){const _0x45a98f=['608ppamnx','6LmbOcu','18555xmLOFt','1960784ZiDogr','now','77fEiClQ','9wJphxo','replace','2674iSRBFl','toFixed','44xQTGmI','2560369zDwIyF','506904BFlTDI','6951450vGlqDz','232401AqcDYz'];a43_0x3ed9=function(){return _0x45a98f;};return a43_0x3ed9();}(function(_0x49bda7,_0x3405df){const _0x44c33a=a43_0x3488,_0x2c6810=_0x49bda7();while(!![]){try{const _0x358f2b=parseInt(_0x44c33a(0x104))/0x1*(parseInt(_0x44c33a(0x10b))/0x2)+parseInt(_0x44c33a(0x10a))/0x3+parseInt(_0x44c33a(0x106))/0x4*(-parseInt(_0x44c33a(0x10d))/0x5)+-parseInt(_0x44c33a(0x10c))/0x6*(-parseInt(_0x44c33a(0x107))/0x7)+-parseInt(_0x44c33a(0x10e))/0x8+-parseInt(_0x44c33a(0x102))/0x9*(parseInt(_0x44c33a(0x109))/0xa)+parseInt(_0x44c33a(0x101))/0xb*(parseInt(_0x44c33a(0x108))/0xc);if(_0x358f2b===_0x3405df)break;else _0x2c6810['push'](_0x2c6810['shift']());}catch(_0x3fb28f){_0x2c6810['push'](_0x2c6810['shift']());}}}(a43_0x3ed9,0x8b588));function a43_0x3488(_0x7af445,_0x4efded){_0x7af445=_0x7af445-0x100;const _0x3ed975=a43_0x3ed9();let _0x348820=_0x3ed975[_0x7af445];return _0x348820;}export function formatElapsed(_0x43a66f){const _0x2c84c0=a43_0x3488,_0x458d5b=Date[_0x2c84c0(0x100)]()-_0x43a66f;if(_0x458d5b<0x3e8)return _0x458d5b+'ms';const _0x2e8b82=(_0x458d5b/0x3e8)[_0x2c84c0(0x105)](0x2),_0x343c5e=_0x2e8b82[_0x2c84c0(0x103)](/\.?0+$/u,'');return _0x343c5e+'s';}
@@ -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(_0xb9c312,_0xb49978){const _0x487b1d=a44_0x3e2c,_0x46a773=_0xb9c312();while(!![]){try{const _0x2a86c0=-parseInt(_0x487b1d(0x1b5))/0x1*(-parseInt(_0x487b1d(0x1db))/0x2)+parseInt(_0x487b1d(0x1d7))/0x3+-parseInt(_0x487b1d(0x1ae))/0x4+parseInt(_0x487b1d(0x20d))/0x5+-parseInt(_0x487b1d(0x1b7))/0x6*(parseInt(_0x487b1d(0x1af))/0x7)+parseInt(_0x487b1d(0x20b))/0x8+-parseInt(_0x487b1d(0x1f6))/0x9*(parseInt(_0x487b1d(0x1ad))/0xa);if(_0x2a86c0===_0xb49978)break;else _0x46a773['push'](_0x46a773['shift']());}catch(_0xf90a9d){_0x46a773['push'](_0x46a773['shift']());}}}(a44_0x1605,0xcfe80));function a44_0x3e2c(_0x24744f,_0x5c4696){_0x24744f=_0x24744f-0x1a4;const _0x160526=a44_0x1605();let _0x3e2c32=_0x160526[_0x24744f];return _0x3e2c32;}import{jsx as a44_0xbe8c02,Fragment as a44_0x150414,jsxs as a44_0x338d1e}from'react/jsx-runtime';import a44_0xe78125 from'path';import a44_0x2a742a 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';function a44_0x1605(){const _0x1f1321=['API\x20配置拉取异常','ide','resolve','manual','parse','env','filter','4413152VHfJbY','Claude\x20Code','4337485vNyNsk','description','拉取API配置:\x20','lovrabet\x20mcp\x20install','项目创建完成:\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','test','info','red','×\x20项目创建失败:\x20','cwd','CLI\x20版本检查','.lovrabetrc','*\x20清理失败的项目目录:\x20','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','success','*\x20正在为项目\x20','trim','appCode','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','log','cyan','has','warn','项目创建失败:\x20','配置AppCode:\x20','21990YfUJag','1573064ymXibA','7iNwoqc','version','*\x20正在拉取\x20API\x20配置...','cd\x20','cursor','utf8','15427jMwsnC','√\x20package.json\x20已更新:\x20name=','8834934JiJRdn','\x20MCP\x20','\x20创建配置文件','stringify','启动项目:\x20','2.\x20','1.\x20','online','skill-','pullApi','setLogPath','更新\x20package.json\x20name','√\x20配置文件已创建,应用AppCode:\x20','string','readFileSync','dirname','writeFileSync','lovrabet\x20api\x20pull','message','配置应用AppCode失败','stableVersion','selectedIDEs','projectCode','error','W_OK','\x20配置应用AppCode:\x20','3.\x20','×\x20项目名不能为空','\x20\x20✗\x20MCP\x20','\x20\x20•\x20Skill:\x20','✓\x20Skill\x20安装完成:','green','4644408XKTVqx','\x20&&\x20lovrabet\x20start','rmSync','skill','44RPGNUN','mcp','length','gray','constants','API\x20配置拉取成功:\x20','join','\x20√\x20','\x20\x20✗\x20Skill\x20','column','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','Cursor','√\x20API\x20配置拉取完成','repeat','1.0.0','existsSync','lovrabet\x20skill\x20install','create','\x20Skill\x20','push','项目名称:\x20','API\x20配置拉取失败:\x20','\x20\x20•\x20MCP\x20服务器:\x20','\x20|\x20应用AppCode:\x20','../..','配置应用AppCode:\x20','status','2412PxFouF','map','aiSetup','package.json','\x20Generated\x20by\x20lovrabet\x20cli\x20','accessSync','doTask','needsUpgrade','projectName','name','清理项目目录失败:\x20','white','🚀\x20接下来:','yellow'];a44_0x1605=function(){return _0x1f1321;};return a44_0x1605();}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';import{MCP_IDES}from'../utils/ai_config.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x5551e8){const _0x769fae=a44_0x3e2c,[_0x2f1ef6,_0x25fdc1]=useState(![]),[_0x17a11e,_0x4e3d4c]=useState(![]),[_0x4bced4,_0x5db7be]=useState(null),[_0x3e4afe,_0x4cf3ec]=useState(null),_0x81da42=useCopyProjectTemplate(),_0x5887c1=useInstallDependencies(),_0x3745a4=useFormatCode();useEffect(()=>{checkCliVersion()['then'](_0x43b874=>{const _0xefa274=a44_0x3e2c;_0x43b874[_0xefa274(0x1fd)]&&(printCliUpgradeWarning(_0x43b874),logger['info'](_0xefa274(0x1ec),_0xefa274(0x218),{'currentVersion':_0x43b874['currentVersion'],'stableVersion':_0x43b874[_0xefa274(0x1cb)],'needsUpgrade':_0x43b874[_0xefa274(0x1fd)]}));});},[]);const _0x34cedd=async _0x3c77d2=>{const _0x20bc1f=a44_0x3e2c;if(!_0x3c77d2[_0x20bc1f(0x1fe)]||_0x3c77d2['projectName'][_0x20bc1f(0x1a4)]()===''){console[_0x20bc1f(0x1ce)](_0x20bc1f(0x1d2));return;}const _0x28b0b8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x28b0b8[_0x20bc1f(0x213)](_0x3c77d2[_0x20bc1f(0x1fe)])){console[_0x20bc1f(0x1ce)]('×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符');return;}if(_0x3c77d2[_0x20bc1f(0x1fe)][_0x20bc1f(0x1dd)]>0x64){console[_0x20bc1f(0x1ce)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x4cb663=a44_0xe78125[_0x20bc1f(0x206)](process['cwd'](),_0x3c77d2[_0x20bc1f(0x1fe)]);if(a44_0x2a742a[_0x20bc1f(0x1ea)](_0x4cb663)){console[_0x20bc1f(0x1ce)]('×\x20项目目录\x20'+_0x3c77d2[_0x20bc1f(0x1fe)]+'\x20已存在,请使用其他项目名');return;}try{const _0x11b72b=a44_0xe78125[_0x20bc1f(0x1c6)](_0x4cb663);a44_0x2a742a[_0x20bc1f(0x1fb)](_0x11b72b,a44_0x2a742a[_0x20bc1f(0x1df)][_0x20bc1f(0x1cf)]);}catch(_0x532d8a){console[_0x20bc1f(0x1ce)]('×\x20无法在当前目录创建项目,请检查目录权限');return;}_0x5db7be(_0x3c77d2),_0x25fdc1(!![]),logger[_0x20bc1f(0x1c1)](_0x4cb663),logger['info'](_0x20bc1f(0x1ec),'开始创建项目:\x20'+_0x3c77d2[_0x20bc1f(0x1fe)],{'projectDir':_0x4cb663,'appCode':_0x3c77d2[_0x20bc1f(0x1a5)]});try{await _0x81da42[_0x20bc1f(0x1fc)](_0x3c77d2[_0x20bc1f(0x1fe)]),await _0x1e5897(_0x3c77d2['projectName']),await _0x5887c1[_0x20bc1f(0x1fc)](_0x3c77d2[_0x20bc1f(0x1fe)]),await _0x3745a4['doTask'](_0x3c77d2['projectName']),await _0x27856f(_0x3c77d2['projectName'],_0x3c77d2['appCode']||'',_0x3c77d2[_0x20bc1f(0x209)]);if(_0x3c77d2[_0x20bc1f(0x1c0)]&&_0x3c77d2['appCode']){console[_0x20bc1f(0x1a7)](_0x20bc1f(0x1b1));try{const _0x3be549=await pullApiSilent(_0x3c77d2[_0x20bc1f(0x1a5)],undefined,_0x4cb663,_0x3c77d2[_0x20bc1f(0x209)]);_0x3be549?(console['log'](_0x20bc1f(0x1e7)),logger['info'](_0x20bc1f(0x1ec),_0x20bc1f(0x1e0)+_0x3c77d2[_0x20bc1f(0x1a5)])):(console['log']('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x20bc1f(0x1aa)](_0x20bc1f(0x1ec),_0x20bc1f(0x1f0)+_0x3c77d2[_0x20bc1f(0x1a5)]));}catch(_0x10b302){console[_0x20bc1f(0x1a7)]('!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x20bc1f(0x1aa)](_0x20bc1f(0x1ec),_0x20bc1f(0x204),{'error':_0x10b302 instanceof Error?_0x10b302[_0x20bc1f(0x1c9)]:String(_0x10b302)});}}if(_0x3c77d2[_0x20bc1f(0x1f8)]&&_0x3c77d2[_0x20bc1f(0x1cc)]&&_0x3c77d2['selectedIDEs'][_0x20bc1f(0x1dd)]>0x0&&_0x3c77d2[_0x20bc1f(0x1a5)]){console['log']('*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...');const _0x23290c=[],_0x4fa1a9=[],_0x1a5b08=_0x3c77d2['selectedIDEs']['filter'](_0x8b89e3=>MCP_IDES[_0x20bc1f(0x1a9)](_0x8b89e3)),_0x21618a=_0x3c77d2[_0x20bc1f(0x1cc)];for(const _0x29d8da of _0x1a5b08){try{const _0x4af95f=await configureMcp(_0x29d8da,_0x4cb663);_0x23290c[_0x20bc1f(0x1ee)]({'ide':_0x29d8da===_0x20bc1f(0x1b3)?_0x20bc1f(0x1e6):'Claude\x20Code','status':_0x4af95f[_0x20bc1f(0x1f5)],'message':_0x4af95f[_0x20bc1f(0x1c9)]}),console['log']('\x20\x20'+(_0x4af95f['status']==='success'?'✓':_0x4af95f[_0x20bc1f(0x1f5)]===_0x20bc1f(0x207)?'⚠️':'✗')+_0x20bc1f(0x1b8)+_0x29d8da+':\x20'+_0x4af95f[_0x20bc1f(0x1c9)]);}catch(_0x4001a4){_0x23290c[_0x20bc1f(0x1ee)]({'ide':_0x29d8da==='cursor'?'Cursor':_0x20bc1f(0x20c),'status':_0x20bc1f(0x1ce),'message':_0x4001a4 instanceof Error?_0x4001a4['message']:String(_0x4001a4)}),console[_0x20bc1f(0x1a7)](_0x20bc1f(0x1d3)+_0x29d8da+':\x20'+(_0x4001a4 instanceof Error?_0x4001a4[_0x20bc1f(0x1c9)]:String(_0x4001a4)));}}await copySharedSkills(_0x4cb663);for(const _0x428f3a of _0x21618a){try{const _0x5caf5a=await installSkill(_0x428f3a,_0x4cb663);_0x4fa1a9['push']({'ide':_0x5caf5a[_0x20bc1f(0x205)],'status':_0x5caf5a[_0x20bc1f(0x1f5)],'message':_0x5caf5a[_0x20bc1f(0x1c9)]}),console[_0x20bc1f(0x1a7)]('\x20\x20'+(_0x5caf5a[_0x20bc1f(0x1f5)]==='success'?'✓':'✗')+_0x20bc1f(0x1ed)+_0x5caf5a[_0x20bc1f(0x205)]+':\x20'+_0x5caf5a[_0x20bc1f(0x1c9)]);}catch(_0x5a6042){_0x4fa1a9[_0x20bc1f(0x1ee)]({'ide':_0x428f3a,'status':_0x20bc1f(0x1ce),'message':_0x5a6042 instanceof Error?_0x5a6042[_0x20bc1f(0x1c9)]:String(_0x5a6042)}),console[_0x20bc1f(0x1a7)](_0x20bc1f(0x1e3)+_0x428f3a+':\x20'+(_0x5a6042 instanceof Error?_0x5a6042[_0x20bc1f(0x1c9)]:String(_0x5a6042)));}}if(_0x4fa1a9[_0x20bc1f(0x1dd)]>0x0){const _0x4820ef=_0x4fa1a9[_0x20bc1f(0x20a)](_0x80dc5e=>_0x80dc5e[_0x20bc1f(0x1f5)]===_0x20bc1f(0x21c))[_0x20bc1f(0x1f7)](_0x45a322=>_0x45a322[_0x20bc1f(0x205)]);_0x4820ef['length']>0x0&&createSkillManifest(_0x4cb663,_0x4820ef);}_0x4cf3ec({'mcp':_0x23290c,'skill':_0x4fa1a9}),console[_0x20bc1f(0x1a7)](_0x20bc1f(0x1e5));}logger[_0x20bc1f(0x21c)]('create',_0x20bc1f(0x211)+_0x3c77d2[_0x20bc1f(0x1fe)]),_0x4e3d4c(!![]),_0x25fdc1(![]);}catch(_0x55443f){logger[_0x20bc1f(0x1ce)](_0x20bc1f(0x1ec),_0x20bc1f(0x1ab)+_0x3c77d2[_0x20bc1f(0x1fe)],{'error':_0x55443f instanceof Error?_0x55443f[_0x20bc1f(0x1c9)]:String(_0x55443f)});try{a44_0x2a742a['existsSync'](_0x4cb663)&&(console[_0x20bc1f(0x1a7)](_0x20bc1f(0x21a)+_0x4cb663),a44_0x2a742a[_0x20bc1f(0x1d9)](_0x4cb663,{'recursive':!![],'force':!![]}));}catch(_0x2ffc70){logger[_0x20bc1f(0x1aa)](_0x20bc1f(0x1ec),_0x20bc1f(0x200)+_0x4cb663);}_0x25fdc1(![]),console['error'](_0x20bc1f(0x216)+(_0x55443f instanceof Error?_0x55443f[_0x20bc1f(0x1c9)]:String(_0x55443f)));}},_0x823c2d=async _0x5db3a6=>{const _0x256258=a44_0x3e2c;await _0x34cedd({'projectName':_0x5db3a6,'env':_0x5551e8[_0x256258(0x209)]});},_0x1e5897=async _0x2315c0=>{const _0x5623e7=a44_0x3e2c,_0x525496=a44_0xe78125[_0x5623e7(0x206)](process[_0x5623e7(0x217)](),_0x2315c0),_0x4390dd=a44_0xe78125['join'](_0x525496,_0x5623e7(0x1f9));try{console[_0x5623e7(0x1a7)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x213c3d=fileURLToPath(import.meta.url),_0x3d5acf=a44_0xe78125['resolve'](a44_0xe78125[_0x5623e7(0x1c6)](_0x213c3d),_0x5623e7(0x1f3)),_0x259fcb=a44_0xe78125[_0x5623e7(0x1e1)](_0x3d5acf,_0x5623e7(0x1f9));let _0x4d8881='1.0.0';try{const _0x301929=JSON[_0x5623e7(0x208)](a44_0x2a742a[_0x5623e7(0x1c5)](_0x259fcb,_0x5623e7(0x1b4)));_0x4d8881=_0x301929[_0x5623e7(0x1b0)]||_0x5623e7(0x1e9);}catch(_0x28d708){}const _0x51781a=a44_0x2a742a[_0x5623e7(0x1c5)](_0x4390dd,_0x5623e7(0x1b4)),_0x47f6c4=JSON[_0x5623e7(0x208)](_0x51781a);_0x47f6c4[_0x5623e7(0x1ff)]=_0x2315c0,_0x47f6c4[_0x5623e7(0x20e)]=_0x2315c0+_0x5623e7(0x1fa)+_0x4d8881,a44_0x2a742a[_0x5623e7(0x1c7)](_0x4390dd,JSON['stringify'](_0x47f6c4,null,0x2)+'\x0a',_0x5623e7(0x1b4)),console[_0x5623e7(0x1a7)](_0x5623e7(0x1b6)+_0x2315c0),logger[_0x5623e7(0x214)](_0x5623e7(0x1ec),_0x5623e7(0x1c2));}catch(_0x6cd7aa){logger['error'](_0x5623e7(0x1ec),'更新\x20package.json\x20失败');throw _0x6cd7aa;}},_0x27856f=async(_0x491ec1,_0x4ac23b,_0x23fe6f)=>{const _0x15cb10=a44_0x3e2c,_0x46a620=a44_0xe78125[_0x15cb10(0x206)](process[_0x15cb10(0x217)](),_0x491ec1),_0x106466=a44_0xe78125[_0x15cb10(0x1e1)](_0x46a620,_0x15cb10(0x219));try{_0x4ac23b?console[_0x15cb10(0x1a7)]('*\x20正在为项目\x20'+_0x491ec1+_0x15cb10(0x1d0)+_0x4ac23b):console[_0x15cb10(0x1a7)](_0x15cb10(0x21d)+_0x491ec1+_0x15cb10(0x1b9));const _0x1ef2c3=fileURLToPath(import.meta.url),_0x174139=a44_0xe78125[_0x15cb10(0x206)](a44_0xe78125[_0x15cb10(0x1c6)](_0x1ef2c3),_0x15cb10(0x1f3)),_0x3c8cfa=a44_0xe78125[_0x15cb10(0x1e1)](_0x174139,_0x15cb10(0x1f9));let _0x280c11=_0x15cb10(0x1e9);try{const _0x1c5156=JSON[_0x15cb10(0x208)](a44_0x2a742a[_0x15cb10(0x1c5)](_0x3c8cfa,'utf8'));_0x280c11=_0x1c5156[_0x15cb10(0x1b0)]||_0x15cb10(0x1e9);}catch(_0x47cfd9){}const _0x321720=readConfig(),_0x46e2df=typeof _0x321720[_0x15cb10(0x209)]===_0x15cb10(0x1c4)?_0x321720[_0x15cb10(0x209)]:undefined,{app:_0x3ba0ff,appcode:_0x223dc0,..._0x4795a9}=_0x321720,_0x44f8f3={..._0x4795a9,'appcode':_0x4ac23b||'','env':_0x23fe6f||_0x46e2df||_0x15cb10(0x1be),'createdAt':new Date()['toLocaleString'](),'version':_0x280c11};a44_0x2a742a[_0x15cb10(0x1c7)](_0x106466,JSON[_0x15cb10(0x1ba)](_0x44f8f3,null,0x2),_0x15cb10(0x1b4)),_0x4ac23b?console[_0x15cb10(0x1a7)](_0x15cb10(0x1c3)+_0x4ac23b):console[_0x15cb10(0x1a7)]('√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置'),logger['info'](_0x15cb10(0x1ec),_0x15cb10(0x1f4)+_0x4ac23b);}catch(_0x43842f){logger['error'](_0x15cb10(0x1ec),_0x15cb10(0x1ca));}};useEffect(()=>{const _0x29f1df=a44_0x3e2c;_0x5551e8[_0x29f1df(0x1cd)]&&_0x823c2d(_0x5551e8['projectCode']);},[_0x5551e8[_0x769fae(0x1cd)]]);if(!_0x2f1ef6&&!_0x17a11e&&!_0x5551e8[_0x769fae(0x1cd)])return a44_0xbe8c02(EnhancedGuidedCreate,{'onCreate':_0x34cedd,'env':_0x5551e8[_0x769fae(0x209)]});if(_0x2f1ef6)return a44_0x338d1e(a44_0x150414,{'children':[a44_0x338d1e(Box,{'marginTop':0x1,'children':[a44_0xbe8c02(Box,{'width':'1'}),a44_0xbe8c02(Text,{'color':'green','children':_0x769fae(0x1e2)}),a44_0xbe8c02(Text,{'children':'项目名称:\x20'}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'children':_0x4bced4?.['projectName']}),_0x4bced4?.[_0x769fae(0x1a5)]&&a44_0x338d1e(a44_0x150414,{'children':[a44_0xbe8c02(Text,{'children':_0x769fae(0x1f2)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'children':_0x4bced4[_0x769fae(0x1a5)]})]})]}),a44_0xbe8c02(TaskRunning,{..._0x81da42}),a44_0xbe8c02(TaskRunning,{..._0x5887c1}),a44_0xbe8c02(TaskRunning,{..._0x3745a4})]});if(_0x17a11e){const _0x2b8c42=_0x3e4afe&&(_0x3e4afe[_0x769fae(0x1dc)][_0x769fae(0x1dd)]>0x0||_0x3e4afe[_0x769fae(0x1da)]['length']>0x0);return a44_0x338d1e(a44_0x150414,{'children':[a44_0x338d1e(Box,{'marginTop':0x1,'children':[a44_0xbe8c02(Box,{'width':'1'}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'children':'\x20√\x20'}),a44_0xbe8c02(Text,{'children':_0x769fae(0x1ef)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'children':_0x4bced4?.['projectName']}),_0x4bced4?.[_0x769fae(0x1a5)]&&a44_0x338d1e(a44_0x150414,{'children':[a44_0xbe8c02(Text,{'children':_0x769fae(0x1f2)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'children':_0x4bced4[_0x769fae(0x1a5)]})]})]}),a44_0xbe8c02(TaskFinished,{..._0x81da42}),a44_0xbe8c02(TaskFinished,{..._0x5887c1}),a44_0xbe8c02(TaskFinished,{..._0x3745a4}),a44_0xbe8c02(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'children':'─'[_0x769fae(0x1e8)](0x3c)})}),_0x2b8c42&&a44_0x338d1e(a44_0x150414,{'children':[_0x3e4afe[_0x769fae(0x1dc)][_0x769fae(0x1dd)]>0x0&&a44_0x338d1e(a44_0x150414,{'children':[a44_0xbe8c02(Box,{'marginTop':0x1,'children':a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'bold':!![],'children':'✓\x20MCP\x20服务器配置完成:'})}),_0x3e4afe['mcp'][_0x769fae(0x1f7)]((_0x2ee78c,_0xa5c9bf)=>a44_0xbe8c02(Box,{'marginLeft':0x2,'children':a44_0x338d1e(Text,{'color':_0x2ee78c[_0x769fae(0x1f5)]===_0x769fae(0x21c)?'white':_0x2ee78c[_0x769fae(0x1f5)]===_0x769fae(0x207)?_0x769fae(0x203):_0x769fae(0x215),'children':[_0x2ee78c['ide'],':\x20',_0x2ee78c[_0x769fae(0x1c9)]]})},'mcp-'+_0xa5c9bf))]}),_0x3e4afe['skill']['length']>0x0&&a44_0x338d1e(a44_0x150414,{'children':[a44_0xbe8c02(Box,{'marginTop':_0x3e4afe['mcp'][_0x769fae(0x1dd)]>0x0?0x1:0x0,'children':a44_0xbe8c02(Text,{'color':'green','bold':!![],'children':_0x769fae(0x1d5)})}),_0x3e4afe[_0x769fae(0x1da)][_0x769fae(0x1f7)]((_0x31f52b,_0xfe6666)=>a44_0xbe8c02(Box,{'marginLeft':0x2,'children':a44_0x338d1e(Text,{'color':_0x31f52b['status']===_0x769fae(0x21c)?_0x769fae(0x201):_0x769fae(0x215),'children':[_0x31f52b[_0x769fae(0x205)],':\x20',_0x31f52b[_0x769fae(0x1c9)]]})},_0x769fae(0x1bf)+_0xfe6666))]}),a44_0xbe8c02(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0xbe8c02(Text,{'color':'green','children':'─'[_0x769fae(0x1e8)](0x3c)})})]}),a44_0xbe8c02(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':_0x769fae(0x202)})}),a44_0x338d1e(Box,{'marginLeft':0x2,'flexDirection':_0x769fae(0x1e4),'children':[_0x2b8c42?a44_0x338d1e(a44_0x150414,{'children':[a44_0x338d1e(Box,{'children':[a44_0xbe8c02(Text,{'color':'green','children':_0x769fae(0x1bd)}),a44_0xbe8c02(Text,{'color':'white','children':'启动项目:\x20'}),a44_0xbe8c02(Text,{'color':'cyan','bold':!![],'children':_0x769fae(0x1b2)+_0x4bced4?.[_0x769fae(0x1fe)]+_0x769fae(0x1d8)})]}),_0x4bced4?.[_0x769fae(0x1a5)]&&!_0x4bced4?.[_0x769fae(0x1c0)]&&a44_0x338d1e(Box,{'children':[a44_0xbe8c02(Text,{'color':'yellow','children':_0x769fae(0x1bc)}),a44_0xbe8c02(Text,{'color':'white','children':_0x769fae(0x20f)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':_0x769fae(0x1c8)})]})]}):a44_0x338d1e(a44_0x150414,{'children':[a44_0xbe8c02(Box,{'children':a44_0xbe8c02(Text,{'color':_0x769fae(0x203),'bold':!![],'children':_0x769fae(0x1a6)})}),a44_0x338d1e(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x1d4)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':_0x769fae(0x1eb)})]}),a44_0x338d1e(Box,{'marginLeft':0x2,'children':[a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x1f1)}),a44_0xbe8c02(Text,{'color':'cyan','bold':!![],'children':_0x769fae(0x210)})]}),a44_0x338d1e(Box,{'marginTop':0x1,'children':[a44_0xbe8c02(Text,{'color':_0x769fae(0x1d6),'children':_0x769fae(0x1bc)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x1bb)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':_0x769fae(0x1b2)+_0x4bced4?.[_0x769fae(0x1fe)]+_0x769fae(0x1d8)})]}),_0x4bced4?.[_0x769fae(0x1a5)]&&!_0x4bced4?.[_0x769fae(0x1c0)]&&a44_0x338d1e(Box,{'children':[a44_0xbe8c02(Text,{'color':_0x769fae(0x203),'children':_0x769fae(0x1d1)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x20f)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':'lovrabet\x20api\x20pull'})]})]}),!_0x4bced4?.['appCode']&&a44_0x338d1e(a44_0x150414,{'children':[a44_0x338d1e(Box,{'children':[a44_0xbe8c02(Text,{'color':_0x769fae(0x1de),'children':_0x769fae(0x1bc)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x1ac)}),a44_0xbe8c02(Text,{'color':'cyan','bold':!![],'children':_0x769fae(0x212)})]}),a44_0x338d1e(Box,{'children':[a44_0xbe8c02(Text,{'color':'gray','children':_0x769fae(0x1d1)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x201),'children':_0x769fae(0x20f)}),a44_0xbe8c02(Text,{'color':_0x769fae(0x1a8),'bold':!![],'children':_0x769fae(0x21b)})]})]})]}),a44_0xbe8c02(Box,{'marginTop':0x1,'children':a44_0xbe8c02(Text,{'color':'green','children':'─'[_0x769fae(0x1e8)](0x3c)})})]});}return null;}