@lovrabet/cli 1.3.0 → 1.3.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1 @@
1
+ (function(_0x5a1c9c,_0x2dcb30){const _0x3091e4=a31_0x812d,_0x44e584=_0x5a1c9c();while(!![]){try{const _0x4e18c7=parseInt(_0x3091e4(0x7a))/0x1+-parseInt(_0x3091e4(0x7d))/0x2*(parseInt(_0x3091e4(0x7c))/0x3)+parseInt(_0x3091e4(0x76))/0x4+parseInt(_0x3091e4(0x78))/0x5+parseInt(_0x3091e4(0x7b))/0x6*(-parseInt(_0x3091e4(0x77))/0x7)+parseInt(_0x3091e4(0x75))/0x8*(-parseInt(_0x3091e4(0x79))/0x9)+-parseInt(_0x3091e4(0x7e))/0xa;if(_0x4e18c7===_0x2dcb30)break;else _0x44e584['push'](_0x44e584['shift']());}catch(_0xb3f123){_0x44e584['push'](_0x44e584['shift']());}}}(a31_0x34f5,0x627f5));function a31_0x812d(_0x6f4202,_0x3f9a6d){_0x6f4202=_0x6f4202-0x75;const _0x34f5f9=a31_0x34f5();let _0x812d4a=_0x34f5f9[_0x6f4202];return _0x812d4a;}function a31_0x34f5(){const _0x202564=['3152840weqDtO','9ZyTmzf','370695xrdCeX','212712WUdZEX','40728pWBUry','12DgWrxK','3306820ackLBi','1596088luXVAt','1047980KMQwJK','49ufxEId'];a31_0x34f5=function(){return _0x202564;};return a31_0x34f5();}export const dynamicCliFlags={'dangerouslyBffSave':{'type':'boolean'}};
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a31_0x4f7d(_0x1f51bf,_0x18e007){_0x1f51bf=_0x1f51bf-0xfb;const _0xdad896=a31_0xdad8();let _0x4f7d7e=_0xdad896[_0x1f51bf];return _0x4f7d7e;}const a31_0x499811=a31_0x4f7d;(function(_0x47c383,_0x5806ed){const _0x34dd32=a31_0x4f7d,_0x22e33a=_0x47c383();while(!![]){try{const _0x3974ae=parseInt(_0x34dd32(0x102))/0x1+-parseInt(_0x34dd32(0x146))/0x2+-parseInt(_0x34dd32(0x13e))/0x3*(-parseInt(_0x34dd32(0x11a))/0x4)+parseInt(_0x34dd32(0x117))/0x5+parseInt(_0x34dd32(0x110))/0x6*(-parseInt(_0x34dd32(0x137))/0x7)+parseInt(_0x34dd32(0x114))/0x8*(-parseInt(_0x34dd32(0x10d))/0x9)+parseInt(_0x34dd32(0x126))/0xa*(parseInt(_0x34dd32(0x13d))/0xb);if(_0x3974ae===_0x5806ed)break;else _0x22e33a['push'](_0x22e33a['shift']());}catch(_0x124c0e){_0x22e33a['push'](_0x22e33a['shift']());}}}(a31_0xdad8,0x7a3a1));import{jsx as a31_0x44bbcf}from'react/jsx-runtime';import a31_0x3f709e 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_0xdad8(){const _0x5c41c9=['antigravity','exit','./mcp/mcp-install-non-interactive.js','true','auth','push','init','error','menu','help','--help','clear','argv','189VqwvtC','skill-install','\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','all','codex','add','176WzVBML','94854dTQqXi','执行安装技能包命令','lovrabet\x20','string','mcpClaude','stdout','执行配置\x20MCP\x20命令','isTTY','1400338TIFHRV','mcp','flags','非交互模式创建项目:\x20','./create-app/non-interactive.js','同步菜单命令','logs','opencode','env','update','196509oVYiRS','claude','install','create','start','\x20(监听模式)','windsurf','length','preview','build','input','9SMVFoL','menu-sync','./skills/skill-install-non-interactive.js','189816GidJpc','trim','boolean','other','2971720NQZVQD','trae','cursor','3549430DxNyYz','qoder','cwd','104PMAHFg','nonInteractive','menu-update-cdn','join','appcode','执行添加页面命令','setLogPath','slice','skill','watch','codebuddy','info','436240vCHxNF','config','cline','执行构建命令'];a31_0xdad8=function(){return _0x5c41c9;};return a31_0xdad8();}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';function isNonInteractiveMode(_0x2d975f){const _0x1d63b1=a31_0x4f7d;return!!(_0x2d975f[_0x1d63b1(0x11b)]||_0x2d975f['ci']||process[_0x1d63b1(0x100)]['LOVRABET_CI']===_0x1d63b1(0x12d)||process[_0x1d63b1(0x100)]['CI']===_0x1d63b1(0x12d)||!process[_0x1d63b1(0x143)][_0x1d63b1(0x145)]);}const cli=a31_0x3f709e(a31_0x499811(0x139),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a31_0x499811(0x112)},'env':{'type':a31_0x499811(0x141)},'watch':{'type':'boolean'},'help':{'type':a31_0x499811(0x112)},'appcode':{'type':a31_0x499811(0x141)},'output':{'type':a31_0x499811(0x141)},'params':{'type':a31_0x499811(0x141)},'datasetcode':{'type':'string'},'mcpCursor':{'type':a31_0x499811(0x112)},'mcpClaude':{'type':a31_0x499811(0x112)},'mcpOther':{'type':a31_0x499811(0x112)},'cursor':{'type':'boolean'},'windsurf':{'type':a31_0x499811(0x112)},'claude':{'type':a31_0x499811(0x112)},'cline':{'type':a31_0x499811(0x112)},'codex':{'type':'boolean'},'opencode':{'type':'boolean'},'qoder':{'type':a31_0x499811(0x112)},'codebuddy':{'type':a31_0x499811(0x112)},'trae':{'type':a31_0x499811(0x112)},'agent':{'type':'boolean'},'antigravity':{'type':'boolean'},'all':{'type':a31_0x499811(0x112)},'nonInteractive':{'type':a31_0x499811(0x112)},'ci':{'type':'boolean'}},'autoVersion':!![]});await run();async function run(){const _0x2b220a=a31_0x499811,_0x4e6c5b=cli[_0x2b220a(0x10c)][0x0],_0x4c767f=cli[_0x2b220a(0x10c)][0x1],_0x343ae2=cli[_0x2b220a(0x10c)][0x2],_0x30543a=(_0x2b220a(0x140)+process[_0x2b220a(0x136)][_0x2b220a(0x121)](0x2)[_0x2b220a(0x11d)]('\x20'))[_0x2b220a(0x111)]();logger['setRawCommand'](_0x30543a);switch(_0x4e6c5b){case _0x2b220a(0x130):{const _0x144096=cli[_0x2b220a(0x148)][_0x2b220a(0x11e)],_0xa6dc6=cli[_0x2b220a(0x148)][_0x2b220a(0x100)];logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x130),'执行初始化配置命令'),render(a31_0x44bbcf(Init,{'appcode':_0x144096,'env':_0xa6dc6}));break;}case _0x2b220a(0x105):{const _0x52a13c=cli[_0x2b220a(0x10c)][0x1]?.[_0x2b220a(0x111)](),_0x53cf33=cli[_0x2b220a(0x148)]['env'],_0x24aa8f=isNonInteractiveMode(cli[_0x2b220a(0x148)]);if(_0x24aa8f&&_0x52a13c){logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x105),_0x2b220a(0xfb)+_0x52a13c);const {createProjectNonInteractive:_0x4d6777}=await import(_0x2b220a(0xfc));await _0x4d6777(_0x52a13c,_0x53cf33);}else render(a31_0x44bbcf(CreateApp,{'projectCode':_0x52a13c,'env':_0x53cf33}));break;}case _0x2b220a(0x13c):{cli[_0x2b220a(0x10c)][0x1]==='page'&&(logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger['info']('add-page',_0x2b220a(0x11f)),render(a31_0x44bbcf(AddPage,{})));break;}case _0x2b220a(0x106):{try{logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x106),'执行启动命令'),await runStart();}catch(_0x2321de){console[_0x2b220a(0x131)](_0x2321de),process[_0x2b220a(0x12b)](0x1);}break;}case _0x2b220a(0x10b):{try{logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger['info']('build',_0x2b220a(0x129)),await runBuild();}catch(_0x298a59){console[_0x2b220a(0x131)](_0x298a59),process[_0x2b220a(0x12b)](0x1);}break;}case _0x2b220a(0x10a):{const _0x3b3970=cli[_0x2b220a(0x148)][_0x2b220a(0x123)];logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x10a),'执行预览命令'+(_0x3b3970?_0x2b220a(0x107):''));if(_0x3b3970)try{await Promise[_0x2b220a(0x13a)]([runBuildWatch(),runPreview()]);}catch(_0xe39a01){console[_0x2b220a(0x131)](_0xe39a01),process[_0x2b220a(0x12b)](0x1);}else try{await runPreview();}catch(_0x2f85af){console[_0x2b220a(0x131)](_0x2f85af),process['exit'](0x1);}break;}case _0x2b220a(0x127):{render(a31_0x44bbcf(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x2b220a(0x12e):{render(a31_0x44bbcf(AuthServer,{}));break;}case _0x2b220a(0x132):{if(_0x4c767f===_0x2b220a(0x101)){logger['setLogPath'](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x11c),'执行更新菜单\x20CDN\x20资源命令'),render(a31_0x44bbcf(AppMenuUpdateCdn,{}));break;}else logger[_0x2b220a(0x120)](process[_0x2b220a(0x119)]()),logger[_0x2b220a(0x125)](_0x2b220a(0x10e),_0x2b220a(0xfd)),render(a31_0x44bbcf(AppMenuSyncUI,{}));break;}case'logout':{logout();break;}case _0x2b220a(0x147):{const _0x34f318=cli['input'][0x1];logger['setLogPath'](process[_0x2b220a(0x119)]());if(_0x34f318===_0x2b220a(0x104)){const _0x1af072=[];if(cli[_0x2b220a(0x148)]['mcpCursor']||cli['flags'][_0x2b220a(0x116)])_0x1af072[_0x2b220a(0x12f)](_0x2b220a(0x116));if(cli['flags'][_0x2b220a(0x142)]||cli[_0x2b220a(0x148)][_0x2b220a(0x103)])_0x1af072[_0x2b220a(0x12f)]('claude');if(cli[_0x2b220a(0x148)]['mcpOther'])_0x1af072[_0x2b220a(0x12f)](_0x2b220a(0x113));logger[_0x2b220a(0x125)]('mcp-install',_0x2b220a(0x144),{'preselected':_0x1af072});if(isNonInteractiveMode(cli['flags'])&&_0x1af072[_0x2b220a(0x109)]>0x0){const {installMcpNonInteractive:_0x25e664}=await import(_0x2b220a(0x12c));await _0x25e664(_0x1af072);}else render(a31_0x44bbcf(McpInstallUI,{'preselectedIDEs':_0x1af072}));}else _0x34f318===_0x2b220a(0x134)||cli[_0x2b220a(0x148)][_0x2b220a(0x133)]?await mcpCommand(_0x34f318,[],{'help':!![]}):await mcpCommand(_0x34f318,[],cli[_0x2b220a(0x148)]);break;}case _0x2b220a(0x122):{const _0x5525b1=cli[_0x2b220a(0x10c)][0x1];logger['setLogPath'](process[_0x2b220a(0x119)]());if(_0x5525b1==='install'){const _0x59cbd0=[];if(cli['flags'][_0x2b220a(0x13a)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x116),'windsurf',_0x2b220a(0x103),_0x2b220a(0x128),_0x2b220a(0x13b),_0x2b220a(0xff),'qoder',_0x2b220a(0x124),_0x2b220a(0x115),'agent',_0x2b220a(0x12a));else{if(cli[_0x2b220a(0x148)][_0x2b220a(0x116)])_0x59cbd0[_0x2b220a(0x12f)]('cursor');if(cli[_0x2b220a(0x148)][_0x2b220a(0x108)])_0x59cbd0[_0x2b220a(0x12f)]('windsurf');if(cli['flags']['claude'])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x103));if(cli[_0x2b220a(0x148)][_0x2b220a(0x128)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x128));if(cli[_0x2b220a(0x148)][_0x2b220a(0x13b)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x13b));if(cli[_0x2b220a(0x148)][_0x2b220a(0xff)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0xff));if(cli[_0x2b220a(0x148)][_0x2b220a(0x118)])_0x59cbd0['push'](_0x2b220a(0x118));if(cli[_0x2b220a(0x148)]['codebuddy'])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x124));if(cli['flags'][_0x2b220a(0x115)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x115));if(cli['flags']['agent'])_0x59cbd0[_0x2b220a(0x12f)]('agent');if(cli[_0x2b220a(0x148)][_0x2b220a(0x12a)])_0x59cbd0[_0x2b220a(0x12f)](_0x2b220a(0x12a));}logger[_0x2b220a(0x125)](_0x2b220a(0x138),_0x2b220a(0x13f),{'preselected':_0x59cbd0});if(isNonInteractiveMode(cli[_0x2b220a(0x148)])&&_0x59cbd0[_0x2b220a(0x109)]>0x0){const {installSkillsNonInteractive:_0x55ec36}=await import(_0x2b220a(0x10f));await _0x55ec36(_0x59cbd0);}else render(a31_0x44bbcf(SkillInstallUI,{'preselectedIDEs':_0x59cbd0}));}else _0x5525b1===_0x2b220a(0x134)||cli[_0x2b220a(0x148)]['help']?await skillsCommand(_0x5525b1,[],{'help':!![]}):await skillsCommand(_0x5525b1,[],cli[_0x2b220a(0x148)]);break;}case _0x2b220a(0xfe):{cli['flags'][_0x2b220a(0x135)]?clearLogs():showLogs();break;}default:render(a31_0x44bbcf(Help,{}));break;}}
2
+ const a32_0xdfb557=a32_0x3843;(function(_0x2448e5,_0x29948c){const _0xedf56f=a32_0x3843,_0x3733c=_0x2448e5();while(!![]){try{const _0x4753dc=-parseInt(_0xedf56f(0xf2))/0x1*(-parseInt(_0xedf56f(0x110))/0x2)+parseInt(_0xedf56f(0xfb))/0x3*(parseInt(_0xedf56f(0xfc))/0x4)+-parseInt(_0xedf56f(0xdb))/0x5*(parseInt(_0xedf56f(0xe1))/0x6)+parseInt(_0xedf56f(0xf1))/0x7*(parseInt(_0xedf56f(0xd3))/0x8)+-parseInt(_0xedf56f(0xee))/0x9*(parseInt(_0xedf56f(0xd1))/0xa)+parseInt(_0xedf56f(0xf3))/0xb*(parseInt(_0xedf56f(0xc7))/0xc)+-parseInt(_0xedf56f(0x108))/0xd;if(_0x4753dc===_0x29948c)break;else _0x3733c['push'](_0x3733c['shift']());}catch(_0x1dc6d6){_0x3733c['push'](_0x3733c['shift']());}}}(a32_0x24e8,0x62897));import{jsx as a32_0x3a6eca}from'react/jsx-runtime';import a32_0x5b9511 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';function a32_0x3843(_0x3a20bd,_0x2c30ec){_0x3a20bd=_0x3a20bd-0xc5;const _0x24e88b=a32_0x24e8();let _0x384364=_0x24e88b[_0x3a20bd];return _0x384364;}import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a32_0xdfb557(0xce)))[a32_0xdfb557(0xeb)];}catch{}function a32_0x24e8(){const _0x22b2b9=['antigravity','codex','help','./skills/main.js','flags','codebuddy','trae','windsurf','qoder','logs','执行配置\x20MCP\x20命令','8580364fHZxGX','length','cwd','create','boolean','clear','opencode','input','20392wQlBcf','argv','agent','执行预览命令','install','exit','mcpClaude','menu-update-cdn','cline','trim','error','336jzWqxz','lovrabet\x20','LOVRABET_CI','./mcp/mcp-install-non-interactive.js','preview','api','watch','./cli-flags.js','cursor','other','7268900DVbCZr','true','1428008UMGKau','env','执行安装技能包命令','setLogPath','push','mcp','add-page','info','2325hQbDlp','logout','执行添加页面命令','add','mcpOther','page','1206HnbSnS','auth','start','stdout','skill-install','mcpCursor','join','menu','执行启动命令','init','dynamicCliFlags','./skills/skill-install-non-interactive.js','--help','9mbLVhE','claude','同步菜单命令','7PmGUIr','59iCeXhN','315799BksFlh','非交互模式创建项目:\x20','string','all','build','setRawCommand','isTTY','\x20(监听模式)','900219jFeGYw','4vSIWdk'];a32_0x24e8=function(){return _0x22b2b9;};return a32_0x24e8();}const mergedFlags={...dynamicCliFlags||{}};function isNonInteractiveMode(_0x1dd6cc){const _0x3b15ca=a32_0xdfb557;return!!(_0x1dd6cc['nonInteractive']||_0x1dd6cc['ci']||process[_0x3b15ca(0xd4)][_0x3b15ca(0xc9)]===_0x3b15ca(0xd2)||process[_0x3b15ca(0xd4)]['CI']===_0x3b15ca(0xd2)||!process[_0x3b15ca(0xe4)][_0x3b15ca(0xf9)]);}const cli=a32_0x5b9511('\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20//\x20包含\x20Backend\x20Function\x20同步工作流\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a',{'importMeta':import.meta,'flags':{'name':{'type':a32_0xdfb557(0xf5)},'clear':{'type':a32_0xdfb557(0x10c)},'env':{'type':a32_0xdfb557(0xf5)},'watch':{'type':a32_0xdfb557(0x10c)},'help':{'type':'boolean'},'appcode':{'type':a32_0xdfb557(0xf5)},'output':{'type':a32_0xdfb557(0xf5)},'params':{'type':a32_0xdfb557(0xf5)},'datasetcode':{'type':'string'},'mcpCursor':{'type':a32_0xdfb557(0x10c)},'mcpClaude':{'type':a32_0xdfb557(0x10c)},'mcpOther':{'type':'boolean'},'cursor':{'type':a32_0xdfb557(0x10c)},'windsurf':{'type':a32_0xdfb557(0x10c)},'claude':{'type':a32_0xdfb557(0x10c)},'cline':{'type':a32_0xdfb557(0x10c)},'codex':{'type':a32_0xdfb557(0x10c)},'opencode':{'type':a32_0xdfb557(0x10c)},'qoder':{'type':a32_0xdfb557(0x10c)},'codebuddy':{'type':'boolean'},'trae':{'type':a32_0xdfb557(0x10c)},'agent':{'type':a32_0xdfb557(0x10c)},'antigravity':{'type':a32_0xdfb557(0x10c)},'all':{'type':a32_0xdfb557(0x10c)},'nonInteractive':{'type':'boolean'},'ci':{'type':'boolean'},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x19bd63=a32_0xdfb557,_0x31145d=cli['input'][0x0],_0x3ab621=cli[_0x19bd63(0x10f)][0x1],_0x3b5db1=cli[_0x19bd63(0x10f)][0x2],_0x323719=(_0x19bd63(0xc8)+process[_0x19bd63(0x111)]['slice'](0x2)[_0x19bd63(0xe7)]('\x20'))[_0x19bd63(0xc5)]();logger[_0x19bd63(0xf8)](_0x323719);switch(_0x31145d){case _0x19bd63(0xea):{const _0x323987=cli['flags']['appcode'],_0x3de812=cli[_0x19bd63(0x101)][_0x19bd63(0xd4)];logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0xea),'执行初始化配置命令'),render(a32_0x3a6eca(Init,{'appcode':_0x323987,'env':_0x3de812}));break;}case _0x19bd63(0x10b):{const _0x13062b=cli[_0x19bd63(0x10f)][0x1]?.[_0x19bd63(0xc5)](),_0x4186e2=cli[_0x19bd63(0x101)]['env'],_0xe550b0=isNonInteractiveMode(cli['flags']);if(_0xe550b0&&_0x13062b){logger[_0x19bd63(0xd6)](process['cwd']()),logger[_0x19bd63(0xda)](_0x19bd63(0x10b),_0x19bd63(0xf4)+_0x13062b);const {createProjectNonInteractive:_0x1d0b99}=await import('./create-app/non-interactive.js');await _0x1d0b99(_0x13062b,_0x4186e2);}else render(a32_0x3a6eca(CreateApp,{'projectCode':_0x13062b,'env':_0x4186e2}));break;}case _0x19bd63(0xde):{cli[_0x19bd63(0x10f)][0x1]===_0x19bd63(0xe0)&&(logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xd9),_0x19bd63(0xdd)),render(a32_0x3a6eca(AddPage,{})));break;}case _0x19bd63(0xe3):{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xe3),_0x19bd63(0xe9)),await runStart();}catch(_0x40c901){console[_0x19bd63(0xc6)](_0x40c901),process[_0x19bd63(0x115)](0x1);}break;}case'build':{try{logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger['info'](_0x19bd63(0xf7),'执行构建命令'),await runBuild();}catch(_0x5f4e08){console[_0x19bd63(0xc6)](_0x5f4e08),process[_0x19bd63(0x115)](0x1);}break;}case _0x19bd63(0xcb):{const _0x25c2cb=cli[_0x19bd63(0x101)][_0x19bd63(0xcd)];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0xcb),_0x19bd63(0x113)+(_0x25c2cb?_0x19bd63(0xfa):''));if(_0x25c2cb)try{await Promise[_0x19bd63(0xf6)]([runBuildWatch(),runPreview()]);}catch(_0x18c42b){console['error'](_0x18c42b),process[_0x19bd63(0x115)](0x1);}else try{await runPreview();}catch(_0x582c1){console[_0x19bd63(0xc6)](_0x582c1),process[_0x19bd63(0x115)](0x1);}break;}case'config':{render(a32_0x3a6eca(Config,{'cli':cli}));break;}case _0x19bd63(0xcc):{await apiCli(cli);break;}case _0x19bd63(0xe2):{render(a32_0x3a6eca(AuthServer,{}));break;}case _0x19bd63(0xe8):{if(_0x3ab621==='update'){logger['setLogPath'](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)](_0x19bd63(0x117),'执行更新菜单\x20CDN\x20资源命令'),render(a32_0x3a6eca(AppMenuUpdateCdn,{}));break;}else logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]()),logger[_0x19bd63(0xda)]('menu-sync',_0x19bd63(0xf0)),render(a32_0x3a6eca(AppMenuSyncUI,{}));break;}case _0x19bd63(0xdc):{logout();break;}case _0x19bd63(0xd8):{const _0x3d8877=cli[_0x19bd63(0x10f)][0x1];logger[_0x19bd63(0xd6)](process[_0x19bd63(0x10a)]());if(_0x3d8877==='install'){const _0x1e7add=[];if(cli[_0x19bd63(0x101)][_0x19bd63(0xe6)]||cli['flags']['cursor'])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x116)]||cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x1e7add[_0x19bd63(0xd7)](_0x19bd63(0xef));if(cli['flags'][_0x19bd63(0xdf)])_0x1e7add['push'](_0x19bd63(0xd0));logger['info']('mcp-install',_0x19bd63(0x107),{'preselected':_0x1e7add});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x1e7add[_0x19bd63(0x109)]>0x0){const {installMcpNonInteractive:_0x1b98a7}=await import(_0x19bd63(0xca));await _0x1b98a7(_0x1e7add);}else render(a32_0x3a6eca(McpInstallUI,{'preselectedIDEs':_0x1e7add}));}else _0x3d8877===_0x19bd63(0xed)||cli[_0x19bd63(0x101)]['help']?await mcpCommand(_0x3d8877,[],{'help':!![]}):await mcpCommand(_0x3d8877,[],cli[_0x19bd63(0x101)]);break;}case'skill':{const _0x1f2ade=cli[_0x19bd63(0x10f)][0x1];logger['setLogPath'](process[_0x19bd63(0x10a)]());if(_0x1f2ade===_0x19bd63(0x114)){const _0x4899bf=[];if(cli[_0x19bd63(0x101)]['all'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf),_0x19bd63(0x104),'claude','cline','codex',_0x19bd63(0x10e),_0x19bd63(0x105),_0x19bd63(0x102),'trae',_0x19bd63(0x112),_0x19bd63(0xfd));else{if(cli['flags']['cursor'])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xcf));if(cli[_0x19bd63(0x101)][_0x19bd63(0x104)])_0x4899bf[_0x19bd63(0xd7)]('windsurf');if(cli[_0x19bd63(0x101)][_0x19bd63(0xef)])_0x4899bf['push'](_0x19bd63(0xef));if(cli[_0x19bd63(0x101)][_0x19bd63(0x118)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x118));if(cli['flags'][_0x19bd63(0xfe)])_0x4899bf[_0x19bd63(0xd7)]('codex');if(cli[_0x19bd63(0x101)][_0x19bd63(0x10e)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x10e));if(cli[_0x19bd63(0x101)][_0x19bd63(0x105)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x105));if(cli['flags'][_0x19bd63(0x102)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x102));if(cli[_0x19bd63(0x101)][_0x19bd63(0x103)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0x103));if(cli['flags'][_0x19bd63(0x112)])_0x4899bf['push'](_0x19bd63(0x112));if(cli[_0x19bd63(0x101)][_0x19bd63(0xfd)])_0x4899bf[_0x19bd63(0xd7)](_0x19bd63(0xfd));}const {getAllProvidedFlags:_0x44ed30}=await import(_0x19bd63(0x100)),_0x492303=_0x44ed30(cli[_0x19bd63(0x101)]);logger[_0x19bd63(0xda)](_0x19bd63(0xe5),_0x19bd63(0xd5),{'preselected':_0x4899bf,'providedFlags':_0x492303});if(isNonInteractiveMode(cli[_0x19bd63(0x101)])&&_0x4899bf[_0x19bd63(0x109)]>0x0){const {installSkillsNonInteractive:_0x146b12}=await import(_0x19bd63(0xec));await _0x146b12(_0x4899bf,_0x492303);}else render(a32_0x3a6eca(SkillInstallUI,{'preselectedIDEs':_0x4899bf,'providedFlags':_0x492303}));}else _0x1f2ade==='--help'||cli['flags'][_0x19bd63(0xff)]?await skillsCommand(_0x1f2ade,[],{'help':!![]}):await skillsCommand(_0x1f2ade,[],cli[_0x19bd63(0x101)]);break;}case _0x19bd63(0x106):{cli['flags'][_0x19bd63(0x10d)]?clearLogs():showLogs();break;}default:render(a32_0x3a6eca(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x522e7e,_0x271209){const _0x35a1bb=a32_0x5477,_0x299dfb=_0x522e7e();while(!![]){try{const _0x5c4311=parseInt(_0x35a1bb(0x201))/0x1+parseInt(_0x35a1bb(0x1f3))/0x2+parseInt(_0x35a1bb(0x200))/0x3+parseInt(_0x35a1bb(0x1f7))/0x4+parseInt(_0x35a1bb(0x1f6))/0x5+parseInt(_0x35a1bb(0x1f5))/0x6*(parseInt(_0x35a1bb(0x1fd))/0x7)+-parseInt(_0x35a1bb(0x1f9))/0x8*(parseInt(_0x35a1bb(0x1fc))/0x9);if(_0x5c4311===_0x271209)break;else _0x299dfb['push'](_0x299dfb['shift']());}catch(_0x4d0f72){_0x299dfb['push'](_0x299dfb['shift']());}}}(a32_0x1f8a,0x94682));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a32_0x5477(_0xf08c40,_0x3e1571){_0xf08c40=_0xf08c40-0x1f2;const _0x1f8a7a=a32_0x1f8a();let _0x54771e=_0x1f8a7a[_0xf08c40];return _0x54771e;}function a32_0x1f8a(){const _0x22d001=['cwd','6VgoZoJ','487420CAlluc','1934140RJqWzH','--watch','26067320njaBFU','inherit','node_modules','9GBNtFA','2375331pdKpAN','close','build','2580414yJpExG','872378Rchdbu','vite','env','.bin','2426842WeiIhB'];a32_0x1f8a=function(){return _0x22d001;};return a32_0x1f8a();}export function runBuildWatch(){return new Promise((_0x5dc0c9,_0xd728ab)=>{const _0x3123c5=a32_0x5477,_0x5e1f3f=spawn(_0x3123c5(0x202),[_0x3123c5(0x1ff),_0x3123c5(0x1f8)],{'stdio':_0x3123c5(0x1fa),'shell':!![],'env':{...process[_0x3123c5(0x203)],'PATH':''+join(process[_0x3123c5(0x1f4)](),_0x3123c5(0x1fb),_0x3123c5(0x1f2))+delimiter+process[_0x3123c5(0x203)]['PATH']}});_0x5e1f3f['on'](_0x3123c5(0x1fe),_0x1c0258=>{if(_0x1c0258===0x0||_0x1c0258===null)_0x5dc0c9();else _0xd728ab(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x1c0258));}),_0x5e1f3f['on']('error',_0xd728ab);});}
1
+ (function(_0x48d94e,_0x5abb7e){const _0x3ef171=a33_0x1d01,_0x5e4a13=_0x48d94e();while(!![]){try{const _0x5c9cc9=parseInt(_0x3ef171(0x1fb))/0x1+-parseInt(_0x3ef171(0x1fe))/0x2+parseInt(_0x3ef171(0x1ff))/0x3*(parseInt(_0x3ef171(0x1f9))/0x4)+parseInt(_0x3ef171(0x1f6))/0x5*(parseInt(_0x3ef171(0x1fa))/0x6)+-parseInt(_0x3ef171(0x1f5))/0x7+-parseInt(_0x3ef171(0x1f1))/0x8*(-parseInt(_0x3ef171(0x202))/0x9)+parseInt(_0x3ef171(0x1f4))/0xa*(parseInt(_0x3ef171(0x1f7))/0xb);if(_0x5c9cc9===_0x5abb7e)break;else _0x5e4a13['push'](_0x5e4a13['shift']());}catch(_0x335b53){_0x5e4a13['push'](_0x5e4a13['shift']());}}}(a33_0x4cf7,0xc0a2a));import{spawn}from'node:child_process';function a33_0x1d01(_0x381bfe,_0x2913ba){_0x381bfe=_0x381bfe-0x1f1;const _0x4cf7e3=a33_0x4cf7();let _0x1d0130=_0x4cf7e3[_0x381bfe];return _0x1d0130;}import{delimiter,join}from'node:path';function a33_0x4cf7(){const _0x20e533=['build','2522380dwvQWK','9rGVXvr','PATH','--watch','18BiIqLS','.bin','4695224KUAUgU','vite','env','430690GxOzlh','10798445wZhrRe','858655SJqzaD','66rSVDDk','cwd','892888pTofra','6hWUuPC','1319242FmHjUr','error'];a33_0x4cf7=function(){return _0x20e533;};return a33_0x4cf7();}export function runBuildWatch(){return new Promise((_0x5b02a8,_0xbd3c4a)=>{const _0x4af418=a33_0x1d01,_0x34245f=spawn(_0x4af418(0x1f2),[_0x4af418(0x1fd),_0x4af418(0x201)],{'stdio':'inherit','shell':!![],'env':{...process[_0x4af418(0x1f3)],'PATH':''+join(process[_0x4af418(0x1f8)](),'node_modules',_0x4af418(0x203))+delimiter+process['env'][_0x4af418(0x200)]}});_0x34245f['on']('close',_0x5b6c8f=>{if(_0x5b6c8f===0x0||_0x5b6c8f===null)_0x5b02a8();else _0xbd3c4a(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x5b6c8f));}),_0x34245f['on'](_0x4af418(0x1fc),_0xbd3c4a);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- function a33_0x1fce(_0x5a73f1,_0x370c3e){_0x5a73f1=_0x5a73f1-0x9e;const _0x538b1c=a33_0x538b();let _0x1fcee8=_0x538b1c[_0x5a73f1];return _0x1fcee8;}(function(_0x6b4fc9,_0x113191){const _0x1b6f76=a33_0x1fce,_0x2e6e63=_0x6b4fc9();while(!![]){try{const _0x198ddc=parseInt(_0x1b6f76(0xab))/0x1*(-parseInt(_0x1b6f76(0xb1))/0x2)+parseInt(_0x1b6f76(0xaa))/0x3+-parseInt(_0x1b6f76(0xa5))/0x4+parseInt(_0x1b6f76(0xb3))/0x5*(parseInt(_0x1b6f76(0xad))/0x6)+parseInt(_0x1b6f76(0x9f))/0x7*(parseInt(_0x1b6f76(0xb6))/0x8)+parseInt(_0x1b6f76(0xba))/0x9+-parseInt(_0x1b6f76(0xb4))/0xa;if(_0x198ddc===_0x113191)break;else _0x2e6e63['push'](_0x2e6e63['shift']());}catch(_0x257362){_0x2e6e63['push'](_0x2e6e63['shift']());}}}(a33_0x538b,0x31c4d));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x16850a,_0x3fd5ea)=>{const _0x26bca9=a33_0x1fce,_0x26ec3e=Date[_0x26bca9(0xb2)]();logger[_0x26bca9(0xaf)](_0x26bca9(0xa4),'开始构建项目',{'command':_0x26bca9(0xa2)});let _0x29b347='';const _0x354fe3=spawn(_0x26bca9(0x9e),['run',_0x26bca9(0xa4)],{'stdio':[_0x26bca9(0xa8),'inherit',_0x26bca9(0xb8)],'shell':!![],'env':{...process[_0x26bca9(0xa6)],'PATH':''+join(process[_0x26bca9(0xb7)](),_0x26bca9(0xa3),_0x26bca9(0xbb))+delimiter+process[_0x26bca9(0xa6)][_0x26bca9(0xa9)]}});_0x354fe3['stderr']?.['on']('data',_0x522209=>{const _0x376e15=_0x26bca9;_0x29b347+=_0x522209[_0x376e15(0xb0)]();}),_0x354fe3['on']('close',_0xbefa24=>{const _0x5d7b23=_0x26bca9,_0x2e6523=Date[_0x5d7b23(0xb2)]()-_0x26ec3e;if(_0xbefa24===0x0||_0xbefa24===null)logger[_0x5d7b23(0xa7)]('build','项目构建成功',_0x2e6523),_0x16850a();else{const _0x429a02={'exitCode':_0xbefa24,'duration':_0x2e6523,'command':'npm\x20run\x20build','cwd':process['cwd']()};_0x29b347[_0x5d7b23(0xb9)]()&&(_0x429a02[_0x5d7b23(0xac)]=_0x29b347[_0x5d7b23(0xb9)]()),logger['error'](_0x5d7b23(0xa4),_0x5d7b23(0xae),_0x429a02),_0x3fd5ea(new Error(_0x5d7b23(0xa1)+_0xbefa24));}}),_0x354fe3['on'](_0x26bca9(0xb5),_0x1bd492=>{const _0x2fd4d1=_0x26bca9,_0x561437=Date['now']()-_0x26ec3e;logger['error']('build','项目构建出错',{'error':_0x1bd492[_0x2fd4d1(0xa0)],'duration':_0x561437,'stderr':_0x29b347[_0x2fd4d1(0xb9)]()||undefined}),_0x3fd5ea(_0x1bd492);});});}function a33_0x538b(){const _0x984481=['inherit','PATH','661242eHEBYA','77137ynBWmx','stderr','860478iLmhSp','项目构建失败','info','toString','10ZgteEI','now','5iRtefI','3959480zqSkfE','error','108968oNitif','cwd','pipe','trim','3089574UkUAMA','.bin','npm','161XsMUTX','message','npm\x20run\x20build\x20exited\x20with\x20code\x20','npm\x20run\x20build','node_modules','build','139640PXDBxp','env','success'];a33_0x538b=function(){return _0x984481;};return a33_0x538b();}
1
+ (function(_0x588ad6,_0x155a30){const _0x648ebb=a34_0xb57c,_0x4e9f0b=_0x588ad6();while(!![]){try{const _0x47415f=parseInt(_0x648ebb(0xdf))/0x1+-parseInt(_0x648ebb(0xe6))/0x2+-parseInt(_0x648ebb(0xe3))/0x3+-parseInt(_0x648ebb(0xde))/0x4+-parseInt(_0x648ebb(0xec))/0x5+parseInt(_0x648ebb(0xe0))/0x6*(parseInt(_0x648ebb(0xee))/0x7)+parseInt(_0x648ebb(0xd8))/0x8;if(_0x47415f===_0x155a30)break;else _0x4e9f0b['push'](_0x4e9f0b['shift']());}catch(_0x5065c4){_0x4e9f0b['push'](_0x4e9f0b['shift']());}}}(a34_0x2669,0x63001));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a34_0xb57c(_0x318002,_0x2d999d){_0x318002=_0x318002-0xd7;const _0x266963=a34_0x2669();let _0xb57c85=_0x266963[_0x318002];return _0xb57c85;}import{logger}from'../utils/logger.js';function a34_0x2669(){const _0x22f89d=['开始构建项目','.bin','data','toString','2712385nJlbsT','cwd','2679180plMJTh','success','now','error','项目构建成功','info','run','env','message','11349744IkQKGB','close','PATH','pipe','stderr','node_modules','2645844tpwxEa','475825SsAcpU','12rkvrvI','inherit','npm\x20run\x20build\x20exited\x20with\x20code\x20','1983645zYFQGZ','npm\x20run\x20build','build','778730XFATBs','trim'];a34_0x2669=function(){return _0x22f89d;};return a34_0x2669();}export function runBuild(){return new Promise((_0x2060d3,_0x3e69dc)=>{const _0x57d93c=a34_0xb57c,_0x116840=Date['now']();logger[_0x57d93c(0xf3)](_0x57d93c(0xe5),_0x57d93c(0xe8),{'command':_0x57d93c(0xe4)});let _0x4ceb49='';const _0x178351=spawn('npm',[_0x57d93c(0xf4),_0x57d93c(0xe5)],{'stdio':['inherit',_0x57d93c(0xe1),_0x57d93c(0xdb)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x57d93c(0xed)](),_0x57d93c(0xdd),_0x57d93c(0xe9))+delimiter+process[_0x57d93c(0xf5)][_0x57d93c(0xda)]}});_0x178351[_0x57d93c(0xdc)]?.['on'](_0x57d93c(0xea),_0x1fe830=>{const _0x6b3531=_0x57d93c;_0x4ceb49+=_0x1fe830[_0x6b3531(0xeb)]();}),_0x178351['on'](_0x57d93c(0xd9),_0x52df4f=>{const _0x97cb92=_0x57d93c,_0x4b2612=Date[_0x97cb92(0xf0)]()-_0x116840;if(_0x52df4f===0x0||_0x52df4f===null)logger[_0x97cb92(0xef)](_0x97cb92(0xe5),_0x97cb92(0xf2),_0x4b2612),_0x2060d3();else{const _0x3a0ef2={'exitCode':_0x52df4f,'duration':_0x4b2612,'command':'npm\x20run\x20build','cwd':process[_0x97cb92(0xed)]()};_0x4ceb49[_0x97cb92(0xe7)]()&&(_0x3a0ef2[_0x97cb92(0xdc)]=_0x4ceb49[_0x97cb92(0xe7)]()),logger[_0x97cb92(0xf1)](_0x97cb92(0xe5),'项目构建失败',_0x3a0ef2),_0x3e69dc(new Error(_0x97cb92(0xe2)+_0x52df4f));}}),_0x178351['on'](_0x57d93c(0xf1),_0x41e0ad=>{const _0x54e82c=_0x57d93c,_0xf6b9c5=Date[_0x54e82c(0xf0)]()-_0x116840;logger[_0x54e82c(0xf1)](_0x54e82c(0xe5),'项目构建出错',{'error':_0x41e0ad[_0x54e82c(0xd7)],'duration':_0xf6b9c5,'stderr':_0x4ceb49['trim']()||undefined}),_0x3e69dc(_0x41e0ad);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function a34_0x49bf(_0x40839c,_0x1bad38){_0x40839c=_0x40839c-0x169;const _0x3121a4=a34_0x3121();let _0x49bfa3=_0x3121a4[_0x40839c];return _0x49bfa3;}(function(_0x84843e,_0xc931d){const _0x45e1dd=a34_0x49bf,_0x35b569=_0x84843e();while(!![]){try{const _0x47ee5f=parseInt(_0x45e1dd(0x189))/0x1*(parseInt(_0x45e1dd(0x18b))/0x2)+parseInt(_0x45e1dd(0x175))/0x3*(-parseInt(_0x45e1dd(0x187))/0x4)+-parseInt(_0x45e1dd(0x17b))/0x5+-parseInt(_0x45e1dd(0x18a))/0x6*(-parseInt(_0x45e1dd(0x17e))/0x7)+parseInt(_0x45e1dd(0x17c))/0x8+-parseInt(_0x45e1dd(0x169))/0x9*(-parseInt(_0x45e1dd(0x174))/0xa)+parseInt(_0x45e1dd(0x16d))/0xb*(-parseInt(_0x45e1dd(0x172))/0xc);if(_0x47ee5f===_0xc931d)break;else _0x35b569['push'](_0x35b569['shift']());}catch(_0x40a881){_0x35b569['push'](_0x35b569['shift']());}}}(a34_0x3121,0x60a00));function a34_0x3121(){const _0x3fc34a=['55143rwIPoK','*\x20日志已清空','timestamp','forEach','\x20\x20\x20耗时:\x20','1116zhweMY','cwd','20FUplbv','87tzwkDk','details','duration','\x20\x20\x20详情:\x20','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','keys','3832710XXGjxl','2035456qJUVMz','message','805tTUnrn','readLogs','*\x20暂无日志记录','toLocaleString','warn','stringify','setLogPath','level','error','26576EtyZRt','length','396952qofzQa','39786YHxPtZ','2UCWpIA','log','1832643obSpjV','clearLogs','success','zh-CN'];a34_0x3121=function(){return _0x3fc34a;};return a34_0x3121();}import{logger}from'../utils/logger.js';export function showLogs(){const _0x56648c=a34_0x49bf;logger['setLogPath'](process[_0x56648c(0x173)]());const _0x10b69d=logger[_0x56648c(0x17f)]();if(_0x10b69d[_0x56648c(0x188)]===0x0){console['log'](_0x56648c(0x180));return;}console[_0x56648c(0x18c)](_0x56648c(0x179)),_0x10b69d[_0x56648c(0x170)]((_0x24790e,_0x3ee162)=>{const _0x326825=_0x56648c,_0x5b18bb=new Date(_0x24790e[_0x326825(0x16f)])[_0x326825(0x181)](_0x326825(0x16c)),_0x4f271e=_0x24790e[_0x326825(0x185)]===_0x326825(0x16b)?'√':_0x24790e[_0x326825(0x185)]===_0x326825(0x186)?'×':_0x24790e[_0x326825(0x185)]===_0x326825(0x182)?'!':'i';console['log'](_0x3ee162+0x1+'.\x20'+_0x4f271e+'\x20['+_0x24790e['command']+']\x20'+_0x24790e[_0x326825(0x17d)]),console[_0x326825(0x18c)]('\x20\x20\x20时间:\x20'+_0x5b18bb),_0x24790e[_0x326825(0x177)]&&console['log'](_0x326825(0x171)+_0x24790e[_0x326825(0x177)]+'ms'),_0x24790e[_0x326825(0x176)]&&Object[_0x326825(0x17a)](_0x24790e[_0x326825(0x176)])['length']>0x0&&console[_0x326825(0x18c)](_0x326825(0x178)+JSON[_0x326825(0x183)](_0x24790e[_0x326825(0x176)],null,0x2)),console[_0x326825(0x18c)]('');});}export function clearLogs(){const _0x5eee62=a34_0x49bf;logger[_0x5eee62(0x184)](process[_0x5eee62(0x173)]()),logger[_0x5eee62(0x16a)](),console[_0x5eee62(0x18c)](_0x5eee62(0x16e));}
1
+ (function(_0x44d1f8,_0x799f32){const _0x3408cd=a35_0xef4c,_0x1b367c=_0x44d1f8();while(!![]){try{const _0x52f1c=parseInt(_0x3408cd(0xe7))/0x1+-parseInt(_0x3408cd(0xff))/0x2*(parseInt(_0x3408cd(0xea))/0x3)+parseInt(_0x3408cd(0xee))/0x4*(-parseInt(_0x3408cd(0xe3))/0x5)+-parseInt(_0x3408cd(0xfa))/0x6+parseInt(_0x3408cd(0xf2))/0x7+parseInt(_0x3408cd(0xfb))/0x8*(-parseInt(_0x3408cd(0xe0))/0x9)+parseInt(_0x3408cd(0xe6))/0xa*(parseInt(_0x3408cd(0xfe))/0xb);if(_0x52f1c===_0x799f32)break;else _0x1b367c['push'](_0x1b367c['shift']());}catch(_0x57675d){_0x1b367c['push'](_0x1b367c['shift']());}}}(a35_0x3958,0xf1125));function a35_0xef4c(_0x3330bd,_0xf77fc8){_0x3330bd=_0x3330bd-0xdf;const _0x3958d1=a35_0x3958();let _0xef4c0c=_0x3958d1[_0x3330bd];return _0xef4c0c;}import{logger}from'../utils/logger.js';export function showLogs(){const _0x4979a4=a35_0xef4c;logger[_0x4979a4(0xf4)](process[_0x4979a4(0xf6)]());const _0x489c36=logger[_0x4979a4(0xf9)]();if(_0x489c36['length']===0x0){console[_0x4979a4(0xed)](_0x4979a4(0xe8));return;}console['log'](_0x4979a4(0xe2)),_0x489c36[_0x4979a4(0xf3)]((_0x2ee02f,_0x493c20)=>{const _0x960d34=_0x4979a4,_0x4595ea=new Date(_0x2ee02f['timestamp'])['toLocaleString'](_0x960d34(0xe9)),_0x371d58=_0x2ee02f[_0x960d34(0xf0)]===_0x960d34(0xeb)?'√':_0x2ee02f[_0x960d34(0xf0)]===_0x960d34(0xf7)?'×':_0x2ee02f['level']==='warn'?'!':'i';console['log'](_0x493c20+0x1+'.\x20'+_0x371d58+'\x20['+_0x2ee02f[_0x960d34(0xe4)]+']\x20'+_0x2ee02f[_0x960d34(0xfd)]),console[_0x960d34(0xed)](_0x960d34(0xef)+_0x4595ea),_0x2ee02f[_0x960d34(0xf1)]&&console['log'](_0x960d34(0xec)+_0x2ee02f[_0x960d34(0xf1)]+'ms'),_0x2ee02f[_0x960d34(0xfc)]&&Object[_0x960d34(0xf8)](_0x2ee02f['details'])[_0x960d34(0xe1)]>0x0&&console[_0x960d34(0xed)](_0x960d34(0xe5)+JSON['stringify'](_0x2ee02f[_0x960d34(0xfc)],null,0x2)),console[_0x960d34(0xed)]('');});}export function clearLogs(){const _0x3b9709=a35_0xef4c;logger[_0x3b9709(0xf4)](process[_0x3b9709(0xf6)]()),logger[_0x3b9709(0xdf)](),console['log'](_0x3b9709(0xf5));}function a35_0x3958(){const _0x58d194=['9456475hTkrbI','forEach','setLogPath','*\x20日志已清空','cwd','error','keys','readLogs','6084786bhjtDO','344DSDNTE','details','message','22CZyynY','214534iEachw','clearLogs','94410HMACYv','length','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','5eVxHZo','command','\x20\x20\x20详情:\x20','4355710TftYHI','1357195JtauIX','*\x20暂无日志记录','zh-CN','21oGrToW','success','\x20\x20\x20耗时:\x20','log','1503052xQQmPt','\x20\x20\x20时间:\x20','level','duration'];a35_0x3958=function(){return _0x58d194;};return a35_0x3958();}
@@ -1 +1 @@
1
- function a35_0x58ec(_0x498211,_0x1771d6){_0x498211=_0x498211-0x1a6;const _0x34a6f8=a35_0x34a6();let _0x58ecc9=_0x34a6f8[_0x498211];return _0x58ecc9;}(function(_0x127d2d,_0x478cb7){const _0x5cae3f=a35_0x58ec,_0x41fa83=_0x127d2d();while(!![]){try{const _0x435de9=-parseInt(_0x5cae3f(0x1ac))/0x1+-parseInt(_0x5cae3f(0x1b8))/0x2+-parseInt(_0x5cae3f(0x1a9))/0x3*(-parseInt(_0x5cae3f(0x1ad))/0x4)+-parseInt(_0x5cae3f(0x1c1))/0x5*(-parseInt(_0x5cae3f(0x1be))/0x6)+-parseInt(_0x5cae3f(0x1b5))/0x7+parseInt(_0x5cae3f(0x1b6))/0x8*(-parseInt(_0x5cae3f(0x1bd))/0x9)+parseInt(_0x5cae3f(0x1a8))/0xa;if(_0x435de9===_0x478cb7)break;else _0x41fa83['push'](_0x41fa83['shift']());}catch(_0x5647ee){_0x41fa83['push'](_0x41fa83['shift']());}}}(a35_0x34a6,0x66d2b));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a35_0x34a6(){const _0x5c699e=['预览服务器启动出错','toString','preview','9mXCHol','2305602SOBuvC','error','vite\x20preview','5rLOWKM','vite','now','PATH','13605830hjDLCs','54rHOEOK','message','trim','42572MGwzDF','25556iLupVy','info','inherit','stderr','启动预览服务器','success','vite\x20preview\x20exited\x20with\x20code\x20','env','5139078rfJdeM','2879896ctGDYj','预览服务器启动成功','603952hZrSNd','预览服务器启动失败'];a35_0x34a6=function(){return _0x5c699e;};return a35_0x34a6();}export function runPreview(){return new Promise((_0x44892d,_0x13e749)=>{const _0x11d53d=a35_0x58ec,_0x20cf07=Date['now']();logger[_0x11d53d(0x1ae)]('preview',_0x11d53d(0x1b1),{'command':_0x11d53d(0x1c0)});let _0x45a223='';const _0x594430=spawn(_0x11d53d(0x1c2),['preview'],{'stdio':[_0x11d53d(0x1af),_0x11d53d(0x1af),'pipe'],'shell':!![],'env':{...process[_0x11d53d(0x1b4)],'PATH':''+join(process['cwd'](),'node_modules','.bin')+delimiter+process['env'][_0x11d53d(0x1a7)]}});_0x594430[_0x11d53d(0x1b0)]?.['on']('data',_0x1bef5e=>{const _0x40eb59=_0x11d53d;_0x45a223+=_0x1bef5e[_0x40eb59(0x1bb)]();}),_0x594430['on']('close',_0x50d6b9=>{const _0x6c3459=_0x11d53d,_0x54dc47=Date[_0x6c3459(0x1a6)]()-_0x20cf07;if(_0x50d6b9===0x0||_0x50d6b9===null)logger[_0x6c3459(0x1b2)](_0x6c3459(0x1bc),_0x6c3459(0x1b7),_0x54dc47),_0x44892d();else{const _0x4417ae={'exitCode':_0x50d6b9,'duration':_0x54dc47,'command':_0x6c3459(0x1c0),'cwd':process['cwd']()};_0x45a223['trim']()&&(_0x4417ae[_0x6c3459(0x1b0)]=_0x45a223[_0x6c3459(0x1ab)]()),logger[_0x6c3459(0x1bf)]('preview',_0x6c3459(0x1b9),_0x4417ae),_0x13e749(new Error(_0x6c3459(0x1b3)+_0x50d6b9));}}),_0x594430['on'](_0x11d53d(0x1bf),_0x540e4e=>{const _0x3f4074=_0x11d53d,_0x14ed54=Date[_0x3f4074(0x1a6)]()-_0x20cf07;logger['error']('preview',_0x3f4074(0x1ba),{'error':_0x540e4e[_0x3f4074(0x1aa)],'duration':_0x14ed54,'stderr':_0x45a223[_0x3f4074(0x1ab)]()||undefined}),_0x13e749(_0x540e4e);});});}
1
+ (function(_0x5a7edd,_0x20e14d){const _0x57b6bb=a36_0xc87e,_0x3fbbbd=_0x5a7edd();while(!![]){try{const _0x391176=-parseInt(_0x57b6bb(0x117))/0x1*(parseInt(_0x57b6bb(0x107))/0x2)+-parseInt(_0x57b6bb(0x120))/0x3+parseInt(_0x57b6bb(0x114))/0x4*(-parseInt(_0x57b6bb(0x10f))/0x5)+parseInt(_0x57b6bb(0x124))/0x6*(-parseInt(_0x57b6bb(0x121))/0x7)+parseInt(_0x57b6bb(0x10d))/0x8+parseInt(_0x57b6bb(0x111))/0x9*(parseInt(_0x57b6bb(0x122))/0xa)+parseInt(_0x57b6bb(0x11c))/0xb;if(_0x391176===_0x20e14d)break;else _0x3fbbbd['push'](_0x3fbbbd['shift']());}catch(_0x86b692){_0x3fbbbd['push'](_0x3fbbbd['shift']());}}}(a36_0x4ab6,0xc853a));function a36_0xc87e(_0x45b237,_0x3158d2){_0x45b237=_0x45b237-0x105;const _0x4ab666=a36_0x4ab6();let _0xc87e2e=_0x4ab666[_0x45b237];return _0xc87e2e;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a36_0x4ab6(){const _0x384fdf=['vite\x20preview\x20exited\x20with\x20code\x20','cwd','19276uFIueW','trim','PATH','1zTOrDr','now','message','vite\x20preview','info','23413280LhOvpI','env','pipe','preview','4192401lkeEqT','91dEJQMl','420gzUEMz','toString','151434BAsxDO','启动预览服务器','success','data','1193606YWkRrh','预览服务器启动出错','inherit','vite','预览服务器启动成功','close','9941984bUstrv','error','1145itBrjm','stderr','187551BfOcvc'];a36_0x4ab6=function(){return _0x384fdf;};return a36_0x4ab6();}export function runPreview(){return new Promise((_0x3e9ae3,_0x4fcdf0)=>{const _0x344f81=a36_0xc87e,_0x4b26f8=Date['now']();logger[_0x344f81(0x11b)]('preview',_0x344f81(0x125),{'command':_0x344f81(0x11a)});let _0x4cf412='';const _0x2510ab=spawn(_0x344f81(0x10a),[_0x344f81(0x11f)],{'stdio':[_0x344f81(0x109),'inherit',_0x344f81(0x11e)],'shell':!![],'env':{...process[_0x344f81(0x11d)],'PATH':''+join(process[_0x344f81(0x113)](),'node_modules','.bin')+delimiter+process['env'][_0x344f81(0x116)]}});_0x2510ab[_0x344f81(0x110)]?.['on'](_0x344f81(0x106),_0x5a0b7d=>{const _0x536b4e=_0x344f81;_0x4cf412+=_0x5a0b7d[_0x536b4e(0x123)]();}),_0x2510ab['on'](_0x344f81(0x10c),_0x5f015a=>{const _0x27bcf5=_0x344f81,_0x4bb7f5=Date[_0x27bcf5(0x118)]()-_0x4b26f8;if(_0x5f015a===0x0||_0x5f015a===null)logger[_0x27bcf5(0x105)](_0x27bcf5(0x11f),_0x27bcf5(0x10b),_0x4bb7f5),_0x3e9ae3();else{const _0x59ba87={'exitCode':_0x5f015a,'duration':_0x4bb7f5,'command':_0x27bcf5(0x11a),'cwd':process[_0x27bcf5(0x113)]()};_0x4cf412[_0x27bcf5(0x115)]()&&(_0x59ba87[_0x27bcf5(0x110)]=_0x4cf412['trim']()),logger[_0x27bcf5(0x10e)](_0x27bcf5(0x11f),'预览服务器启动失败',_0x59ba87),_0x4fcdf0(new Error(_0x27bcf5(0x112)+_0x5f015a));}}),_0x2510ab['on'](_0x344f81(0x10e),_0x40bb2e=>{const _0x13a445=_0x344f81,_0x3fe8dc=Date[_0x13a445(0x118)]()-_0x4b26f8;logger[_0x13a445(0x10e)](_0x13a445(0x11f),_0x13a445(0x108),{'error':_0x40bb2e[_0x13a445(0x119)],'duration':_0x3fe8dc,'stderr':_0x4cf412[_0x13a445(0x115)]()||undefined}),_0x4fcdf0(_0x40bb2e);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- function a36_0x3184(){const _0x53e202=['start','stderr','4MKQkSG','message','info','CLI\x20版本有更新','开发服务器启动失败','success','30534HnCjmf','error','14390khkRBq','close','stableVersion','env','data','29255FLilBw','inherit','trim','version','.bin','启动开发服务器','720895CGFIeS','SDK\x20版本有更新','693201KjxXYh','1oimHcD','now','warn','PATH','needsUpgrade','node_modules','cwd','toString','739161JLyIkm','pipe','vite','开发服务器启动成功','1254qKugxw','3869136fOeNBc','408XUyLlC'];a36_0x3184=function(){return _0x53e202;};return a36_0x3184();}(function(_0x45517b,_0x39e3e1){const _0x3de095=a36_0x29f9,_0x28c8bb=_0x45517b();while(!![]){try{const _0x778f3c=parseInt(_0x3de095(0x126))/0x1*(-parseInt(_0x3de095(0x116))/0x2)+-parseInt(_0x3de095(0x125))/0x3*(parseInt(_0x3de095(0x110))/0x4)+parseInt(_0x3de095(0x11d))/0x5*(parseInt(_0x3de095(0x10d))/0x6)+-parseInt(_0x3de095(0x123))/0x7+parseInt(_0x3de095(0x10c))/0x8+-parseInt(_0x3de095(0x107))/0x9+-parseInt(_0x3de095(0x118))/0xa*(parseInt(_0x3de095(0x10b))/0xb);if(_0x778f3c===_0x39e3e1)break;else _0x28c8bb['push'](_0x28c8bb['shift']());}catch(_0x2f2119){_0x28c8bb['push'](_0x28c8bb['shift']());}}}(a36_0x3184,0x45d40));function a36_0x29f9(_0x288431,_0x3a53e0){_0x288431=_0x288431-0x105;const _0x31847a=a36_0x3184();let _0x29f937=_0x31847a[_0x288431];return _0x29f937;}import{delimiter,join}from'node:path';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';export async function runStart(_0x33ee0f){const _0x448e48=a36_0x29f9,_0x4c861d=Date[_0x448e48(0x127)](),_0xcb4ce7=_0x33ee0f||process[_0x448e48(0x105)](),_0x203684=await checkCliVersion();_0x203684[_0x448e48(0x12a)]&&(printCliUpgradeWarning(_0x203684),logger[_0x448e48(0x128)](_0x448e48(0x10e),_0x448e48(0x113),{'currentVersion':_0x203684['currentVersion'],'stableVersion':_0x203684[_0x448e48(0x11a)]}));const _0x23db39=await checkSdkVersion(_0xcb4ce7);_0x23db39[_0x448e48(0x12a)]&&(printSdkUpgradeWarning(_0x23db39),logger[_0x448e48(0x128)]('start',_0x448e48(0x124),{'currentVersion':_0x23db39[_0x448e48(0x120)],'stableVersion':_0x23db39[_0x448e48(0x11a)]}));logger[_0x448e48(0x112)](_0x448e48(0x10e),_0x448e48(0x122),{'command':_0x448e48(0x109),'cwd':_0xcb4ce7});let _0x34cc21='';const _0x1f8cc8=spawn(_0x448e48(0x109),{'stdio':[_0x448e48(0x11e),_0x448e48(0x11e),_0x448e48(0x108)],'shell':!![],'cwd':_0xcb4ce7,'env':{...process[_0x448e48(0x11b)],'PATH':''+join(_0xcb4ce7,_0x448e48(0x12b),_0x448e48(0x121))+delimiter+process[_0x448e48(0x11b)][_0x448e48(0x129)]}});return _0x1f8cc8[_0x448e48(0x10f)]?.['on'](_0x448e48(0x11c),_0xd9c302=>{const _0x15ebc3=_0x448e48,_0x364f85=_0xd9c302[_0x15ebc3(0x106)]();_0x34cc21+=_0x364f85,process[_0x15ebc3(0x10f)]['write'](_0x364f85);}),new Promise((_0xb8a0b4,_0x1b3af6)=>{const _0x304cd9=_0x448e48;_0x1f8cc8['on'](_0x304cd9(0x119),_0x124ddb=>{const _0x393c91=_0x304cd9,_0x5e3f3a=Date[_0x393c91(0x127)]()-_0x4c861d;if(_0x124ddb===0x0||_0x124ddb===null)logger[_0x393c91(0x115)](_0x393c91(0x10e),_0x393c91(0x10a),_0x5e3f3a),_0xb8a0b4();else{const _0x309368={'exitCode':_0x124ddb,'duration':_0x5e3f3a,'command':_0x393c91(0x109),'cwd':_0xcb4ce7};_0x34cc21[_0x393c91(0x11f)]()&&(_0x309368['stderr']=_0x34cc21[_0x393c91(0x11f)]()),logger[_0x393c91(0x117)](_0x393c91(0x10e),_0x393c91(0x114),_0x309368),_0x1b3af6(new Error('vite\x20exited\x20with\x20code\x20'+_0x124ddb));}}),_0x1f8cc8['on']('error',_0x9f69e2=>{const _0x1ff7b4=_0x304cd9,_0x2db26d=Date[_0x1ff7b4(0x127)]()-_0x4c861d,_0x221014={'error':_0x9f69e2[_0x1ff7b4(0x111)],'duration':_0x2db26d,'command':'vite','cwd':_0xcb4ce7};_0x34cc21[_0x1ff7b4(0x11f)]()&&(_0x221014[_0x1ff7b4(0x10f)]=_0x34cc21['trim']()),logger[_0x1ff7b4(0x117)]('start','开发服务器启动出错',_0x221014),_0x1b3af6(_0x9f69e2);});});}
1
+ (function(_0x1e6a69,_0x2f71b2){const _0x3756d4=a37_0x3aa2,_0x56ced8=_0x1e6a69();while(!![]){try{const _0x4a92da=parseInt(_0x3756d4(0xcb))/0x1*(parseInt(_0x3756d4(0xd8))/0x2)+parseInt(_0x3756d4(0xd0))/0x3+parseInt(_0x3756d4(0xd2))/0x4*(parseInt(_0x3756d4(0xd1))/0x5)+-parseInt(_0x3756d4(0xe0))/0x6+-parseInt(_0x3756d4(0xc9))/0x7*(-parseInt(_0x3756d4(0xd9))/0x8)+parseInt(_0x3756d4(0xcf))/0x9*(-parseInt(_0x3756d4(0xd4))/0xa)+parseInt(_0x3756d4(0xd7))/0xb;if(_0x4a92da===_0x2f71b2)break;else _0x56ced8['push'](_0x56ced8['shift']());}catch(_0x432fe8){_0x56ced8['push'](_0x56ced8['shift']());}}}(a37_0x2e02,0xb0946));import{delimiter,join}from'node:path';function a37_0x3aa2(_0x517da7,_0x16dc5f){_0x517da7=_0x517da7-0xc5;const _0x2e0259=a37_0x2e02();let _0x3aa2cc=_0x2e0259[_0x517da7];return _0x3aa2cc;}import{spawn}from'node:child_process';function a37_0x2e02(){const _0x33aa0a=['开发服务器启动失败','开发服务器启动出错','11090662KlZJxR','1365542fBSxte','114496DQmFFC','start','vite\x20exited\x20with\x20code\x20','SDK\x20版本有更新','now','env','error','8076594hqixZe','warn','stderr','write','CLI\x20版本有更新','inherit','vite','info','currentVersion','启动开发服务器','toString','cwd','stableVersion','266tGNgWj','message','1ccFead','trim','.bin','needsUpgrade','369VolQHk','597603jgTWdm','545AMLlWl','35332dAKyJa','开发服务器启动成功','323780xVaduA'];a37_0x2e02=function(){return _0x33aa0a;};return a37_0x2e02();}import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x3306a5){const _0x5e0bd3=a37_0x3aa2,_0x528f79=Date[_0x5e0bd3(0xdd)](),_0x3d7622=_0x3306a5||process[_0x5e0bd3(0xc7)](),_0x13b026=await checkCliVersion();_0x13b026[_0x5e0bd3(0xce)]&&(printCliUpgradeWarning(_0x13b026),logger[_0x5e0bd3(0xe1)](_0x5e0bd3(0xda),_0x5e0bd3(0xe4),{'currentVersion':_0x13b026[_0x5e0bd3(0xe8)],'stableVersion':_0x13b026[_0x5e0bd3(0xc8)]}));const _0x46d9=await checkSdkVersion(_0x3d7622);_0x46d9[_0x5e0bd3(0xce)]&&(printSdkUpgradeWarning(_0x46d9),logger[_0x5e0bd3(0xe1)](_0x5e0bd3(0xda),_0x5e0bd3(0xdc),{'currentVersion':_0x46d9['version'],'stableVersion':_0x46d9[_0x5e0bd3(0xc8)]}));logger[_0x5e0bd3(0xe7)]('start',_0x5e0bd3(0xc5),{'command':_0x5e0bd3(0xe6),'cwd':_0x3d7622});let _0x40b5fb='';const _0xed4466=spawn(_0x5e0bd3(0xe6),{'stdio':[_0x5e0bd3(0xe5),_0x5e0bd3(0xe5),'pipe'],'shell':!![],'cwd':_0x3d7622,'env':{...process[_0x5e0bd3(0xde)],'PATH':''+join(_0x3d7622,'node_modules',_0x5e0bd3(0xcd))+delimiter+process[_0x5e0bd3(0xde)]['PATH']}});return _0xed4466[_0x5e0bd3(0xe2)]?.['on']('data',_0x7b0a5b=>{const _0x4e1264=_0x5e0bd3,_0x5cde56=_0x7b0a5b[_0x4e1264(0xc6)]();_0x40b5fb+=_0x5cde56,process['stderr'][_0x4e1264(0xe3)](_0x5cde56);}),new Promise((_0x57903e,_0x4713d8)=>{const _0x201cb6=_0x5e0bd3;_0xed4466['on']('close',_0x392cad=>{const _0x2b2196=a37_0x3aa2,_0x436ef7=Date[_0x2b2196(0xdd)]()-_0x528f79;if(_0x392cad===0x0||_0x392cad===null)logger['success'](_0x2b2196(0xda),_0x2b2196(0xd3),_0x436ef7),_0x57903e();else{const _0x5f2351={'exitCode':_0x392cad,'duration':_0x436ef7,'command':_0x2b2196(0xe6),'cwd':_0x3d7622};_0x40b5fb[_0x2b2196(0xcc)]()&&(_0x5f2351['stderr']=_0x40b5fb['trim']()),logger[_0x2b2196(0xdf)](_0x2b2196(0xda),_0x2b2196(0xd5),_0x5f2351),_0x4713d8(new Error(_0x2b2196(0xdb)+_0x392cad));}}),_0xed4466['on'](_0x201cb6(0xdf),_0x6fc3fe=>{const _0x395a50=_0x201cb6,_0xa8b5b6=Date[_0x395a50(0xdd)]()-_0x528f79,_0x4a8092={'error':_0x6fc3fe[_0x395a50(0xca)],'duration':_0xa8b5b6,'command':_0x395a50(0xe6),'cwd':_0x3d7622};_0x40b5fb[_0x395a50(0xcc)]()&&(_0x4a8092['stderr']=_0x40b5fb[_0x395a50(0xcc)]()),logger[_0x395a50(0xdf)](_0x395a50(0xda),_0x395a50(0xd6),_0x4a8092),_0x4713d8(_0x6fc3fe);});});}
@@ -1 +1 @@
1
- (function(_0x33a766,_0x2bdbec){const _0x13e9ea=a37_0x4ad6,_0x2b30ca=_0x33a766();while(!![]){try{const _0xd28a60=parseInt(_0x13e9ea(0x8a))/0x1+-parseInt(_0x13e9ea(0x93))/0x2*(-parseInt(_0x13e9ea(0x8d))/0x3)+parseInt(_0x13e9ea(0x8c))/0x4*(-parseInt(_0x13e9ea(0x91))/0x5)+-parseInt(_0x13e9ea(0x9e))/0x6+-parseInt(_0x13e9ea(0x9d))/0x7*(parseInt(_0x13e9ea(0x99))/0x8)+-parseInt(_0x13e9ea(0x97))/0x9+parseInt(_0x13e9ea(0x9c))/0xa*(parseInt(_0x13e9ea(0x96))/0xb);if(_0xd28a60===_0x2bdbec)break;else _0x2b30ca['push'](_0x2b30ca['shift']());}catch(_0x423142){_0x2b30ca['push'](_0x2b30ca['shift']());}}}(a37_0x1f12,0x7df5a));import{jsxs as a37_0x4999ff,jsx as a37_0x136d2b}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2ff7ac=a37_0x4ad6,_0x4818ce=[{'command':_0x2ff7ac(0x98),'description':'设置配置项'},{'command':_0x2ff7ac(0x9a),'description':_0x2ff7ac(0x88)},{'command':_0x2ff7ac(0x90),'description':_0x2ff7ac(0x95)}],_0x549e55=[{'command':_0x2ff7ac(0x8f),'description':_0x2ff7ac(0x9f)},{'command':_0x2ff7ac(0x8e),'description':'设置环境\x20(online/daily)'}];return a37_0x4999ff(Box,{'flexDirection':_0x2ff7ac(0x89),'marginTop':0x1,'marginBottom':0x1,'children':[a37_0x136d2b(Box,{'marginBottom':0x1,'children':a37_0x4999ff(Text,{'color':_0x2ff7ac(0x8b),'children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x4818ce['map'](_0x3460fc=>a37_0x4999ff(Box,{'children':[a37_0x4999ff(Text,{'children':[_0x2ff7ac(0x9b),_0x3460fc['command']]}),a37_0x136d2b(Text,{'color':_0x2ff7ac(0x8b),'children':_0x3460fc[_0x2ff7ac(0x92)]})]},_0x3460fc['command'])),a37_0x136d2b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a37_0x136d2b(Text,{'color':_0x2ff7ac(0x8b),'children':'\x20*\x20配置示例:'})}),_0x549e55['map'](_0x38d9f5=>a37_0x4999ff(Box,{'children':[a37_0x4999ff(Text,{'children':[_0x2ff7ac(0x9b),_0x38d9f5[_0x2ff7ac(0x94)]]}),a37_0x136d2b(Text,{'color':_0x2ff7ac(0x8b),'children':_0x38d9f5[_0x2ff7ac(0x92)]})]},_0x38d9f5[_0x2ff7ac(0x94)]))]});}function a37_0x4ad6(_0x47f340,_0x23b61b){_0x47f340=_0x47f340-0x88;const _0x1f1262=a37_0x1f12();let _0x4ad6e7=_0x1f1262[_0x47f340];return _0x4ad6e7;}function a37_0x1f12(){const _0x1ba81b=['lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4666530GJSnER','description','2aYiUUW','command','列出所有配置项','11uWqHQq','2095812YPHFQc','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','7340032ibFjzu','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','28010860DqLEAP','7gQLPnB','3904992WSRrGa','配置当前项目的\x20App\x20Code','获取配置项','column','432000mPJwQY','gray','4CdiCsi','52062tTncbW'];a37_0x1f12=function(){return _0x1ba81b;};return a37_0x1f12();}
1
+ (function(_0x184d2c,_0x1f8ee8){const _0x5747f5=a38_0x3a01,_0x5abbda=_0x184d2c();while(!![]){try{const _0x9c1838=parseInt(_0x5747f5(0x153))/0x1+parseInt(_0x5747f5(0x160))/0x2*(-parseInt(_0x5747f5(0x156))/0x3)+parseInt(_0x5747f5(0x151))/0x4+parseInt(_0x5747f5(0x15e))/0x5+parseInt(_0x5747f5(0x15d))/0x6+-parseInt(_0x5747f5(0x162))/0x7+-parseInt(_0x5747f5(0x152))/0x8*(parseInt(_0x5747f5(0x165))/0x9);if(_0x9c1838===_0x1f8ee8)break;else _0x5abbda['push'](_0x5abbda['shift']());}catch(_0x21dfec){_0x5abbda['push'](_0x5abbda['shift']());}}}(a38_0x5c87,0xa5c4a));function a38_0x3a01(_0x4aed64,_0x2dcb2e){_0x4aed64=_0x4aed64-0x150;const _0x5c877b=a38_0x5c87();let _0x3a01b8=_0x5c877b[_0x4aed64];return _0x3a01b8;}function a38_0x5c87(){const _0x1429bd=['3064cpxsVz','150940qHnIzo','gray','无效的命令,可用命令如下:','5637vdSLRD','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','获取配置项','设置配置项','description','列出所有配置项','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3748710QkOEEe','4637670HkAJrj','\x20\x20\x20\x20','26ZZFHUU','command','4111975YMiBry','配置当前项目的\x20App\x20Code','map','15399XPAdZr','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','971568vGcwyf'];a38_0x5c87=function(){return _0x1429bd;};return a38_0x5c87();}import{jsxs as a38_0x55f1bd,jsx as a38_0x17d57f}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x5c134c=a38_0x3a01,_0x21abd7=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x5c134c(0x159)},{'command':_0x5c134c(0x15c),'description':_0x5c134c(0x158)},{'command':_0x5c134c(0x150),'description':_0x5c134c(0x15b)}],_0x579e5f=[{'command':_0x5c134c(0x166),'description':_0x5c134c(0x163)},{'command':_0x5c134c(0x157),'description':'设置环境\x20(online/daily)'}];return a38_0x55f1bd(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a38_0x17d57f(Box,{'marginBottom':0x1,'children':a38_0x55f1bd(Text,{'color':_0x5c134c(0x154),'children':['\x20!','\x20\x20',_0x5c134c(0x155)]})}),_0x21abd7[_0x5c134c(0x164)](_0x1abc76=>a38_0x55f1bd(Box,{'children':[a38_0x55f1bd(Text,{'children':['\x20\x20\x20\x20',_0x1abc76[_0x5c134c(0x161)]]}),a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':_0x1abc76['description']})]},_0x1abc76[_0x5c134c(0x161)])),a38_0x17d57f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':'\x20*\x20配置示例:'})}),_0x579e5f[_0x5c134c(0x164)](_0xb64f73=>a38_0x55f1bd(Box,{'children':[a38_0x55f1bd(Text,{'children':[_0x5c134c(0x15f),_0xb64f73[_0x5c134c(0x161)]]}),a38_0x17d57f(Text,{'color':_0x5c134c(0x154),'children':_0xb64f73[_0x5c134c(0x15a)]})]},_0xb64f73[_0x5c134c(0x161)]))]});}
@@ -1 +1 @@
1
- (function(_0x1e836e,_0x468f00){const _0x4a4c2c=a38_0x59eb,_0x27df2b=_0x1e836e();while(!![]){try{const _0x510b31=parseInt(_0x4a4c2c(0x192))/0x1*(-parseInt(_0x4a4c2c(0x186))/0x2)+-parseInt(_0x4a4c2c(0x191))/0x3*(parseInt(_0x4a4c2c(0x1a1))/0x4)+parseInt(_0x4a4c2c(0x189))/0x5+-parseInt(_0x4a4c2c(0x188))/0x6*(parseInt(_0x4a4c2c(0x193))/0x7)+parseInt(_0x4a4c2c(0x1a0))/0x8*(parseInt(_0x4a4c2c(0x182))/0x9)+-parseInt(_0x4a4c2c(0x183))/0xa+parseInt(_0x4a4c2c(0x195))/0xb*(-parseInt(_0x4a4c2c(0x19a))/0xc);if(_0x510b31===_0x468f00)break;else _0x27df2b['push'](_0x27df2b['shift']());}catch(_0x214358){_0x27df2b['push'](_0x27df2b['shift']());}}}(a38_0x23ae,0x46ec9));function a38_0x59eb(_0x32e921,_0xf17742){_0x32e921=_0x32e921-0x17e;const _0x23ae8f=a38_0x23ae();let _0x59eb68=_0x23ae8f[_0x32e921];return _0x59eb68;}function a38_0x23ae(){const _0x2d7f2f=['90EymAgj','2269525HTbaEo','message','未提供配置值','appcode','stringify','配置值无效或过长','log','set','64266eppTNb','1597IKtAFN','29834PTNuaR','red','7909pHihIq','online','unlinkSync','mkdirSync','保存配置失败','1236ZrZzyq','daily','input','app','length','--help','56vWZKKc','12aTOLGn','help','保存配置失败:\x20','get','renameSync','utf8','config','496413dXJIuP','2977390kgLTRr','includes','undefined','62lynQUa','error'];a38_0x23ae=function(){return _0x2d7f2f;};return a38_0x23ae();}import{jsx as a38_0x403198,jsxs as a38_0x2566b3}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a38_0x507739 from'node:fs';import a38_0x3742a7 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(_0x1d3ee4){const _0x672a43=a38_0x59eb,{cli:_0x3ea3b7}=_0x1d3ee4,_0xfa2c94=_0x3ea3b7[_0x672a43(0x19c)][0x1],_0x157945=_0x3ea3b7['input'][0x2],_0x3ad58a=[_0x672a43(0x190),_0x672a43(0x17e)][_0x672a43(0x184)](_0xfa2c94||''),_0x1cc528=_0x3ea3b7[_0x672a43(0x19c)]['length']>=0x3;if(_0x157945===_0x672a43(0x19f)||_0x3ea3b7['flags'][_0x672a43(0x1a2)])return a38_0x403198(ConfigHelp,{});const _0xe3dcf8=readConfig();if(_0xfa2c94===_0x672a43(0x190)){if(_0x157945){const _0x418433=_0x3ea3b7[_0x672a43(0x19c)][0x3];if(typeof _0x418433!=='undefined'){if(_0x157945==='env'&&![_0x672a43(0x196),_0x672a43(0x19b)][_0x672a43(0x184)](_0x418433))return a38_0x403198(Box,{'children':a38_0x403198(Text,{'color':_0x672a43(0x194),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x109871=isInProject(),_0x2ee96a=_0x109871?projectConfigPath:globalConfigPath;let _0x2cd76e={};try{if(existsSync(_0x2ee96a)){const _0xa439f4=readFileSync(_0x2ee96a,{'encoding':_0x672a43(0x180)});_0xa439f4&&(_0x2cd76e=JSON['parse'](_0xa439f4));}}catch(_0x549186){}if(typeof _0x418433!=='string'||_0x418433[_0x672a43(0x19e)]>0x1f4)return a38_0x403198(Box,{'children':a38_0x403198(Text,{'color':_0x672a43(0x194),'children':_0x672a43(0x18e)})});let _0x232909=_0x157945;_0x157945===_0x672a43(0x19d)&&(_0x232909=_0x672a43(0x18c),delete _0x2cd76e[_0x672a43(0x19d)]);_0x157945===_0x672a43(0x18c)&&delete _0x2cd76e['app'];_0x2cd76e[_0x232909]=_0x418433;try{const _0x33fc79=a38_0x3742a7['dirname'](_0x2ee96a);!existsSync(_0x33fc79)&&a38_0x507739[_0x672a43(0x198)](_0x33fc79,{'recursive':!![]});const _0x1c03c1=_0x2ee96a+'.tmp';writeFileSync(_0x1c03c1,JSON[_0x672a43(0x18d)](_0x2cd76e,null,0x2),{'encoding':_0x672a43(0x180),'mode':0x180}),a38_0x507739[_0x672a43(0x17f)](_0x1c03c1,_0x2ee96a);if(_0x157945==='env'){const _0x51607f=_0x109871?'项目':'全局';console['log']('✓\x20'+_0x51607f+'环境配置已设置为:\x20'+_0x418433);}}catch(_0x3a65fa){const _0x228721=_0x2ee96a+'.tmp';try{existsSync(_0x228721)&&a38_0x507739[_0x672a43(0x197)](_0x228721);}catch(_0xefbafe){}return logger[_0x672a43(0x187)](_0x672a43(0x181),_0x672a43(0x199),{'error':_0x3a65fa instanceof Error?_0x3a65fa['message']:String(_0x3a65fa),'configKey':_0x157945,'configValue':_0x418433,'targetConfigPath':_0x2ee96a}),a38_0x403198(Box,{'children':a38_0x2566b3(Text,{'color':_0x672a43(0x194),'children':[_0x672a43(0x1a3),_0x3a65fa instanceof Error?_0x3a65fa[_0x672a43(0x18a)]:String(_0x3a65fa)]})});}return null;}return a38_0x403198(Box,{'children':a38_0x403198(Text,{'color':_0x672a43(0x194),'children':_0x672a43(0x18b)})});}}if(_0xfa2c94===_0x672a43(0x17e)){if(_0x157945){let _0x5e2b45=_0x157945;return _0x157945===_0x672a43(0x19d)&&(_0x5e2b45=_0x672a43(0x18c)),console[_0x672a43(0x18f)](_0xe3dcf8[_0x5e2b45]||_0x672a43(0x185)),null;}return null;}if(_0xfa2c94==='list')return console[_0x672a43(0x18f)](JSON[_0x672a43(0x18d)](_0xe3dcf8,null,0x2)),null;if(!_0x3ad58a||!_0x1cc528)return a38_0x403198(ConfigHelp,{});return null;}
1
+ (function(_0x2e9da1,_0x4d1dc7){const _0x320092=a39_0x3fc0,_0x121d14=_0x2e9da1();while(!![]){try{const _0x3ba645=-parseInt(_0x320092(0x12b))/0x1*(-parseInt(_0x320092(0x136))/0x2)+-parseInt(_0x320092(0x13e))/0x3+parseInt(_0x320092(0x132))/0x4+parseInt(_0x320092(0x13c))/0x5+parseInt(_0x320092(0x13a))/0x6+parseInt(_0x320092(0x139))/0x7+-parseInt(_0x320092(0x12a))/0x8;if(_0x3ba645===_0x4d1dc7)break;else _0x121d14['push'](_0x121d14['shift']());}catch(_0x1a9f7c){_0x121d14['push'](_0x121d14['shift']());}}}(a39_0x49fe,0xe36fb));import{jsx as a39_0x16908a,jsxs as a39_0x51fc84}from'react/jsx-runtime';function a39_0x49fe(){const _0x368543=['unlinkSync','length','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','input','保存配置失败','app','get','保存配置失败:\x20','config','renameSync','stringify','red','dirname','string','9011896IzwxLh','1cfpzij','--help','undefined','utf8','环境配置已设置为:\x20','mkdirSync','env','3219096jrMwIO','未提供配置值','includes','log','1673726aqeabE','set','daily','8971816nmMwJj','3890700CfxVGa','appcode','1096210eksdBv','.tmp','5198853NKTRGe'];a39_0x49fe=function(){return _0x368543;};return a39_0x49fe();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import a39_0xa215a6 from'node:fs';import a39_0x3cd588 from'node:path';function a39_0x3fc0(_0x110f94,_0x492377){_0x110f94=_0x110f94-0x12a;const _0x49fe7f=a39_0x49fe();let _0x3fc0b6=_0x49fe7f[_0x110f94];return _0x3fc0b6;}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x3bff41){const _0x1c4781=a39_0x3fc0,{cli:_0x7ca689}=_0x3bff41,_0x2fce7a=_0x7ca689['input'][0x1],_0xfd952e=_0x7ca689['input'][0x2],_0x285c0d=[_0x1c4781(0x137),'get'][_0x1c4781(0x134)](_0x2fce7a||''),_0x38463d=_0x7ca689[_0x1c4781(0x142)][_0x1c4781(0x140)]>=0x3;if(_0xfd952e===_0x1c4781(0x12c)||_0x7ca689['flags']['help'])return a39_0x16908a(ConfigHelp,{});const _0x164ac0=readConfig();if(_0x2fce7a===_0x1c4781(0x137)){if(_0xfd952e){const _0xbda0d6=_0x7ca689['input'][0x3];if(typeof _0xbda0d6!=='undefined'){if(_0xfd952e===_0x1c4781(0x131)&&!['online',_0x1c4781(0x138)][_0x1c4781(0x134)](_0xbda0d6))return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':_0x1c4781(0x14a),'children':_0x1c4781(0x141)})});const _0x3326dc=isInProject(),_0x44373f=_0x3326dc?projectConfigPath:globalConfigPath;let _0x384684={};try{if(existsSync(_0x44373f)){const _0x371ceb=readFileSync(_0x44373f,{'encoding':_0x1c4781(0x12e)});_0x371ceb&&(_0x384684=JSON['parse'](_0x371ceb));}}catch(_0x506648){}if(typeof _0xbda0d6!==_0x1c4781(0x14c)||_0xbda0d6[_0x1c4781(0x140)]>0x1f4)return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':_0x1c4781(0x14a),'children':'配置值无效或过长'})});let _0x42847b=_0xfd952e;_0xfd952e===_0x1c4781(0x144)&&(_0x42847b=_0x1c4781(0x13b),delete _0x384684['app']);_0xfd952e===_0x1c4781(0x13b)&&delete _0x384684[_0x1c4781(0x144)];_0x384684[_0x42847b]=_0xbda0d6;try{const _0x4059a7=a39_0x3cd588[_0x1c4781(0x14b)](_0x44373f);!existsSync(_0x4059a7)&&a39_0xa215a6[_0x1c4781(0x130)](_0x4059a7,{'recursive':!![]});const _0x45bf73=_0x44373f+_0x1c4781(0x13d);writeFileSync(_0x45bf73,JSON['stringify'](_0x384684,null,0x2),{'encoding':_0x1c4781(0x12e),'mode':0x180}),a39_0xa215a6[_0x1c4781(0x148)](_0x45bf73,_0x44373f);if(_0xfd952e===_0x1c4781(0x131)){const _0x458bf5=_0x3326dc?'项目':'全局';console[_0x1c4781(0x135)]('✓\x20'+_0x458bf5+_0x1c4781(0x12f)+_0xbda0d6);}}catch(_0x36701f){const _0x3f6157=_0x44373f+'.tmp';try{existsSync(_0x3f6157)&&a39_0xa215a6[_0x1c4781(0x13f)](_0x3f6157);}catch(_0x5e6579){}return logger['error'](_0x1c4781(0x147),_0x1c4781(0x143),{'error':_0x36701f instanceof Error?_0x36701f['message']:String(_0x36701f),'configKey':_0xfd952e,'configValue':_0xbda0d6,'targetConfigPath':_0x44373f}),a39_0x16908a(Box,{'children':a39_0x51fc84(Text,{'color':_0x1c4781(0x14a),'children':[_0x1c4781(0x146),_0x36701f instanceof Error?_0x36701f['message']:String(_0x36701f)]})});}return null;}return a39_0x16908a(Box,{'children':a39_0x16908a(Text,{'color':'red','children':_0x1c4781(0x133)})});}}if(_0x2fce7a===_0x1c4781(0x145)){if(_0xfd952e){let _0x1f0610=_0xfd952e;return _0xfd952e===_0x1c4781(0x144)&&(_0x1f0610=_0x1c4781(0x13b)),console['log'](_0x164ac0[_0x1f0610]||_0x1c4781(0x12d)),null;}return null;}if(_0x2fce7a==='list')return console[_0x1c4781(0x135)](JSON[_0x1c4781(0x149)](_0x164ac0,null,0x2)),null;if(!_0x285c0d||!_0x38463d)return a39_0x16908a(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- function a39_0x558d(){const _0x4cdd7a=['8kyKTEG','17071947ACDQhR','https://daily-api.lovrabet.com','https://user.lovrabet.com','397120OHRRnd','70Dlyfpi','65295SCifRi','2457882ISddKC','online','356uUeCWn','1144pwGZhv','1355709BwaIOv','931921RAliAs','https://api.lovrabet.com','https://user-daily.lovrabet.com','959622dcHqHH'];a39_0x558d=function(){return _0x4cdd7a;};return a39_0x558d();}const a39_0x346049=a39_0x44e1;(function(_0x35a90f,_0x1b3ef8){const _0x3bb560=a39_0x44e1,_0x2e0008=_0x35a90f();while(!![]){try{const _0x36c492=-parseInt(_0x3bb560(0xc8))/0x1+-parseInt(_0x3bb560(0xc3))/0x2+parseInt(_0x3bb560(0xc7))/0x3+-parseInt(_0x3bb560(0xc5))/0x4*(parseInt(_0x3bb560(0xc2))/0x5)+parseInt(_0x3bb560(0xcb))/0x6*(parseInt(_0x3bb560(0xc1))/0x7)+parseInt(_0x3bb560(0xcc))/0x8*(-parseInt(_0x3bb560(0xcd))/0x9)+-parseInt(_0x3bb560(0xc0))/0xa*(-parseInt(_0x3bb560(0xc6))/0xb);if(_0x36c492===_0x1b3ef8)break;else _0x2e0008['push'](_0x2e0008['shift']());}catch(_0x247940){_0x2e0008['push'](_0x2e0008['shift']());}}}(a39_0x558d,0xeab2d));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a39_0x346049(0xc4)?a39_0x346049(0xbf):a39_0x346049(0xca);function a39_0x44e1(_0x257fcf,_0x262816){_0x257fcf=_0x257fcf-0xbe;const _0x558dbf=a39_0x558d();let _0x44e138=_0x558dbf[_0x257fcf];return _0x44e138;}export const getApiDomain=()=>getEnv()==='online'?a39_0x346049(0xc9):a39_0x346049(0xbe);
1
+ const a40_0x2ef818=a40_0x74d8;function a40_0x74d8(_0x17d985,_0x507453){_0x17d985=_0x17d985-0x94;const _0x421874=a40_0x4218();let _0x74d8b3=_0x421874[_0x17d985];return _0x74d8b3;}(function(_0x8f8319,_0xcac3eb){const _0xe8129e=a40_0x74d8,_0x8dd7b6=_0x8f8319();while(!![]){try{const _0x1441e7=-parseInt(_0xe8129e(0x95))/0x1+-parseInt(_0xe8129e(0x94))/0x2+-parseInt(_0xe8129e(0x96))/0x3+-parseInt(_0xe8129e(0x97))/0x4+parseInt(_0xe8129e(0x9d))/0x5*(parseInt(_0xe8129e(0x9f))/0x6)+parseInt(_0xe8129e(0x99))/0x7+parseInt(_0xe8129e(0x98))/0x8*(parseInt(_0xe8129e(0xa0))/0x9);if(_0x1441e7===_0xcac3eb)break;else _0x8dd7b6['push'](_0x8dd7b6['shift']());}catch(_0x252be2){_0x8dd7b6['push'](_0x8dd7b6['shift']());}}}(a40_0x4218,0xf3428));function a40_0x4218(){const _0x4ea3b=['200056LPDQRc','653820KJQOwn','1372230AIOFri','4137056Gutksz','131048ODLxyv','11053441BVMnSe','https://user.lovrabet.com','https://daily-api.lovrabet.com','online','6839965ZipkPB','https://user-daily.lovrabet.com','6JgxIPJ','162ipgmai','https://api.lovrabet.com'];a40_0x4218=function(){return _0x4ea3b;};return a40_0x4218();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a40_0x2ef818(0x9c)?a40_0x2ef818(0x9a):a40_0x2ef818(0x9e);export const getApiDomain=()=>getEnv()===a40_0x2ef818(0x9c)?a40_0x2ef818(0xa1):a40_0x2ef818(0x9b);
@@ -1 +1 @@
1
- const a40_0x9947c7=a40_0x5ba9;function a40_0x1cf7(){const _0x40371d=['1995057eNIgzb','663439djmzMA','196vUPvQn','LOVRABET_ENV','online','2945470NRwuIr','60brsvYp','236184KefJwB','env','358970mqplyC','30080244EUFsJG','21ekIgzT','40WvqChu','87172sPljCi','235jOJhsA'];a40_0x1cf7=function(){return _0x40371d;};return a40_0x1cf7();}(function(_0x4524a9,_0x142c29){const _0x290c3f=a40_0x5ba9,_0x115d67=_0x4524a9();while(!![]){try{const _0x2fe11f=-parseInt(_0x290c3f(0x13e))/0x1+-parseInt(_0x290c3f(0x137))/0x2*(-parseInt(_0x290c3f(0x139))/0x3)+parseInt(_0x290c3f(0x13b))/0x4*(-parseInt(_0x290c3f(0x13c))/0x5)+parseInt(_0x290c3f(0x135))/0x6*(parseInt(_0x290c3f(0x130))/0x7)+parseInt(_0x290c3f(0x13a))/0x8*(parseInt(_0x290c3f(0x13d))/0x9)+parseInt(_0x290c3f(0x134))/0xa*(parseInt(_0x290c3f(0x133))/0xb)+-parseInt(_0x290c3f(0x138))/0xc;if(_0x2fe11f===_0x142c29)break;else _0x115d67['push'](_0x115d67['shift']());}catch(_0x4df54e){_0x115d67['push'](_0x115d67['shift']());}}}(a40_0x1cf7,0xd6a47));let env=process[a40_0x9947c7(0x136)][a40_0x9947c7(0x131)]||a40_0x9947c7(0x132);function a40_0x5ba9(_0x557136,_0x3acdf0){_0x557136=_0x557136-0x130;const _0x1cf78d=a40_0x1cf7();let _0x5ba996=_0x1cf78d[_0x557136];return _0x5ba996;}export function getEnv(){return env;}export function initEnv(_0x48dada){env=_0x48dada;}
1
+ function a41_0x51c5(_0x12a7d1,_0x4bd501){_0x12a7d1=_0x12a7d1-0x1f0;const _0x3e889f=a41_0x3e88();let _0x51c55d=_0x3e889f[_0x12a7d1];return _0x51c55d;}const a41_0x44afdf=a41_0x51c5;(function(_0x2ee0ca,_0x289163){const _0x4abfe1=a41_0x51c5,_0x2f17e8=_0x2ee0ca();while(!![]){try{const _0x36f653=-parseInt(_0x4abfe1(0x1fe))/0x1*(-parseInt(_0x4abfe1(0x1fa))/0x2)+-parseInt(_0x4abfe1(0x1f6))/0x3*(parseInt(_0x4abfe1(0x1f1))/0x4)+-parseInt(_0x4abfe1(0x1f9))/0x5*(parseInt(_0x4abfe1(0x1f2))/0x6)+-parseInt(_0x4abfe1(0x1f0))/0x7*(-parseInt(_0x4abfe1(0x1f4))/0x8)+parseInt(_0x4abfe1(0x1fc))/0x9*(parseInt(_0x4abfe1(0x1fd))/0xa)+parseInt(_0x4abfe1(0x1fb))/0xb+-parseInt(_0x4abfe1(0x1f5))/0xc*(parseInt(_0x4abfe1(0x1f7))/0xd);if(_0x36f653===_0x289163)break;else _0x2f17e8['push'](_0x2f17e8['shift']());}catch(_0x43f3b5){_0x2f17e8['push'](_0x2f17e8['shift']());}}}(a41_0x3e88,0x95218));function a41_0x3e88(){const _0x262353=['1162622yvISKi','8115932HxlISg','3132405HEdwNU','10JMElgX','1MBykgV','online','7DSybtH','4OgcnsK','186366ZNSZsM','env','5442544vQqJjw','24ZNLQtX','1332339IpAMuS','8199568gUiBOt','LOVRABET_ENV','5ZTAbBz'];a41_0x3e88=function(){return _0x262353;};return a41_0x3e88();}let env=process[a41_0x44afdf(0x1f3)][a41_0x44afdf(0x1f8)]||a41_0x44afdf(0x1ff);export function getEnv(){return env;}export function initEnv(_0x656dff){env=_0x656dff;}
@@ -1 +1 @@
1
- function a41_0x2db2(_0x3b3a66,_0x134aa2){_0x3b3a66=_0x3b3a66-0x17a;const _0x246173=a41_0x2461();let _0x2db296=_0x246173[_0x3b3a66];return _0x2db296;}const a41_0x57e48d=a41_0x2db2;(function(_0x51ff64,_0x508f4c){const _0x183985=a41_0x2db2,_0x3ace63=_0x51ff64();while(!![]){try{const _0x250b06=-parseInt(_0x183985(0x1d9))/0x1*(parseInt(_0x183985(0x1c6))/0x2)+-parseInt(_0x183985(0x1a2))/0x3*(parseInt(_0x183985(0x1ca))/0x4)+-parseInt(_0x183985(0x192))/0x5*(-parseInt(_0x183985(0x1df))/0x6)+parseInt(_0x183985(0x1ad))/0x7+-parseInt(_0x183985(0x1bc))/0x8*(parseInt(_0x183985(0x19e))/0x9)+parseInt(_0x183985(0x199))/0xa+parseInt(_0x183985(0x184))/0xb*(parseInt(_0x183985(0x1c3))/0xc);if(_0x250b06===_0x508f4c)break;else _0x3ace63['push'](_0x3ace63['shift']());}catch(_0x27f4f9){_0x3ace63['push'](_0x3ace63['shift']());}}}(a41_0x2461,0xe35cc));import{jsx as a41_0x5251ae,jsxs as a41_0x1d8273,Fragment as a41_0x40165f}from'react/jsx-runtime';function a41_0x2461(){const _0x90b458=['\x22\x20已存在','lovrabet-setup-selection','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','应用AppCode','目录\x20\x22','red','104fiaOvU','windsurf','description','add','项目名','name','项目名长度不能超过\x2050\x20个字符','12ifRJPf','step','\x22\x20已存在,请使用其他名称','2sXnpgi','[可选]:\x20','gray','api-pull','517468qEXgmg','\x20检查中...','label','downArrow','yellow','应用AppCode长度不能超过\x20100\x20个字符','leftArrow','*\x20正在创建项目...','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','value','login-prompt','trim','MCP\x20和\x20Skill','lovrabet-setup','*\x20创建新项目','1680961uSWPmK','antigravity','已登录','map','!\x20未检测到有效登录','string','9439422QGqXHK','login-check','login-process','\x20个\x20IDE','项目名不合法','from','请至少选择一个\x20IDE','slice','登录状态','*\x20项目名:\x20','cline','11417813trLhys','跳过登录','qoder','upArrow','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','*\x20应用AppCode\x20','\x20登录中...','未设置','column','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','login','test','size','project-name','5sscUBT','resolve','delete','length','√\x20检测到有效登录状态','cwd','选择要配置的\x20IDE:','4616100uPsFzM','codebuddy','white','\x20\x20使用\x20←→\x20选择,回车确认','has','134091DMKKZe','*\x20正在检查登录状态...','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','rightArrow','18ytuFbS','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','confirm-api-pull','*\x20是否要自动拉取\x20API\x20配置?','cyan','backspace','Yes','online','\x20+MCP','app-code','拉取API配置','3565072epRJLV','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','[\x20]','claude','my-app','\x20←\x20','creating','blue','green'];a41_0x2461=function(){return _0x90b458;};return a41_0x2461();}import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a41_0x143f4c 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=[a41_0x57e48d(0x1da),a41_0x57e48d(0x1b0),a41_0x57e48d(0x183),a41_0x57e48d(0x19a),'codex','cursor','opencode',a41_0x57e48d(0x186),'trae',a41_0x57e48d(0x1bd),'agent'],UI_MCP_IDES=new Set(Array[a41_0x57e48d(0x17e)](MCP_IDES));export function EnhancedGuidedCreate(_0x5c71d9){const _0x4535a5=a41_0x57e48d,{onCreate:_0x4e016b,env:_0x5adcad}=_0x5c71d9,[_0x5e394c,_0x2daaac]=useState(_0x4535a5(0x191)),[_0x14a9e1,_0x5c7041]=useState(''),[_0x3ef07f,_0x5273b7]=useState(''),[_0x528ba4,_0x26e086]=useState(''),[_0x238d1e,_0xef838e]=useState(''),[_0x5332cb,_0x3fc146]=useState([]),[_0x45fd0b,_0x2203f3]=useState(null),[_0x5cb172,_0x3c4314]=useState(![]),[_0x4c9770,_0x153aff]=useState(![]),[_0x4cbbe3,_0x4c243d]=useState(![]),[_0xebcfd3,_0x5d92c4]=useState(0x0),[_0x4fc157,_0x1dbff8]=useState(0x0),[_0x57ad46,_0x547024]=useState(0x0),[_0x4283ce,_0x43742e]=useState(![]),[_0x50e19f,_0x4ef466]=useState(new Set()),[_0x16b8c1,_0x490711]=useState(0x0),[_0x57d478,_0x37b033]=useState(''),_0x30620a=_0x4535a5(0x1b1),_0x4dc17d=readConfig(),_0xe09c58=typeof _0x4dc17d['env']===_0x4535a5(0x1de)?_0x4dc17d['env']:undefined;function _0x57794b(_0x4fb6f1){const _0x3d5675=_0x4535a5,_0x3d20c9=_0x4fb6f1||_0x30620a,_0x3184e0=a41_0x143f4c[_0x3d5675(0x193)](process[_0x3d5675(0x197)](),_0x3d20c9);return existsSync(_0x3184e0);}function _0x1bf42b(_0x429f49){const _0x35509c=_0x4535a5;if(_0x429f49[_0x35509c(0x195)]>0x32)return{'valid':![],'message':_0x35509c(0x1c2)};const _0x76f5d5=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x429f49?.['trim']()&&!_0x76f5d5['test'](_0x429f49))return{'valid':![],'message':_0x35509c(0x1a3)};return{'valid':!![]};}function _0x520425(_0x4a1eda){const _0x242686=_0x4535a5;if(!_0x4a1eda[_0x242686(0x1d5)]())return{'valid':!![]};if(_0x4a1eda['length']>0x64)return{'valid':![],'message':_0x242686(0x1cf)};const _0x3ae6ec=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3ae6ec[_0x242686(0x18f)](_0x4a1eda))return{'valid':![],'message':_0x242686(0x1a0)};return{'valid':!![]};}async function _0x2e9d30(){_0x3c4314(!![]);try{const _0x2a11e9=await getIsSessionValid();return _0x2203f3(_0x2a11e9),_0x2a11e9;}catch(_0x30c700){return _0x2203f3(![]),![];}finally{_0x3c4314(![]);}}async function _0x412638(){_0x153aff(!![]);try{const _0x39fe0b=await authServer({'silent':!![]});return _0x2203f3(_0x39fe0b),_0x39fe0b;}catch(_0x204d96){return _0x2203f3(![]),![];}finally{_0x153aff(![]);}}return useInput(async(_0x4e3161,_0x77cd5d)=>{const _0x1808ed=_0x4535a5;if(_0x77cd5d[_0x1808ed(0x1d0)]||_0x77cd5d[_0x1808ed(0x1a1)]){if(_0x5e394c==='confirm-api-pull'){_0x5d92c4(_0x1e67b7=>_0x1e67b7===0x0?0x1:0x0);return;}if(_0x5e394c==='lovrabet-setup-selection'){if(!_0x4283ce){_0x547024(_0x4b1e2d=>_0x4b1e2d===0x0?0x1:0x0);return;}_0x43742e(![]);return;}if(_0x5e394c===_0x1808ed(0x1d4)){_0x1dbff8(_0x57fef7=>_0x57fef7===0x0?0x1:0x0);return;}}if(_0x5e394c===_0x1808ed(0x1b7)&&_0x4283ce&&_0x57ad46===0x0){if(_0x77cd5d[_0x1808ed(0x187)]){_0x490711(_0x16bd7f=>_0x16bd7f>0x0?_0x16bd7f-0x1:UI_IDE_LIST[_0x1808ed(0x195)]-0x1);return;}if(_0x77cd5d[_0x1808ed(0x1cd)]){_0x490711(_0x3abad3=>_0x3abad3<UI_IDE_LIST[_0x1808ed(0x195)]-0x1?_0x3abad3+0x1:0x0);return;}}if(_0x4e3161==='\x20'&&_0x5e394c===_0x1808ed(0x1b7)&&_0x4283ce&&_0x57ad46===0x0){_0x4ef466(_0x5c8d1e=>{const _0x3c281e=_0x1808ed,_0x161e74=new Set(_0x5c8d1e);return _0x161e74[_0x3c281e(0x19d)](_0x16b8c1)?_0x161e74[_0x3c281e(0x194)](_0x16b8c1):_0x161e74['add'](_0x16b8c1),_0x161e74;}),_0xef838e('');return;}if((_0x4e3161==='a'||_0x4e3161==='A')&&_0x5e394c===_0x1808ed(0x1b7)&&_0x4283ce&&_0x57ad46===0x0){_0x4ef466(new Set(UI_IDE_LIST['map']((_0x27e9d6,_0x6a299d)=>_0x6a299d))),_0xef838e('');return;}if((_0x4e3161==='i'||_0x4e3161==='I'||_0x4e3161==='r'||_0x4e3161==='R')&&_0x5e394c===_0x1808ed(0x1b7)&&_0x4283ce&&_0x57ad46===0x0){_0x4ef466(_0x1ea908=>{const _0x41691c=_0x1808ed,_0x3b5194=new Set();for(let _0x1b1cab=0x0;_0x1b1cab<UI_IDE_LIST[_0x41691c(0x195)];_0x1b1cab++){!_0x1ea908[_0x41691c(0x19d)](_0x1b1cab)&&_0x3b5194[_0x41691c(0x1bf)](_0x1b1cab);}return _0x3b5194;});return;}if(_0x77cd5d['return']){if(_0x5e394c===_0x1808ed(0x191)){const _0x4cd185=_0x528ba4['trim']()||_0x30620a;if(_0x238d1e)return;if(_0x57794b(_0x4cd185)){_0x37b033(_0x1808ed(0x1ba)+_0x4cd185+_0x1808ed(0x1c5));return;}_0x5c7041(_0x4cd185),_0x3fc146([{'step':_0x1808ed(0x191),'label':_0x1808ed(0x1c0),'value':_0x4cd185}]),_0x26e086(''),_0xef838e(''),_0x37b033(''),_0x2daaac(_0x1808ed(0x1ab));return;}if(_0x5e394c==='app-code'){if(_0x238d1e)return;const _0x183f1d=_0x528ba4[_0x1808ed(0x1d5)]();_0x5273b7(_0x183f1d),_0x3fc146(_0x127670=>[..._0x127670,{'step':_0x1808ed(0x1ab),'label':_0x1808ed(0x1b9),'value':_0x183f1d||_0x1808ed(0x18b)}]),_0x26e086(''),_0xef838e('');if(_0x183f1d){_0x2daaac(_0x1808ed(0x17a));const _0x4e887d=await _0x2e9d30();_0x4e887d?_0x2daaac(_0x1808ed(0x1a4)):_0x2daaac('login-prompt');}else{const _0x3c1b11=_0x5adcad||_0xe09c58||_0x1808ed(0x1a9);_0x4e016b({'projectName':_0x14a9e1,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x3c1b11}),_0x2daaac(_0x1808ed(0x1b3));}return;}if(_0x5e394c===_0x1808ed(0x1a4)){const _0x410bd3=_0xebcfd3===0x0;_0x4c243d(_0x410bd3),_0x3fc146(_0x4a1e94=>[..._0x4a1e94,{'step':_0x1808ed(0x1c9),'label':_0x1808ed(0x1ac),'value':_0x410bd3?'是':'否'}]),_0x2daaac('lovrabet-setup-selection');return;}if(_0x5e394c===_0x1808ed(0x1b7)){if(!_0x4283ce){_0x43742e(!![]);if(_0x57ad46===0x1){_0x3fc146(_0x4e810e=>[..._0x4e810e,{'step':'lovrabet-setup','label':_0x1808ed(0x1d6),'value':'否'}]);const _0x42f633=_0x5adcad||_0xe09c58||'online';_0x4e016b({'projectName':_0x14a9e1,'appCode':_0x3ef07f,'pullApi':_0x4cbbe3,'aiSetup':![],'selectedIDEs':[],'env':_0x42f633}),_0x2daaac(_0x1808ed(0x1b3));}return;}if(_0x50e19f[_0x1808ed(0x190)]===0x0){_0xef838e(_0x1808ed(0x17f));return;}const _0x2de1af=Array[_0x1808ed(0x17e)](_0x50e19f)['map'](_0x172545=>UI_IDE_LIST[_0x172545])['filter'](_0x159029=>_0x159029!==undefined);_0x3fc146(_0x466108=>[..._0x466108,{'step':_0x1808ed(0x1d7),'label':'MCP\x20和\x20Skill','value':_0x2de1af[_0x1808ed(0x195)]+_0x1808ed(0x17c)}]);const _0xda25d0=_0x5adcad||_0xe09c58||_0x1808ed(0x1a9);_0x4e016b({'projectName':_0x14a9e1,'appCode':_0x3ef07f,'pullApi':_0x4cbbe3,'aiSetup':!![],'selectedIDEs':_0x2de1af,'env':_0xda25d0}),_0x2daaac(_0x1808ed(0x1b3));return;}if(_0x5e394c===_0x1808ed(0x1d4)){const _0x351855=_0x4fc157===0x0;if(_0x351855){_0x2daaac('login-process');const _0x39e27d=await _0x412638();_0x39e27d?(_0x3fc146(_0x9f94f9=>[..._0x9f94f9,{'step':_0x1808ed(0x18e),'label':_0x1808ed(0x181),'value':_0x1808ed(0x1db)}]),_0x2daaac(_0x1808ed(0x1a4))):(_0x3fc146(_0x1066d1=>[..._0x1066d1,{'step':'login','label':'登录状态','value':'登录失败'}]),_0x2daaac(_0x1808ed(0x1b7)));}else _0x3fc146(_0x241ca8=>[..._0x241ca8,{'step':_0x1808ed(0x18e),'label':_0x1808ed(0x181),'value':_0x1808ed(0x185)}]),_0x2daaac(_0x1808ed(0x1b7));return;}}if(_0x77cd5d[_0x1808ed(0x1a7)]||_0x77cd5d['delete']){_0x26e086(_0x575d2b=>{const _0x11a99f=_0x1808ed,_0x3c1b15=_0x575d2b[_0x11a99f(0x180)](0x0,-0x1);if(_0x5e394c===_0x11a99f(0x191)){const {valid:_0x25bec3,message:_0xde1d36}=_0x1bf42b(_0x3c1b15);_0xef838e(_0x25bec3?'':_0xde1d36||_0x11a99f(0x17d));if(_0x25bec3&&!_0x238d1e){const _0x1cec23=_0x3c1b15||_0x30620a;_0x57794b(_0x1cec23)?_0x37b033('目录\x20\x22'+_0x1cec23+_0x11a99f(0x1b6)):_0x37b033('');}}else{if(_0x5e394c===_0x11a99f(0x1ab)){const {valid:_0x5e5ccb,message:_0x5268ea}=_0x520425(_0x3c1b15);_0xef838e(_0x5e5ccb?'':_0x5268ea||'应用AppCode不合法');}}return _0x3c1b15;});return;}if([_0x1808ed(0x1b3),_0x1808ed(0x17a),'login-process']['includes'](_0x5e394c))return;if(_0x5e394c==='confirm-api-pull'||_0x5e394c==='login-prompt'||_0x5e394c===_0x1808ed(0x1b7))return;_0x26e086(_0x5b534d=>{const _0x59f384=_0x1808ed,_0x56d6fe=_0x5b534d+_0x4e3161;if(_0x5e394c===_0x59f384(0x191)){const {valid:_0x396b74,message:_0x26f7c1}=_0x1bf42b(_0x56d6fe);_0xef838e(_0x396b74?'':_0x26f7c1||_0x59f384(0x17d));if(_0x396b74&&!_0x238d1e){const _0x108a4f=_0x56d6fe||_0x30620a;_0x57794b(_0x108a4f)?_0x37b033('目录\x20\x22'+_0x108a4f+_0x59f384(0x1b6)):_0x37b033('');}}else{if(_0x5e394c===_0x59f384(0x1ab)){const {valid:_0x5533a8,message:_0x33b366}=_0x520425(_0x56d6fe);_0xef838e(_0x5533a8?'':_0x33b366||'应用AppCode不合法');}}return _0x56d6fe;});}),a41_0x1d8273(Box,{'flexDirection':_0x4535a5(0x18c),'marginTop':0x1,'children':[_0x5332cb[_0x4535a5(0x195)]===0x0&&a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1a6),'children':_0x4535a5(0x1d8)})}),_0x5332cb[_0x4535a5(0x1dc)](_0x127c13=>a41_0x1d8273(Box,{'children':[a41_0x1d8273(Text,{'color':'green','children':['√\x20',_0x127c13[_0x4535a5(0x1cc)],':\x20']}),a41_0x5251ae(Text,{'color':_0x4535a5(0x1a6),'children':_0x127c13[_0x4535a5(0x1d3)]})]},_0x127c13[_0x4535a5(0x1c4)])),_0x5e394c===_0x4535a5(0x191)&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x1d8273(Box,{'children':[a41_0x5251ae(Text,{'children':_0x4535a5(0x182)}),_0x528ba4?a41_0x5251ae(Text,{'color':_0x4535a5(0x1b5),'children':_0x528ba4}):a41_0x5251ae(Text,{'color':_0x4535a5(0x1c8),'children':_0x30620a}),_0x238d1e&&a41_0x1d8273(Text,{'color':_0x4535a5(0x1bb),'children':[_0x4535a5(0x1b2),_0x238d1e]}),_0x57d478&&a41_0x1d8273(Text,{'color':_0x4535a5(0x1bb),'children':[_0x4535a5(0x1b2),_0x57d478]})]}),!_0x238d1e&&!_0x57d478&&!_0x528ba4&&a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':'gray','children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x5e394c===_0x4535a5(0x1ab)&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x1d8273(Box,{'children':[a41_0x5251ae(Text,{'children':_0x4535a5(0x189)}),a41_0x5251ae(Text,{'color':_0x4535a5(0x1c8),'children':_0x4535a5(0x1c7)}),a41_0x5251ae(Text,{'color':_0x4535a5(0x1b5),'children':_0x528ba4}),_0x238d1e&&a41_0x1d8273(Text,{'color':'red','children':['\x20←\x20',_0x238d1e]})]}),!_0x238d1e&&a41_0x5251ae(Box,{'children':a41_0x1d8273(Text,{'color':_0x4535a5(0x1c8),'children':['\x20',_0x4535a5(0x1b8)]})})]}),_0x5e394c===_0x4535a5(0x17a)&&a41_0x1d8273(Box,{'children':[a41_0x5251ae(Text,{'children':_0x4535a5(0x19f)}),_0x5cb172&&a41_0x5251ae(Text,{'color':'gray','children':_0x4535a5(0x1cb)})]}),_0x5e394c===_0x4535a5(0x1a4)&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1b5),'children':_0x4535a5(0x196)})}),a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x5251ae(Text,{'children':_0x4535a5(0x1a5)})}),a41_0x1d8273(Box,{'marginLeft':0x2,'children':[a41_0x1d8273(Text,{'color':_0xebcfd3===0x0?_0x4535a5(0x1b5):_0x4535a5(0x1c8),'children':[_0xebcfd3===0x0?'▶\x20':'\x20\x20','Yes']}),a41_0x5251ae(Text,{'children':'\x20'}),a41_0x1d8273(Text,{'color':_0xebcfd3===0x1?_0x4535a5(0x1b5):_0x4535a5(0x1c8),'children':[_0xebcfd3===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1c8),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1ce),'children':_0x4535a5(0x1ae)})})]}),_0x5e394c===_0x4535a5(0x1b7)&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1b5),'children':'√'})}),a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x5251ae(Text,{'children':_0x4535a5(0x1d2)})}),a41_0x1d8273(Box,{'marginLeft':0x2,'children':[a41_0x1d8273(Text,{'color':_0x57ad46===0x0?_0x4535a5(0x1b5):_0x4535a5(0x1c8),'children':[_0x57ad46===0x0?'▶\x20':'\x20\x20',_0x4535a5(0x1a8)]}),a41_0x5251ae(Text,{'children':'\x20'}),a41_0x1d8273(Text,{'color':_0x57ad46===0x1?_0x4535a5(0x1b5):_0x4535a5(0x1c8),'children':[_0x57ad46===0x1?'▶\x20':'\x20\x20','No']})]}),_0x4283ce&&_0x57ad46===0x0&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x5251ae(Text,{'color':'gray','children':_0x4535a5(0x188)})}),a41_0x1d8273(Box,{'marginTop':0x1,'flexDirection':_0x4535a5(0x18c),'children':[a41_0x5251ae(Text,{'bold':!![],'color':_0x4535a5(0x1ce),'children':_0x4535a5(0x198)}),UI_IDE_LIST[_0x4535a5(0x1dc)]((_0x3b8da5,_0x209826)=>{const _0x559dce=_0x4535a5,_0x5e6571=_0x16b8c1===_0x209826,_0x251443=_0x50e19f[_0x559dce(0x19d)](_0x209826),_0x167d59=UI_MCP_IDES[_0x559dce(0x19d)](_0x3b8da5);return a41_0x5251ae(Box,{'children':a41_0x1d8273(Text,{'backgroundColor':_0x5e6571?_0x559dce(0x1b4):undefined,'color':_0x5e6571?_0x559dce(0x19b):undefined,'children':['\x20\x20',_0x251443?'[✓]':_0x559dce(0x1af),'\x20',UI_IDE_CONFIGS[_0x3b8da5][_0x559dce(0x1c1)],_0x167d59&&a41_0x5251ae(Text,{'color':_0x5e6571?'white':_0x559dce(0x1a6),'children':_0x559dce(0x1aa)}),'\x20',a41_0x1d8273(Text,{'color':_0x5e6571?_0x559dce(0x19b):_0x559dce(0x1c8),'dimColor':!_0x5e6571,'children':['-\x20',UI_IDE_CONFIGS[_0x3b8da5][_0x559dce(0x1be)]]})]})},_0x3b8da5);}),a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x1d8273(Text,{'color':_0x4535a5(0x1c8),'children':['\x20',_0x4535a5(0x18d)]})})]})]}),!_0x4283ce&&a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1c8),'children':_0x4535a5(0x19c)})}),_0x238d1e&&a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x1d8273(Text,{'color':_0x4535a5(0x1bb),'children':['✗\x20',_0x238d1e]})})]}),_0x5e394c===_0x4535a5(0x1d4)&&a41_0x1d8273(a41_0x40165f,{'children':[a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1ce),'children':_0x4535a5(0x1dd)})}),a41_0x5251ae(Box,{'marginTop':0x1,'children':a41_0x5251ae(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a41_0x1d8273(Box,{'marginLeft':0x2,'children':[a41_0x1d8273(Text,{'color':_0x4fc157===0x0?_0x4535a5(0x1b5):_0x4535a5(0x1c8),'children':[_0x4fc157===0x0?'▶\x20':'\x20\x20',_0x4535a5(0x1a8)]}),a41_0x5251ae(Text,{'children':'\x20'}),a41_0x1d8273(Text,{'color':_0x4fc157===0x1?'green':'gray','children':[_0x4fc157===0x1?'▶\x20':'\x20\x20','No']})]}),a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':'gray','children':_0x4535a5(0x19c)})})]}),_0x5e394c===_0x4535a5(0x17b)&&a41_0x1d8273(Box,{'children':[a41_0x5251ae(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x4c9770&&a41_0x5251ae(Text,{'color':_0x4535a5(0x1c8),'children':_0x4535a5(0x18a)})]}),_0x5e394c===_0x4535a5(0x1b3)&&a41_0x5251ae(Box,{'children':a41_0x5251ae(Text,{'color':_0x4535a5(0x1b5),'children':_0x4535a5(0x1d1)})})]});}
1
+ const a42_0x5e6f98=a42_0x2ebf;(function(_0x1c4b42,_0x2c7a2b){const _0x3c13ad=a42_0x2ebf,_0x51b946=_0x1c4b42();while(!![]){try{const _0x142024=-parseInt(_0x3c13ad(0x1b7))/0x1+parseInt(_0x3c13ad(0x1ca))/0x2*(parseInt(_0x3c13ad(0x1ec))/0x3)+parseInt(_0x3c13ad(0x1aa))/0x4*(parseInt(_0x3c13ad(0x1d4))/0x5)+parseInt(_0x3c13ad(0x1fd))/0x6+-parseInt(_0x3c13ad(0x1e0))/0x7*(-parseInt(_0x3c13ad(0x1c6))/0x8)+-parseInt(_0x3c13ad(0x1b0))/0x9*(-parseInt(_0x3c13ad(0x1b5))/0xa)+-parseInt(_0x3c13ad(0x1d5))/0xb*(parseInt(_0x3c13ad(0x1b6))/0xc);if(_0x142024===_0x2c7a2b)break;else _0x51b946['push'](_0x51b946['shift']());}catch(_0x2e711c){_0x51b946['push'](_0x51b946['shift']());}}}(a42_0x23cd,0xa2887));import{jsx as a42_0x18e0d9,jsxs as a42_0x2d3dcc,Fragment as a42_0x3567db}from'react/jsx-runtime';import{useState}from'react';function a42_0x2ebf(_0x2c4aa9,_0x174090){_0x2c4aa9=_0x2c4aa9-0x1a2;const _0x23cd59=a42_0x23cd();let _0x2ebf9a=_0x23cd59[_0x2c4aa9];return _0x2ebf9a;}import{Text,Box,useInput}from'ink';function a42_0x23cd(){const _0x3bc038=['绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','yellow','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','step','codebuddy','login-process','white','map','size','3758178mWWPBZ','slice','agent','test','\x20个\x20IDE','cyan','\x20+MCP','\x20检查中...','blue','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','app-code','登录失败','creating','green','from','12VHDpSp','*\x20应用AppCode\x20','resolve','length','antigravity','\x20直接回车确认,或输入自定义名称','11658456zSfRnQ','qoder','login-prompt','env','*\x20正在检查登录状态...','10SFMZlt','12QpzDWV','1222803vNrrjw','windsurf','rightArrow','登录状态','cline','add','return','backspace','includes','项目名不合法','leftArrow','*\x20正在创建项目...','confirm-api-pull','trim','应用AppCode','1144PfnWfF','gray','project-name','Yes','3498yCQjty','column','opencode','*\x20是否要自动拉取\x20API\x20配置?','[✓]','online','has','*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','delete','未设置','1767515ByJDTV','26237629gTFgEc','trae','upArrow','*\x20项目名:\x20','\x20\x20使用\x20←→\x20选择,回车确认','lovrabet-setup','MCP\x20和\x20Skill','选择要配置的\x20IDE:','login-check','[\x20]','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','59283RhdduQ','string','项目名长度不能超过\x2050\x20个字符','api-pull','[可选]:\x20','lovrabet-setup-selection','red','value','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','login','label','\x22\x20已存在,请使用其他名称','138bnJLTk','cursor','claude','*\x20是否要先登录以便拉取\x20API\x20配置?','my-app','filter','项目名','\x20←\x20'];a42_0x23cd=function(){return _0x3bc038;};return a42_0x23cd();}import{existsSync}from'node:fs';import a42_0x4a9f9c from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{IDE_CONFIGS,MCP_IDES}from'../utils/ai_config.js';const UI_IDE_CONFIGS=IDE_CONFIGS,UI_IDE_LIST=[a42_0x5e6f98(0x1ae),a42_0x5e6f98(0x1ee),a42_0x5e6f98(0x1bb),a42_0x5e6f98(0x1f8),'codex',a42_0x5e6f98(0x1ed),a42_0x5e6f98(0x1cc),a42_0x5e6f98(0x1b1),a42_0x5e6f98(0x1d6),a42_0x5e6f98(0x1b8),a42_0x5e6f98(0x1ff)],UI_MCP_IDES=new Set(Array[a42_0x5e6f98(0x1a9)](MCP_IDES));export function EnhancedGuidedCreate(_0x54d712){const _0x1a21c4=a42_0x5e6f98,{onCreate:_0x2972cf,env:_0xcc856c}=_0x54d712,[_0x33e085,_0x4690d0]=useState(_0x1a21c4(0x1c8)),[_0x47add7,_0x130ebf]=useState(''),[_0x33402f,_0x3fcc32]=useState(''),[_0x77f488,_0x39cf58]=useState(''),[_0x201d0c,_0x38fa1a]=useState(''),[_0x4c8336,_0x1a9e90]=useState([]),[_0xcce10,_0x3a301f]=useState(null),[_0x4ab234,_0x3ee9ed]=useState(![]),[_0xf6e309,_0x179d31]=useState(![]),[_0x418cf7,_0x3df540]=useState(![]),[_0xbcb563,_0x257c4f]=useState(0x0),[_0x365830,_0x28b453]=useState(0x0),[_0x42e343,_0x14ddf0]=useState(0x0),[_0x5e6b15,_0x47e93b]=useState(![]),[_0x260944,_0x395c35]=useState(new Set()),[_0x1f2d71,_0x17ae53]=useState(0x0),[_0xfa22b8,_0x345cc7]=useState(''),_0x4d9251=_0x1a21c4(0x1f0),_0x591456=readConfig(),_0x435003=typeof _0x591456['env']===_0x1a21c4(0x1e1)?_0x591456[_0x1a21c4(0x1b3)]:undefined;function _0x91c92f(_0x57dae7){const _0x25b185=_0x1a21c4,_0x3fd217=_0x57dae7||_0x4d9251,_0x56f161=a42_0x4a9f9c[_0x25b185(0x1ac)](process['cwd'](),_0x3fd217);return existsSync(_0x56f161);}function _0x1d9f1d(_0x1f6344){const _0x1b68b2=_0x1a21c4;if(_0x1f6344['length']>0x32)return{'valid':![],'message':_0x1b68b2(0x1e2)};const _0x31ed7c=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1f6344?.[_0x1b68b2(0x1c4)]()&&!_0x31ed7c[_0x1b68b2(0x200)](_0x1f6344))return{'valid':![],'message':_0x1b68b2(0x1e8)};return{'valid':!![]};}function _0x24cf39(_0x1147c4){const _0x32f058=_0x1a21c4;if(!_0x1147c4['trim']())return{'valid':!![]};if(_0x1147c4[_0x32f058(0x1ad)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0xa5826a=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0xa5826a['test'](_0x1147c4))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x5531e0(){_0x3ee9ed(!![]);try{const _0x5ee85a=await getIsSessionValid();return _0x3a301f(_0x5ee85a),_0x5ee85a;}catch(_0x2d245a){return _0x3a301f(![]),![];}finally{_0x3ee9ed(![]);}}async function _0x57b1d6(){_0x179d31(!![]);try{const _0x2ffbf3=await authServer({'silent':!![]});return _0x3a301f(_0x2ffbf3),_0x2ffbf3;}catch(_0x247c1f){return _0x3a301f(![]),![];}finally{_0x179d31(![]);}}return useInput(async(_0x32b188,_0x15c71d)=>{const _0xa39779=_0x1a21c4;if(_0x15c71d[_0xa39779(0x1c1)]||_0x15c71d[_0xa39779(0x1b9)]){if(_0x33e085===_0xa39779(0x1c3)){_0x257c4f(_0x2fc1de=>_0x2fc1de===0x0?0x1:0x0);return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x14ddf0(_0x5c2d91=>_0x5c2d91===0x0?0x1:0x0);return;}_0x47e93b(![]);return;}if(_0x33e085===_0xa39779(0x1b2)){_0x28b453(_0x2206e0=>_0x2206e0===0x0?0x1:0x0);return;}}if(_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){if(_0x15c71d[_0xa39779(0x1d7)]){_0x17ae53(_0x10820d=>_0x10820d>0x0?_0x10820d-0x1:UI_IDE_LIST[_0xa39779(0x1ad)]-0x1);return;}if(_0x15c71d['downArrow']){_0x17ae53(_0x416095=>_0x416095<UI_IDE_LIST['length']-0x1?_0x416095+0x1:0x0);return;}}if(_0x32b188==='\x20'&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x11f4a4=>{const _0xcf00ab=_0xa39779,_0x3c6595=new Set(_0x11f4a4);return _0x3c6595['has'](_0x1f2d71)?_0x3c6595[_0xcf00ab(0x1d2)](_0x1f2d71):_0x3c6595['add'](_0x1f2d71),_0x3c6595;}),_0x38fa1a('');return;}if((_0x32b188==='a'||_0x32b188==='A')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(new Set(UI_IDE_LIST[_0xa39779(0x1fb)]((_0x5c26db,_0x1ff8db)=>_0x1ff8db))),_0x38fa1a('');return;}if((_0x32b188==='i'||_0x32b188==='I'||_0x32b188==='r'||_0x32b188==='R')&&_0x33e085===_0xa39779(0x1e5)&&_0x5e6b15&&_0x42e343===0x0){_0x395c35(_0x5b6876=>{const _0x5c2d8d=_0xa39779,_0x2c8fd1=new Set();for(let _0x2ed009=0x0;_0x2ed009<UI_IDE_LIST[_0x5c2d8d(0x1ad)];_0x2ed009++){!_0x5b6876['has'](_0x2ed009)&&_0x2c8fd1[_0x5c2d8d(0x1bc)](_0x2ed009);}return _0x2c8fd1;});return;}if(_0x15c71d[_0xa39779(0x1bd)]){if(_0x33e085===_0xa39779(0x1c8)){const _0x556d6a=_0x77f488['trim']()||_0x4d9251;if(_0x201d0c)return;if(_0x91c92f(_0x556d6a)){_0x345cc7('目录\x20\x22'+_0x556d6a+_0xa39779(0x1eb));return;}_0x130ebf(_0x556d6a),_0x1a9e90([{'step':_0xa39779(0x1c8),'label':_0xa39779(0x1f2),'value':_0x556d6a}]),_0x39cf58(''),_0x38fa1a(''),_0x345cc7(''),_0x4690d0(_0xa39779(0x1a5));return;}if(_0x33e085===_0xa39779(0x1a5)){if(_0x201d0c)return;const _0x18ccce=_0x77f488[_0xa39779(0x1c4)]();_0x3fcc32(_0x18ccce),_0x1a9e90(_0x2b35c7=>[..._0x2b35c7,{'step':_0xa39779(0x1a5),'label':_0xa39779(0x1c5),'value':_0x18ccce||_0xa39779(0x1d3)}]),_0x39cf58(''),_0x38fa1a('');if(_0x18ccce){_0x4690d0('login-check');const _0x54c54c=await _0x5531e0();_0x54c54c?_0x4690d0(_0xa39779(0x1c3)):_0x4690d0(_0xa39779(0x1b2));}else{const _0x3bc0b5=_0xcc856c||_0x435003||'online';_0x2972cf({'projectName':_0x47add7,'appCode':undefined,'pullApi':![],'aiSetup':![],'selectedIDEs':[],'env':_0x3bc0b5}),_0x4690d0(_0xa39779(0x1a7));}return;}if(_0x33e085===_0xa39779(0x1c3)){const _0x58f6d6=_0xbcb563===0x0;_0x3df540(_0x58f6d6),_0x1a9e90(_0x2977fb=>[..._0x2977fb,{'step':_0xa39779(0x1e3),'label':'拉取API配置','value':_0x58f6d6?'是':'否'}]),_0x4690d0('lovrabet-setup-selection');return;}if(_0x33e085==='lovrabet-setup-selection'){if(!_0x5e6b15){_0x47e93b(!![]);if(_0x42e343===0x1){_0x1a9e90(_0x4be298=>[..._0x4be298,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':'否'}]);const _0x37eb63=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':![],'selectedIDEs':[],'env':_0x37eb63}),_0x4690d0('creating');}return;}if(_0x260944[_0xa39779(0x1fc)]===0x0){_0x38fa1a('请至少选择一个\x20IDE');return;}const _0x166e02=Array[_0xa39779(0x1a9)](_0x260944)[_0xa39779(0x1fb)](_0x45df90=>UI_IDE_LIST[_0x45df90])[_0xa39779(0x1f1)](_0x198ebd=>_0x198ebd!==undefined);_0x1a9e90(_0x1d2a83=>[..._0x1d2a83,{'step':_0xa39779(0x1da),'label':_0xa39779(0x1db),'value':_0x166e02['length']+_0xa39779(0x201)}]);const _0x18f2a1=_0xcc856c||_0x435003||_0xa39779(0x1cf);_0x2972cf({'projectName':_0x47add7,'appCode':_0x33402f,'pullApi':_0x418cf7,'aiSetup':!![],'selectedIDEs':_0x166e02,'env':_0x18f2a1}),_0x4690d0(_0xa39779(0x1a7));return;}if(_0x33e085===_0xa39779(0x1b2)){const _0x5e27fc=_0x365830===0x0;if(_0x5e27fc){_0x4690d0(_0xa39779(0x1f9));const _0x3b040b=await _0x57b1d6();_0x3b040b?(_0x1a9e90(_0x3ad2cc=>[..._0x3ad2cc,{'step':_0xa39779(0x1e9),'label':_0xa39779(0x1ba),'value':'已登录'}]),_0x4690d0(_0xa39779(0x1c3))):(_0x1a9e90(_0x355e3a=>[..._0x355e3a,{'step':'login','label':_0xa39779(0x1ba),'value':_0xa39779(0x1a6)}]),_0x4690d0(_0xa39779(0x1e5)));}else _0x1a9e90(_0x2aca9e=>[..._0x2aca9e,{'step':'login','label':_0xa39779(0x1ba),'value':'跳过登录'}]),_0x4690d0(_0xa39779(0x1e5));return;}}if(_0x15c71d[_0xa39779(0x1be)]||_0x15c71d[_0xa39779(0x1d2)]){_0x39cf58(_0x259d20=>{const _0x5452a5=_0xa39779,_0x348b4e=_0x259d20[_0x5452a5(0x1fe)](0x0,-0x1);if(_0x33e085===_0x5452a5(0x1c8)){const {valid:_0xfa10b1,message:_0x20e530}=_0x1d9f1d(_0x348b4e);_0x38fa1a(_0xfa10b1?'':_0x20e530||_0x5452a5(0x1c0));if(_0xfa10b1&&!_0x201d0c){const _0x49e35f=_0x348b4e||_0x4d9251;_0x91c92f(_0x49e35f)?_0x345cc7('目录\x20\x22'+_0x49e35f+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0x5452a5(0x1a5)){const {valid:_0x451bc8,message:_0x4fcfe4}=_0x24cf39(_0x348b4e);_0x38fa1a(_0x451bc8?'':_0x4fcfe4||'应用AppCode不合法');}}return _0x348b4e;});return;}if([_0xa39779(0x1a7),_0xa39779(0x1dd),_0xa39779(0x1f9)][_0xa39779(0x1bf)](_0x33e085))return;if(_0x33e085===_0xa39779(0x1c3)||_0x33e085==='login-prompt'||_0x33e085===_0xa39779(0x1e5))return;_0x39cf58(_0x25b46f=>{const _0xb765c3=_0xa39779,_0x5235bc=_0x25b46f+_0x32b188;if(_0x33e085===_0xb765c3(0x1c8)){const {valid:_0x87d19b,message:_0x21338e}=_0x1d9f1d(_0x5235bc);_0x38fa1a(_0x87d19b?'':_0x21338e||_0xb765c3(0x1c0));if(_0x87d19b&&!_0x201d0c){const _0x4063fe=_0x5235bc||_0x4d9251;_0x91c92f(_0x4063fe)?_0x345cc7('目录\x20\x22'+_0x4063fe+'\x22\x20已存在'):_0x345cc7('');}}else{if(_0x33e085===_0xb765c3(0x1a5)){const {valid:_0x554686,message:_0x143bfb}=_0x24cf39(_0x5235bc);_0x38fa1a(_0x554686?'':_0x143bfb||'应用AppCode不合法');}}return _0x5235bc;});}),a42_0x2d3dcc(Box,{'flexDirection':_0x1a21c4(0x1cb),'marginTop':0x1,'children':[_0x4c8336[_0x1a21c4(0x1ad)]===0x0&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':'*\x20创建新项目'})}),_0x4c8336[_0x1a21c4(0x1fb)](_0x378f10=>a42_0x2d3dcc(Box,{'children':[a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1a8),'children':['√\x20',_0x378f10[_0x1a21c4(0x1ea)],':\x20']}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x202),'children':_0x378f10[_0x1a21c4(0x1e7)]})]},_0x378f10[_0x1a21c4(0x1f7)])),_0x33e085===_0x1a21c4(0x1c8)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d8)}),_0x77f488?a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}):a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x4d9251}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]}),_0xfa22b8&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0xfa22b8]})]}),!_0x201d0c&&!_0xfa22b8&&!_0x77f488&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1af)})})]}),_0x33e085===_0x1a21c4(0x1a5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ab)}),a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1e4)}),a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x77f488}),_0x201d0c&&a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':[_0x1a21c4(0x1f3),_0x201d0c]})]}),!_0x201d0c&&a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'color':'gray','children':['\x20',_0x1a21c4(0x1f4)]})})]}),_0x33e085===_0x1a21c4(0x1dd)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1b4)}),_0x4ab234&&a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1a2)})]}),_0x33e085===_0x1a21c4(0x1c3)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':'√\x20检测到有效登录状态'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1cd)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0xbcb563===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0xbcb563===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0xbcb563===0x1?_0x1a21c4(0x1a8):'gray','children':[_0xbcb563===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'gray','children':_0x1a21c4(0x1d9)})}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1a4)})})]}),_0x33e085===_0x1a21c4(0x1e5)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':'green','children':'√'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1d1)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x42e343===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x42e343===0x0?'▶\x20':'\x20\x20','Yes']}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x42e343===0x1?_0x1a21c4(0x1a8):'gray','children':[_0x42e343===0x1?'▶\x20':'\x20\x20','No']})]}),_0x5e6b15&&_0x42e343===0x0&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1f6)})}),a42_0x2d3dcc(Box,{'marginTop':0x1,'flexDirection':_0x1a21c4(0x1cb),'children':[a42_0x18e0d9(Text,{'bold':!![],'color':_0x1a21c4(0x1f5),'children':_0x1a21c4(0x1dc)}),UI_IDE_LIST['map']((_0x4e8a1a,_0x270c9f)=>{const _0x415f10=_0x1a21c4,_0x14650b=_0x1f2d71===_0x270c9f,_0x391b06=_0x260944[_0x415f10(0x1d0)](_0x270c9f),_0x29aeb0=UI_MCP_IDES['has'](_0x4e8a1a);return a42_0x18e0d9(Box,{'children':a42_0x2d3dcc(Text,{'backgroundColor':_0x14650b?_0x415f10(0x1a3):undefined,'color':_0x14650b?_0x415f10(0x1fa):undefined,'children':['\x20\x20',_0x391b06?_0x415f10(0x1ce):_0x415f10(0x1de),'\x20',UI_IDE_CONFIGS[_0x4e8a1a]['name'],_0x29aeb0&&a42_0x18e0d9(Text,{'color':_0x14650b?_0x415f10(0x1fa):_0x415f10(0x202),'children':_0x415f10(0x203)}),'\x20',a42_0x2d3dcc(Text,{'color':_0x14650b?_0x415f10(0x1fa):'gray','dimColor':!_0x14650b,'children':['-\x20',UI_IDE_CONFIGS[_0x4e8a1a]['description']]})]})},_0x4e8a1a);}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1c7),'children':['\x20',_0x1a21c4(0x1df)]})})]})]}),!_0x5e6b15&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})}),_0x201d0c&&a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x2d3dcc(Text,{'color':_0x1a21c4(0x1e6),'children':['✗\x20',_0x201d0c]})})]}),_0x33e085===_0x1a21c4(0x1b2)&&a42_0x2d3dcc(a42_0x3567db,{'children':[a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1f5),'children':'!\x20未检测到有效登录'})}),a42_0x18e0d9(Box,{'marginTop':0x1,'children':a42_0x18e0d9(Text,{'children':_0x1a21c4(0x1ef)})}),a42_0x2d3dcc(Box,{'marginLeft':0x2,'children':[a42_0x2d3dcc(Text,{'color':_0x365830===0x0?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x0?'▶\x20':'\x20\x20',_0x1a21c4(0x1c9)]}),a42_0x18e0d9(Text,{'children':'\x20'}),a42_0x2d3dcc(Text,{'color':_0x365830===0x1?_0x1a21c4(0x1a8):_0x1a21c4(0x1c7),'children':[_0x365830===0x1?'▶\x20':'\x20\x20','No']})]}),a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1c7),'children':_0x1a21c4(0x1d9)})})]}),_0x33e085===_0x1a21c4(0x1f9)&&a42_0x2d3dcc(Box,{'children':[a42_0x18e0d9(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0xf6e309&&a42_0x18e0d9(Text,{'color':'gray','children':'\x20登录中...'})]}),_0x33e085===_0x1a21c4(0x1a7)&&a42_0x18e0d9(Box,{'children':a42_0x18e0d9(Text,{'color':_0x1a21c4(0x1a8),'children':_0x1a21c4(0x1c2)})})]});}
@@ -1 +1 @@
1
- function a42_0x3920(_0x589555,_0x236d37){_0x589555=_0x589555-0x107;const _0x5536c6=a42_0x5536();let _0x39200a=_0x5536c6[_0x589555];return _0x39200a;}(function(_0x149714,_0x1ef57b){const _0x587cd5=a42_0x3920,_0x1e66b4=_0x149714();while(!![]){try{const _0x26ba06=-parseInt(_0x587cd5(0x10d))/0x1+-parseInt(_0x587cd5(0x10a))/0x2+parseInt(_0x587cd5(0x10f))/0x3+-parseInt(_0x587cd5(0x113))/0x4*(-parseInt(_0x587cd5(0x10c))/0x5)+parseInt(_0x587cd5(0x112))/0x6*(-parseInt(_0x587cd5(0x10e))/0x7)+parseInt(_0x587cd5(0x110))/0x8*(parseInt(_0x587cd5(0x10b))/0x9)+parseInt(_0x587cd5(0x109))/0xa*(parseInt(_0x587cd5(0x108))/0xb);if(_0x26ba06===_0x1ef57b)break;else _0x1e66b4['push'](_0x1e66b4['shift']());}catch(_0x5b77df){_0x1e66b4['push'](_0x1e66b4['shift']());}}}(a42_0x5536,0xdbe4b));function a42_0x5536(){const _0x3120a1=['117257sNRRUR','5325117vXgysq','64YkJNpb','toFixed','498CkzRdo','6056108yGseJW','now','2775399POftwb','20mtWiOK','3229486NhVcHf','733221yqADGF','5YhNRqN','539677cCHhpf'];a42_0x5536=function(){return _0x3120a1;};return a42_0x5536();}export function formatElapsed(_0x5b8a73){const _0x3c4162=a42_0x3920,_0x5b28cc=Date[_0x3c4162(0x107)]()-_0x5b8a73;if(_0x5b28cc<0x3e8)return _0x5b28cc+'ms';const _0x2e50f0=(_0x5b28cc/0x3e8)[_0x3c4162(0x111)](0x2),_0x3d98d7=_0x2e50f0['replace'](/\.?0+$/u,'');return _0x3d98d7+'s';}
1
+ (function(_0x554075,_0x3b19a2){const _0x2465e1=a43_0x1ac8,_0x314a89=_0x554075();while(!![]){try{const _0xdbcfeb=-parseInt(_0x2465e1(0x1b0))/0x1*(parseInt(_0x2465e1(0x1ae))/0x2)+-parseInt(_0x2465e1(0x1b2))/0x3+parseInt(_0x2465e1(0x1ac))/0x4+-parseInt(_0x2465e1(0x1af))/0x5*(parseInt(_0x2465e1(0x1a8))/0x6)+parseInt(_0x2465e1(0x1ad))/0x7*(-parseInt(_0x2465e1(0x1a9))/0x8)+-parseInt(_0x2465e1(0x1b1))/0x9+parseInt(_0x2465e1(0x1ab))/0xa;if(_0xdbcfeb===_0x3b19a2)break;else _0x314a89['push'](_0x314a89['shift']());}catch(_0x271abc){_0x314a89['push'](_0x314a89['shift']());}}}(a43_0x1ef3,0xa85fc));function a43_0x1ac8(_0x2d8582,_0x4bdcac){_0x2d8582=_0x2d8582-0x1a8;const _0x1ef33e=a43_0x1ef3();let _0x1ac8b6=_0x1ef33e[_0x2d8582];return _0x1ac8b6;}export function formatElapsed(_0x294ba8){const _0x171d7e=a43_0x1ac8,_0x5bd4b4=Date['now']()-_0x294ba8;if(_0x5bd4b4<0x3e8)return _0x5bd4b4+'ms';const _0x141d2e=(_0x5bd4b4/0x3e8)[_0x171d7e(0x1aa)](0x2),_0x4d0edc=_0x141d2e['replace'](/\.?0+$/u,'');return _0x4d0edc+'s';}function a43_0x1ef3(){const _0x31c30d=['6glrvCF','657085zEEURr','92965AGBoPp','5259465pdOauw','1217337quaORG','12TYGzVK','446392yMakOk','toFixed','10490700fVnkiJ','4913128utcSTB','7guDevp'];a43_0x1ef3=function(){return _0x31c30d;};return a43_0x1ef3();}
@@ -1 +1 @@
1
- (function(_0x5c5fb1,_0x2c29f5){const _0x27d1d3=a43_0xc85d,_0xfb0061=_0x5c5fb1();while(!![]){try{const _0x4cc7db=-parseInt(_0x27d1d3(0x206))/0x1*(-parseInt(_0x27d1d3(0x1dc))/0x2)+-parseInt(_0x27d1d3(0x1f3))/0x3+parseInt(_0x27d1d3(0x226))/0x4*(parseInt(_0x27d1d3(0x1bf))/0x5)+-parseInt(_0x27d1d3(0x21b))/0x6*(parseInt(_0x27d1d3(0x1e7))/0x7)+-parseInt(_0x27d1d3(0x1ed))/0x8+-parseInt(_0x27d1d3(0x1cf))/0x9*(parseInt(_0x27d1d3(0x212))/0xa)+parseInt(_0x27d1d3(0x200))/0xb;if(_0x4cc7db===_0x2c29f5)break;else _0xfb0061['push'](_0xfb0061['shift']());}catch(_0xc03b2f){_0xfb0061['push'](_0xfb0061['shift']());}}}(a43_0x486c,0x63f45));import{jsx as a43_0x139cf0,Fragment as a43_0x50d9c2,jsxs as a43_0x9a4020}from'react/jsx-runtime';import a43_0x233290 from'path';import a43_0x115f6a 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';function a43_0x486c(){const _0x2c1f6f=['cwd','1069176JyilKo','清理项目目录失败:\x20','resolve','pullApi','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','selectedIDEs','√\x20API\x20配置拉取完成','🚀\x20接下来:','writeFileSync','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','white','log','mcp','8330454lVfusp','online','stringify','currentVersion','√\x20package.json\x20已更新:\x20name=','success','588137AUUagA','.lovrabetrc','error','message','\x20配置应用AppCode:\x20','green','../..','W_OK','cursor','ide','dirname','info','2762140OwjqUN','rmSync','constants','toLocaleString','√\x20配置文件已创建,应用AppCode:\x20','API\x20配置拉取成功:\x20','appCode','needsUpgrade','push','6BpFsSx','✓\x20Skill\x20安装完成:','utf8','项目创建完成:\x20','启动项目:\x20','\x20\x20•\x20Skill:\x20','×\x20项目名不能为空','existsSync','×\x20项目名过长,最多支持\x20100\x20个字符','lovrabet\x20api\x20pull','manual','208FxuMMO','\x20\x20✗\x20Skill\x20','\x20|\x20应用AppCode:\x20','yellow','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','*\x20正在为项目\x20','string','×\x20项目创建失败:\x20','配置应用AppCode:\x20','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','Claude\x20Code','repeat','projectName','parse','cd\x20','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','22955jxGuyO','red','create','mcp-','\x20Skill\x20','stableVersion','3.\x20','\x20\x20✗\x20MCP\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','setLogPath','map','skill','join','trim','description','✓\x20MCP\x20服务器配置完成:','18kcpfLb','API\x20配置拉取失败:\x20','status','更新\x20package.json\x20name','Cursor','\x20已存在,请使用其他项目名','拉取API配置:\x20','lovrabet\x20mcp\x20install','skill-','test','aiSetup','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','更新\x20package.json\x20失败','2VUYvXd','readFileSync','API\x20配置拉取异常','doTask','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','lovrabet\x20skill\x20install','has','warn','cyan','配置应用AppCode失败','gray','1205183cFsmQb','length','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','1.0.0','2.\x20','filter','750248wKsUJa','package.json','env','projectCode','开始创建项目:\x20'];a43_0x486c=function(){return _0x2c1f6f;};return a43_0x486c();}function a43_0xc85d(_0x15713d,_0x273f84){_0x15713d=_0x15713d-0x1b6;const _0x486c36=a43_0x486c();let _0xc85dcb=_0x486c36[_0x15713d];return _0xc85dcb;}import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp,copySharedSkills,installSkill,createSkillManifest}from'../ai-setup/config.js';import{MCP_IDES}from'../utils/ai_config.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x123c18){const _0x1afc32=a43_0xc85d,[_0x57fd52,_0x8b336a]=useState(![]),[_0x5266fb,_0x488856]=useState(![]),[_0x20adab,_0x4d0fb4]=useState(null),[_0x584d5c,_0xd52590]=useState(null),_0x308aa4=useCopyProjectTemplate(),_0x49fd94=useInstallDependencies(),_0x2c4857=useFormatCode();useEffect(()=>{checkCliVersion()['then'](_0x1fe7ee=>{const _0x437d8a=a43_0xc85d;_0x1fe7ee[_0x437d8a(0x219)]&&(printCliUpgradeWarning(_0x1fe7ee),logger[_0x437d8a(0x211)](_0x437d8a(0x1c1),'CLI\x20版本检查',{'currentVersion':_0x1fe7ee[_0x437d8a(0x203)],'stableVersion':_0x1fe7ee[_0x437d8a(0x1c4)],'needsUpgrade':_0x1fe7ee['needsUpgrade']}));});},[]);const _0x20fd7c=async _0x377e9d=>{const _0x3d2b92=a43_0xc85d;if(!_0x377e9d['projectName']||_0x377e9d[_0x3d2b92(0x1bb)][_0x3d2b92(0x1cc)]()===''){console[_0x3d2b92(0x208)](_0x3d2b92(0x221));return;}const _0x44f42d=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x44f42d[_0x3d2b92(0x1d8)](_0x377e9d[_0x3d2b92(0x1bb)])){console[_0x3d2b92(0x208)](_0x3d2b92(0x1b8));return;}if(_0x377e9d['projectName'][_0x3d2b92(0x1e8)]>0x64){console['error'](_0x3d2b92(0x223));return;}const _0x1ce5bb=a43_0x233290['resolve'](process[_0x3d2b92(0x1f2)](),_0x377e9d['projectName']);if(a43_0x115f6a[_0x3d2b92(0x222)](_0x1ce5bb)){console[_0x3d2b92(0x208)]('×\x20项目目录\x20'+_0x377e9d[_0x3d2b92(0x1bb)]+_0x3d2b92(0x1d4));return;}try{const _0x560020=a43_0x233290['dirname'](_0x1ce5bb);a43_0x115f6a['accessSync'](_0x560020,a43_0x115f6a[_0x3d2b92(0x214)][_0x3d2b92(0x20d)]);}catch(_0x5ec642){console[_0x3d2b92(0x208)]('×\x20无法在当前目录创建项目,请检查目录权限');return;}_0x4d0fb4(_0x377e9d),_0x8b336a(!![]),logger[_0x3d2b92(0x1c8)](_0x1ce5bb),logger[_0x3d2b92(0x211)](_0x3d2b92(0x1c1),_0x3d2b92(0x1f1)+_0x377e9d[_0x3d2b92(0x1bb)],{'projectDir':_0x1ce5bb,'appCode':_0x377e9d[_0x3d2b92(0x218)]});try{await _0x308aa4[_0x3d2b92(0x1df)](_0x377e9d['projectName']),await _0x390167(_0x377e9d[_0x3d2b92(0x1bb)]),await _0x49fd94[_0x3d2b92(0x1df)](_0x377e9d['projectName']),await _0x2c4857[_0x3d2b92(0x1df)](_0x377e9d[_0x3d2b92(0x1bb)]),await _0x2a6bd4(_0x377e9d['projectName'],_0x377e9d['appCode']||'',_0x377e9d[_0x3d2b92(0x1ef)]);if(_0x377e9d[_0x3d2b92(0x1f6)]&&_0x377e9d['appCode']){console[_0x3d2b92(0x1fe)]('*\x20正在拉取\x20API\x20配置...');try{const _0xd47103=await pullApiSilent(_0x377e9d[_0x3d2b92(0x218)],undefined,_0x1ce5bb,_0x377e9d[_0x3d2b92(0x1ef)]);_0xd47103?(console[_0x3d2b92(0x1fe)](_0x3d2b92(0x1f9)),logger['info'](_0x3d2b92(0x1c1),_0x3d2b92(0x217)+_0x377e9d['appCode'])):(console['log'](_0x3d2b92(0x22a)),logger['warn']('create',_0x3d2b92(0x1d0)+_0x377e9d[_0x3d2b92(0x218)]));}catch(_0x56a73d){console['log'](_0x3d2b92(0x1fc)),logger[_0x3d2b92(0x1e3)](_0x3d2b92(0x1c1),_0x3d2b92(0x1de),{'error':_0x56a73d instanceof Error?_0x56a73d[_0x3d2b92(0x209)]:String(_0x56a73d)});}}if(_0x377e9d[_0x3d2b92(0x1d9)]&&_0x377e9d[_0x3d2b92(0x1f8)]&&_0x377e9d['selectedIDEs'][_0x3d2b92(0x1e8)]>0x0&&_0x377e9d[_0x3d2b92(0x218)]){console['log'](_0x3d2b92(0x1e0));const _0x4b7580=[],_0x4fab43=[],_0x2baff0=_0x377e9d['selectedIDEs']['filter'](_0x3286ae=>MCP_IDES[_0x3d2b92(0x1e2)](_0x3286ae)),_0x24330e=_0x377e9d['selectedIDEs'];for(const _0x9b8060 of _0x2baff0){try{const _0x54e805=await configureMcp(_0x9b8060,_0x1ce5bb);_0x4b7580[_0x3d2b92(0x21a)]({'ide':_0x9b8060===_0x3d2b92(0x20e)?_0x3d2b92(0x1d3):_0x3d2b92(0x1b9),'status':_0x54e805[_0x3d2b92(0x1d1)],'message':_0x54e805[_0x3d2b92(0x209)]}),console[_0x3d2b92(0x1fe)]('\x20\x20'+(_0x54e805['status']===_0x3d2b92(0x205)?'✓':_0x54e805['status']==='manual'?'⚠️':'✗')+'\x20MCP\x20'+_0x9b8060+':\x20'+_0x54e805[_0x3d2b92(0x209)]);}catch(_0x15764f){_0x4b7580[_0x3d2b92(0x21a)]({'ide':_0x9b8060===_0x3d2b92(0x20e)?_0x3d2b92(0x1d3):'Claude\x20Code','status':'error','message':_0x15764f instanceof Error?_0x15764f[_0x3d2b92(0x209)]:String(_0x15764f)}),console[_0x3d2b92(0x1fe)](_0x3d2b92(0x1c6)+_0x9b8060+':\x20'+(_0x15764f instanceof Error?_0x15764f[_0x3d2b92(0x209)]:String(_0x15764f)));}}await copySharedSkills(_0x1ce5bb);for(const _0x4b8ff4 of _0x24330e){try{const _0x491a23=await installSkill(_0x4b8ff4,_0x1ce5bb);_0x4fab43['push']({'ide':_0x491a23[_0x3d2b92(0x20f)],'status':_0x491a23[_0x3d2b92(0x1d1)],'message':_0x491a23['message']}),console['log']('\x20\x20'+(_0x491a23['status']===_0x3d2b92(0x205)?'✓':'✗')+_0x3d2b92(0x1c3)+_0x491a23[_0x3d2b92(0x20f)]+':\x20'+_0x491a23[_0x3d2b92(0x209)]);}catch(_0x350ae7){_0x4fab43['push']({'ide':_0x4b8ff4,'status':_0x3d2b92(0x208),'message':_0x350ae7 instanceof Error?_0x350ae7['message']:String(_0x350ae7)}),console[_0x3d2b92(0x1fe)](_0x3d2b92(0x227)+_0x4b8ff4+':\x20'+(_0x350ae7 instanceof Error?_0x350ae7['message']:String(_0x350ae7)));}}if(_0x4fab43[_0x3d2b92(0x1e8)]>0x0){const _0x2360ac=_0x4fab43[_0x3d2b92(0x1ec)](_0x26eeb9=>_0x26eeb9[_0x3d2b92(0x1d1)]===_0x3d2b92(0x205))[_0x3d2b92(0x1c9)](_0x55592b=>_0x55592b['ide']);_0x2360ac[_0x3d2b92(0x1e8)]>0x0&&createSkillManifest(_0x1ce5bb,_0x2360ac);}_0xd52590({'mcp':_0x4b7580,'skill':_0x4fab43}),console['log']('√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成');}logger[_0x3d2b92(0x205)](_0x3d2b92(0x1c1),_0x3d2b92(0x21e)+_0x377e9d['projectName']),_0x488856(!![]),_0x8b336a(![]);}catch(_0x380616){logger[_0x3d2b92(0x208)]('create','项目创建失败:\x20'+_0x377e9d[_0x3d2b92(0x1bb)],{'error':_0x380616 instanceof Error?_0x380616[_0x3d2b92(0x209)]:String(_0x380616)});try{a43_0x115f6a[_0x3d2b92(0x222)](_0x1ce5bb)&&(console[_0x3d2b92(0x1fe)]('*\x20清理失败的项目目录:\x20'+_0x1ce5bb),a43_0x115f6a[_0x3d2b92(0x213)](_0x1ce5bb,{'recursive':!![],'force':!![]}));}catch(_0x2cb65f){logger[_0x3d2b92(0x1e3)](_0x3d2b92(0x1c1),_0x3d2b92(0x1f4)+_0x1ce5bb);}_0x8b336a(![]),console[_0x3d2b92(0x208)](_0x3d2b92(0x1b6)+(_0x380616 instanceof Error?_0x380616[_0x3d2b92(0x209)]:String(_0x380616)));}},_0x316569=async _0x1f7195=>{const _0x2b6537=a43_0xc85d;await _0x20fd7c({'projectName':_0x1f7195,'env':_0x123c18[_0x2b6537(0x1ef)]});},_0x390167=async _0x5cabc4=>{const _0x2bb306=a43_0xc85d,_0x3504ff=a43_0x233290[_0x2bb306(0x1f5)](process[_0x2bb306(0x1f2)](),_0x5cabc4),_0x222257=a43_0x233290[_0x2bb306(0x1cb)](_0x3504ff,_0x2bb306(0x1ee));try{console[_0x2bb306(0x1fe)](_0x2bb306(0x1f7));const _0xb0bea4=fileURLToPath(import.meta.url),_0x91d2a3=a43_0x233290['resolve'](a43_0x233290['dirname'](_0xb0bea4),_0x2bb306(0x20c)),_0x3120b3=a43_0x233290['join'](_0x91d2a3,_0x2bb306(0x1ee));let _0x44aa0f=_0x2bb306(0x1ea);try{const _0x1f2471=JSON[_0x2bb306(0x1bc)](a43_0x115f6a[_0x2bb306(0x1dd)](_0x3120b3,'utf8'));_0x44aa0f=_0x1f2471['version']||_0x2bb306(0x1ea);}catch(_0x25dd69){}const _0x1d3314=a43_0x115f6a[_0x2bb306(0x1dd)](_0x222257,_0x2bb306(0x21d)),_0xa1e343=JSON[_0x2bb306(0x1bc)](_0x1d3314);_0xa1e343['name']=_0x5cabc4,_0xa1e343[_0x2bb306(0x1cd)]=_0x5cabc4+'\x20Generated\x20by\x20lovrabet\x20cli\x20'+_0x44aa0f,a43_0x115f6a[_0x2bb306(0x1fb)](_0x222257,JSON['stringify'](_0xa1e343,null,0x2)+'\x0a',_0x2bb306(0x21d)),console[_0x2bb306(0x1fe)](_0x2bb306(0x204)+_0x5cabc4),logger['info'](_0x2bb306(0x1c1),_0x2bb306(0x1d2));}catch(_0x42a9de){logger[_0x2bb306(0x208)]('create',_0x2bb306(0x1db));throw _0x42a9de;}},_0x2a6bd4=async(_0x3a3f4f,_0x5a743e,_0x4c20a0)=>{const _0x43df51=a43_0xc85d,_0x20454e=a43_0x233290[_0x43df51(0x1f5)](process[_0x43df51(0x1f2)](),_0x3a3f4f),_0x1667df=a43_0x233290[_0x43df51(0x1cb)](_0x20454e,_0x43df51(0x207));try{_0x5a743e?console[_0x43df51(0x1fe)]('*\x20正在为项目\x20'+_0x3a3f4f+_0x43df51(0x20a)+_0x5a743e):console[_0x43df51(0x1fe)](_0x43df51(0x22b)+_0x3a3f4f+'\x20创建配置文件');const _0x58da16=fileURLToPath(import.meta.url),_0x2e1038=a43_0x233290[_0x43df51(0x1f5)](a43_0x233290[_0x43df51(0x210)](_0x58da16),_0x43df51(0x20c)),_0x1a7c99=a43_0x233290[_0x43df51(0x1cb)](_0x2e1038,_0x43df51(0x1ee));let _0xe90928=_0x43df51(0x1ea);try{const _0x52aa6c=JSON['parse'](a43_0x115f6a[_0x43df51(0x1dd)](_0x1a7c99,_0x43df51(0x21d)));_0xe90928=_0x52aa6c['version']||_0x43df51(0x1ea);}catch(_0x560857){}const _0x121c94=readConfig(),_0x4aa4f8=typeof _0x121c94[_0x43df51(0x1ef)]===_0x43df51(0x22c)?_0x121c94['env']:undefined,{app:_0xeceb6a,appcode:_0x74ff65,..._0x4e2c17}=_0x121c94,_0x59bc69={..._0x4e2c17,'appcode':_0x5a743e||'','env':_0x4c20a0||_0x4aa4f8||_0x43df51(0x201),'createdAt':new Date()[_0x43df51(0x215)](),'version':_0xe90928};a43_0x115f6a[_0x43df51(0x1fb)](_0x1667df,JSON[_0x43df51(0x202)](_0x59bc69,null,0x2),_0x43df51(0x21d)),_0x5a743e?console[_0x43df51(0x1fe)](_0x43df51(0x216)+_0x5a743e):console['log'](_0x43df51(0x1da)),logger['info'](_0x43df51(0x1c1),_0x43df51(0x1b7)+_0x5a743e);}catch(_0x5086e6){logger['error'](_0x43df51(0x1c1),_0x43df51(0x1e5));}};useEffect(()=>{const _0x4a60a7=a43_0xc85d;_0x123c18['projectCode']&&_0x316569(_0x123c18[_0x4a60a7(0x1f0)]);},[_0x123c18[_0x1afc32(0x1f0)]]);if(!_0x57fd52&&!_0x5266fb&&!_0x123c18[_0x1afc32(0x1f0)])return a43_0x139cf0(EnhancedGuidedCreate,{'onCreate':_0x20fd7c,'env':_0x123c18[_0x1afc32(0x1ef)]});if(_0x57fd52)return a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x9a4020(Box,{'marginTop':0x1,'children':[a43_0x139cf0(Box,{'width':'1'}),a43_0x139cf0(Text,{'color':'green','children':'\x20√\x20'}),a43_0x139cf0(Text,{'children':'项目名称:\x20'}),a43_0x139cf0(Text,{'color':'green','children':_0x20adab?.['projectName']}),_0x20adab?.[_0x1afc32(0x218)]&&a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x139cf0(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'children':_0x20adab['appCode']})]})]}),a43_0x139cf0(TaskRunning,{..._0x308aa4}),a43_0x139cf0(TaskRunning,{..._0x49fd94}),a43_0x139cf0(TaskRunning,{..._0x2c4857})]});if(_0x5266fb){const _0x390238=_0x584d5c&&(_0x584d5c[_0x1afc32(0x1ff)][_0x1afc32(0x1e8)]>0x0||_0x584d5c['skill'][_0x1afc32(0x1e8)]>0x0);return a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x9a4020(Box,{'marginTop':0x1,'children':[a43_0x139cf0(Box,{'width':'1'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':'\x20√\x20'}),a43_0x139cf0(Text,{'children':'项目名称:\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':_0x20adab?.[_0x1afc32(0x1bb)]}),_0x20adab?.[_0x1afc32(0x218)]&&a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x139cf0(Text,{'children':_0x1afc32(0x228)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'children':_0x20adab['appCode']})]})]}),a43_0x139cf0(TaskFinished,{..._0x308aa4}),a43_0x139cf0(TaskFinished,{..._0x49fd94}),a43_0x139cf0(TaskFinished,{..._0x2c4857}),a43_0x139cf0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':'─'[_0x1afc32(0x1ba)](0x3c)})}),_0x390238&&a43_0x9a4020(a43_0x50d9c2,{'children':[_0x584d5c[_0x1afc32(0x1ff)][_0x1afc32(0x1e8)]>0x0&&a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x139cf0(Box,{'marginTop':0x1,'children':a43_0x139cf0(Text,{'color':'green','bold':!![],'children':_0x1afc32(0x1ce)})}),_0x584d5c[_0x1afc32(0x1ff)][_0x1afc32(0x1c9)]((_0xda2ac9,_0x2ad188)=>a43_0x139cf0(Box,{'marginLeft':0x2,'children':a43_0x9a4020(Text,{'color':_0xda2ac9['status']===_0x1afc32(0x205)?_0x1afc32(0x1fd):_0xda2ac9[_0x1afc32(0x1d1)]===_0x1afc32(0x225)?_0x1afc32(0x229):_0x1afc32(0x1c0),'children':[_0xda2ac9[_0x1afc32(0x20f)],':\x20',_0xda2ac9[_0x1afc32(0x209)]]})},_0x1afc32(0x1c2)+_0x2ad188))]}),_0x584d5c[_0x1afc32(0x1ca)][_0x1afc32(0x1e8)]>0x0&&a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x139cf0(Box,{'marginTop':_0x584d5c[_0x1afc32(0x1ff)][_0x1afc32(0x1e8)]>0x0?0x1:0x0,'children':a43_0x139cf0(Text,{'color':'green','bold':!![],'children':_0x1afc32(0x21c)})}),_0x584d5c[_0x1afc32(0x1ca)]['map']((_0x3a41a8,_0x360d1f)=>a43_0x139cf0(Box,{'marginLeft':0x2,'children':a43_0x9a4020(Text,{'color':_0x3a41a8['status']==='success'?_0x1afc32(0x1fd):_0x1afc32(0x1c0),'children':[_0x3a41a8[_0x1afc32(0x20f)],':\x20',_0x3a41a8[_0x1afc32(0x209)]]})},_0x1afc32(0x1d7)+_0x360d1f))]}),a43_0x139cf0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':'─'[_0x1afc32(0x1ba)](0x3c)})})]}),a43_0x139cf0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':_0x1afc32(0x1fa)})}),a43_0x9a4020(Box,{'marginLeft':0x2,'flexDirection':'column','children':[_0x390238?a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x9a4020(Box,{'children':[a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':'1.\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':'启动项目:\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':'cd\x20'+_0x20adab?.['projectName']+'\x20&&\x20lovrabet\x20start'})]}),_0x20adab?.['appCode']&&!_0x20adab?.[_0x1afc32(0x1f6)]&&a43_0x9a4020(Box,{'children':[a43_0x139cf0(Text,{'color':_0x1afc32(0x229),'children':_0x1afc32(0x1eb)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':_0x1afc32(0x1d5)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':_0x1afc32(0x224)})]})]}):a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x139cf0(Box,{'children':a43_0x139cf0(Text,{'color':'yellow','bold':!![],'children':_0x1afc32(0x1be)})}),a43_0x9a4020(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a43_0x139cf0(Text,{'color':'white','children':_0x1afc32(0x220)}),a43_0x139cf0(Text,{'color':'cyan','bold':!![],'children':_0x1afc32(0x1e1)})]}),a43_0x9a4020(Box,{'marginLeft':0x2,'children':[a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':'\x20\x20•\x20MCP\x20服务器:\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':_0x1afc32(0x1d6)})]}),a43_0x9a4020(Box,{'marginTop':0x1,'children':[a43_0x139cf0(Text,{'color':'green','children':_0x1afc32(0x1eb)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':_0x1afc32(0x21f)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':_0x1afc32(0x1bd)+_0x20adab?.[_0x1afc32(0x1bb)]+'\x20&&\x20lovrabet\x20start'})]}),_0x20adab?.[_0x1afc32(0x218)]&&!_0x20adab?.[_0x1afc32(0x1f6)]&&a43_0x9a4020(Box,{'children':[a43_0x139cf0(Text,{'color':'yellow','children':_0x1afc32(0x1c5)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':_0x1afc32(0x1d5)}),a43_0x139cf0(Text,{'color':'cyan','bold':!![],'children':_0x1afc32(0x224)})]})]}),!_0x20adab?.[_0x1afc32(0x218)]&&a43_0x9a4020(a43_0x50d9c2,{'children':[a43_0x9a4020(Box,{'children':[a43_0x139cf0(Text,{'color':'gray','children':_0x1afc32(0x1eb)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':'配置AppCode:\x20'}),a43_0x139cf0(Text,{'color':'cyan','bold':!![],'children':_0x1afc32(0x1c7)})]}),a43_0x9a4020(Box,{'children':[a43_0x139cf0(Text,{'color':_0x1afc32(0x1e6),'children':_0x1afc32(0x1c5)}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1fd),'children':'拉取API配置:\x20'}),a43_0x139cf0(Text,{'color':_0x1afc32(0x1e4),'bold':!![],'children':_0x1afc32(0x1e9)})]})]})]}),a43_0x139cf0(Box,{'marginTop':0x1,'children':a43_0x139cf0(Text,{'color':_0x1afc32(0x20b),'children':'─'[_0x1afc32(0x1ba)](0x3c)})})]});}return null;}
1
+ (function(_0x5c1f6f,_0x40cb47){const _0xfd5c42=a44_0x4577,_0x113bed=_0x5c1f6f();while(!![]){try{const _0x31657b=parseInt(_0xfd5c42(0x86))/0x1*(-parseInt(_0xfd5c42(0x7d))/0x2)+-parseInt(_0xfd5c42(0x81))/0x3+-parseInt(_0xfd5c42(0x95))/0x4+-parseInt(_0xfd5c42(0xa0))/0x5*(parseInt(_0xfd5c42(0x8a))/0x6)+-parseInt(_0xfd5c42(0xc9))/0x7+-parseInt(_0xfd5c42(0x90))/0x8+parseInt(_0xfd5c42(0x8f))/0x9*(parseInt(_0xfd5c42(0x6e))/0xa);if(_0x31657b===_0x40cb47)break;else _0x113bed['push'](_0x113bed['shift']());}catch(_0x551fa8){_0x113bed['push'](_0x113bed['shift']());}}}(a44_0x5d60,0x2e3ed));import{jsx as a44_0x38635c,Fragment as a44_0x430e68,jsxs as a44_0x41552b}from'react/jsx-runtime';function a44_0x5d60(){const _0xce88d9=['message','170MFEqJk','doTask','green','log','red','×\x20无法在当前目录创建项目,请检查目录权限','\x20&&\x20lovrabet\x20start','currentVersion','3.\x20','env','*\x20正在拉取\x20API\x20配置...','length','version','配置应用AppCode:\x20','repeat','119542LeBytA','cyan','stableVersion','description','437793NNaIBz','resolve','filter','mcp','cwd','1yRKefv','cursor','readFileSync','info','5844ACkdGB','skill','\x20MCP\x20','success','*\x20清理失败的项目目录:\x20','525816dPpwpb','1116288xUEwrh','W_OK','existsSync','×\x20项目目录\x20','error','1095448FljKYq','projectName','toLocaleString','../..','create','name','\x20已存在,请使用其他项目名','yellow','white','API\x20配置拉取异常','1.\x20','590haKJLf','Claude\x20Code','配置AppCode:\x20','gray','✓\x20Skill\x20安装完成:','×\x20项目名不能为空','rmSync','mcp-','.lovrabetrc','更新\x20package.json\x20失败','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','pullApi','2.\x20','warn','stringify','启动项目:\x20','parse','dirname','√\x20package.json\x20已更新:\x20name=','trim','*\x20正在为项目\x20','API\x20配置拉取失败:\x20','utf8','test','online','\x20\x20•\x20Skill:\x20','×\x20项目名过长,最多支持\x20100\x20个字符','更新\x20package.json\x20name','needsUpgrade','map','1.0.0','selectedIDEs','column','√\x20配置文件已创建,应用AppCode:\x20','skill-','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','项目名称:\x20','\x20Generated\x20by\x20lovrabet\x20cli\x20','string','\x20\x20•\x20MCP\x20服务器:\x20','appCode','488285GvCMrX','清理项目目录失败:\x20','✓\x20MCP\x20服务器配置完成:','Cursor','cd\x20','\x20Skill\x20','🚀\x20接下来:','status','项目创建失败:\x20','writeFileSync','manual','拉取API配置:\x20','lovrabet\x20config\x20set\x20appcode\x20[app-code]','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','package.json','\x20创建配置文件','push','projectCode','ide','\x20√\x20','\x20\x20✗\x20MCP\x20','join','√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','×\x20项目创建失败:\x20','\x20|\x20应用AppCode:\x20','lovrabet\x20api\x20pull'];a44_0x5d60=function(){return _0xce88d9;};return a44_0x5d60();}import a44_0x114825 from'path';import a44_0x5379d5 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp,copySharedSkills,installSkill,createSkillManifest}from'../ai-setup/config.js';function a44_0x4577(_0xda5274,_0x1ba0f9){_0xda5274=_0xda5274-0x67;const _0x5d606c=a44_0x5d60();let _0x4577d8=_0x5d606c[_0xda5274];return _0x4577d8;}import{MCP_IDES}from'../utils/ai_config.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x2a9a6f){const _0x906934=a44_0x4577,[_0x146472,_0x5db085]=useState(![]),[_0xe36d94,_0x35d6cd]=useState(![]),[_0x28737a,_0x21d0d6]=useState(null),[_0xfe05d7,_0x14b7ea]=useState(null),_0x2d7dea=useCopyProjectTemplate(),_0x205ff7=useInstallDependencies(),_0x1704fe=useFormatCode();useEffect(()=>{checkCliVersion()['then'](_0x10bb6a=>{const _0x5bf35e=a44_0x4577;_0x10bb6a[_0x5bf35e(0xbc)]&&(printCliUpgradeWarning(_0x10bb6a),logger[_0x5bf35e(0x89)](_0x5bf35e(0x99),'CLI\x20版本检查',{'currentVersion':_0x10bb6a[_0x5bf35e(0x75)],'stableVersion':_0x10bb6a[_0x5bf35e(0x7f)],'needsUpgrade':_0x10bb6a[_0x5bf35e(0xbc)]}));});},[]);const _0x463cb5=async _0x51e0c1=>{const _0x33053d=a44_0x4577;if(!_0x51e0c1[_0x33053d(0x96)]||_0x51e0c1[_0x33053d(0x96)][_0x33053d(0xb3)]()===''){console[_0x33053d(0x94)](_0x33053d(0xa5));return;}const _0xe0c01a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xe0c01a[_0x33053d(0xb7)](_0x51e0c1[_0x33053d(0x96)])){console[_0x33053d(0x94)](_0x33053d(0xc3));return;}if(_0x51e0c1['projectName'][_0x33053d(0x79)]>0x64){console['error'](_0x33053d(0xba));return;}const _0x531352=a44_0x114825['resolve'](process[_0x33053d(0x85)](),_0x51e0c1['projectName']);if(a44_0x5379d5['existsSync'](_0x531352)){console[_0x33053d(0x94)](_0x33053d(0x93)+_0x51e0c1[_0x33053d(0x96)]+_0x33053d(0x9b));return;}try{const _0x2932f7=a44_0x114825[_0x33053d(0xb1)](_0x531352);a44_0x5379d5['accessSync'](_0x2932f7,a44_0x5379d5['constants'][_0x33053d(0x91)]);}catch(_0x121149){console[_0x33053d(0x94)](_0x33053d(0x73));return;}_0x21d0d6(_0x51e0c1),_0x5db085(!![]),logger['setLogPath'](_0x531352),logger['info'](_0x33053d(0x99),'开始创建项目:\x20'+_0x51e0c1[_0x33053d(0x96)],{'projectDir':_0x531352,'appCode':_0x51e0c1[_0x33053d(0xc8)]});try{await _0x2d7dea[_0x33053d(0x6f)](_0x51e0c1[_0x33053d(0x96)]),await _0x278af5(_0x51e0c1[_0x33053d(0x96)]),await _0x205ff7['doTask'](_0x51e0c1[_0x33053d(0x96)]),await _0x1704fe[_0x33053d(0x6f)](_0x51e0c1[_0x33053d(0x96)]),await _0x5bc9b5(_0x51e0c1[_0x33053d(0x96)],_0x51e0c1[_0x33053d(0xc8)]||'',_0x51e0c1[_0x33053d(0x77)]);if(_0x51e0c1[_0x33053d(0xab)]&&_0x51e0c1[_0x33053d(0xc8)]){console[_0x33053d(0x71)](_0x33053d(0x78));try{const _0x3c6d7e=await pullApiSilent(_0x51e0c1[_0x33053d(0xc8)],undefined,_0x531352,_0x51e0c1[_0x33053d(0x77)]);_0x3c6d7e?(console[_0x33053d(0x71)]('√\x20API\x20配置拉取完成'),logger[_0x33053d(0x89)](_0x33053d(0x99),'API\x20配置拉取成功:\x20'+_0x51e0c1[_0x33053d(0xc8)])):(console[_0x33053d(0x71)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x33053d(0xad)]('create',_0x33053d(0xb5)+_0x51e0c1[_0x33053d(0xc8)]));}catch(_0x3b21a6){console[_0x33053d(0x71)]('!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x33053d(0xad)](_0x33053d(0x99),_0x33053d(0x9e),{'error':_0x3b21a6 instanceof Error?_0x3b21a6[_0x33053d(0x6d)]:String(_0x3b21a6)});}}if(_0x51e0c1['aiSetup']&&_0x51e0c1['selectedIDEs']&&_0x51e0c1[_0x33053d(0xbf)][_0x33053d(0x79)]>0x0&&_0x51e0c1[_0x33053d(0xc8)]){console[_0x33053d(0x71)](_0x33053d(0xaa));const _0x2b3a9a=[],_0x3107b2=[],_0x3fae47=_0x51e0c1[_0x33053d(0xbf)][_0x33053d(0x83)](_0x506e5d=>MCP_IDES['has'](_0x506e5d)),_0x1bda31=_0x51e0c1[_0x33053d(0xbf)];for(const _0x194afc of _0x3fae47){try{const _0x4501c6=await configureMcp(_0x194afc,_0x531352);_0x2b3a9a['push']({'ide':_0x194afc===_0x33053d(0x87)?_0x33053d(0xcc):_0x33053d(0xa1),'status':_0x4501c6['status'],'message':_0x4501c6[_0x33053d(0x6d)]}),console[_0x33053d(0x71)]('\x20\x20'+(_0x4501c6[_0x33053d(0xd0)]===_0x33053d(0x8d)?'✓':_0x4501c6[_0x33053d(0xd0)]===_0x33053d(0xd3)?'⚠️':'✗')+_0x33053d(0x8c)+_0x194afc+':\x20'+_0x4501c6[_0x33053d(0x6d)]);}catch(_0x5309d9){_0x2b3a9a[_0x33053d(0xd9)]({'ide':_0x194afc===_0x33053d(0x87)?_0x33053d(0xcc):_0x33053d(0xa1),'status':_0x33053d(0x94),'message':_0x5309d9 instanceof Error?_0x5309d9['message']:String(_0x5309d9)}),console[_0x33053d(0x71)](_0x33053d(0x67)+_0x194afc+':\x20'+(_0x5309d9 instanceof Error?_0x5309d9['message']:String(_0x5309d9)));}}await copySharedSkills(_0x531352);for(const _0x55f40f of _0x1bda31){try{const _0x5236d5=await installSkill(_0x55f40f,_0x531352);_0x3107b2[_0x33053d(0xd9)]({'ide':_0x5236d5[_0x33053d(0xdb)],'status':_0x5236d5[_0x33053d(0xd0)],'message':_0x5236d5[_0x33053d(0x6d)]}),console[_0x33053d(0x71)]('\x20\x20'+(_0x5236d5[_0x33053d(0xd0)]===_0x33053d(0x8d)?'✓':'✗')+_0x33053d(0xce)+_0x5236d5[_0x33053d(0xdb)]+':\x20'+_0x5236d5[_0x33053d(0x6d)]);}catch(_0x4cb4d5){_0x3107b2[_0x33053d(0xd9)]({'ide':_0x55f40f,'status':'error','message':_0x4cb4d5 instanceof Error?_0x4cb4d5['message']:String(_0x4cb4d5)}),console['log']('\x20\x20✗\x20Skill\x20'+_0x55f40f+':\x20'+(_0x4cb4d5 instanceof Error?_0x4cb4d5[_0x33053d(0x6d)]:String(_0x4cb4d5)));}}if(_0x3107b2[_0x33053d(0x79)]>0x0){const _0xb2972f=_0x3107b2[_0x33053d(0x83)](_0x852bf3=>_0x852bf3[_0x33053d(0xd0)]==='success')['map'](_0x323a9d=>_0x323a9d[_0x33053d(0xdb)]);_0xb2972f[_0x33053d(0x79)]>0x0&&createSkillManifest(_0x531352,_0xb2972f);}_0x14b7ea({'mcp':_0x2b3a9a,'skill':_0x3107b2}),console[_0x33053d(0x71)](_0x33053d(0x69));}logger[_0x33053d(0x8d)]('create','项目创建完成:\x20'+_0x51e0c1['projectName']),_0x35d6cd(!![]),_0x5db085(![]);}catch(_0x4ac13a){logger['error']('create',_0x33053d(0xd1)+_0x51e0c1[_0x33053d(0x96)],{'error':_0x4ac13a instanceof Error?_0x4ac13a[_0x33053d(0x6d)]:String(_0x4ac13a)});try{a44_0x5379d5[_0x33053d(0x92)](_0x531352)&&(console[_0x33053d(0x71)](_0x33053d(0x8e)+_0x531352),a44_0x5379d5[_0x33053d(0xa6)](_0x531352,{'recursive':!![],'force':!![]}));}catch(_0x31abe2){logger[_0x33053d(0xad)](_0x33053d(0x99),_0x33053d(0xca)+_0x531352);}_0x5db085(![]),console[_0x33053d(0x94)](_0x33053d(0x6a)+(_0x4ac13a instanceof Error?_0x4ac13a[_0x33053d(0x6d)]:String(_0x4ac13a)));}},_0x42d63a=async _0x3c5007=>{const _0x35a598=a44_0x4577;await _0x463cb5({'projectName':_0x3c5007,'env':_0x2a9a6f[_0x35a598(0x77)]});},_0x278af5=async _0x57a51b=>{const _0x4f537f=a44_0x4577,_0x48c944=a44_0x114825[_0x4f537f(0x82)](process['cwd'](),_0x57a51b),_0xcfa1dc=a44_0x114825[_0x4f537f(0x68)](_0x48c944,'package.json');try{console[_0x4f537f(0x71)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0xde3e37=fileURLToPath(import.meta.url),_0x1fed6d=a44_0x114825['resolve'](a44_0x114825['dirname'](_0xde3e37),_0x4f537f(0x98)),_0x47ad69=a44_0x114825[_0x4f537f(0x68)](_0x1fed6d,_0x4f537f(0xd7));let _0x522f13=_0x4f537f(0xbe);try{const _0x39be66=JSON[_0x4f537f(0xb0)](a44_0x5379d5[_0x4f537f(0x88)](_0x47ad69,'utf8'));_0x522f13=_0x39be66[_0x4f537f(0x7a)]||_0x4f537f(0xbe);}catch(_0x14021f){}const _0x2eee47=a44_0x5379d5[_0x4f537f(0x88)](_0xcfa1dc,_0x4f537f(0xb6)),_0x29b161=JSON['parse'](_0x2eee47);_0x29b161[_0x4f537f(0x9a)]=_0x57a51b,_0x29b161[_0x4f537f(0x80)]=_0x57a51b+_0x4f537f(0xc5)+_0x522f13,a44_0x5379d5[_0x4f537f(0xd2)](_0xcfa1dc,JSON[_0x4f537f(0xae)](_0x29b161,null,0x2)+'\x0a','utf8'),console[_0x4f537f(0x71)](_0x4f537f(0xb2)+_0x57a51b),logger[_0x4f537f(0x89)](_0x4f537f(0x99),_0x4f537f(0xbb));}catch(_0x1360a3){logger[_0x4f537f(0x94)](_0x4f537f(0x99),_0x4f537f(0xa9));throw _0x1360a3;}},_0x5bc9b5=async(_0x43f591,_0x6712d8,_0x15abbe)=>{const _0x10af85=a44_0x4577,_0x5db5c1=a44_0x114825[_0x10af85(0x82)](process[_0x10af85(0x85)](),_0x43f591),_0x13170b=a44_0x114825[_0x10af85(0x68)](_0x5db5c1,_0x10af85(0xa8));try{_0x6712d8?console[_0x10af85(0x71)](_0x10af85(0xb4)+_0x43f591+'\x20配置应用AppCode:\x20'+_0x6712d8):console[_0x10af85(0x71)]('*\x20正在为项目\x20'+_0x43f591+_0x10af85(0xd8));const _0x535944=fileURLToPath(import.meta.url),_0x285957=a44_0x114825['resolve'](a44_0x114825[_0x10af85(0xb1)](_0x535944),_0x10af85(0x98)),_0x18c3ed=a44_0x114825[_0x10af85(0x68)](_0x285957,_0x10af85(0xd7));let _0x1dbcaa='1.0.0';try{const _0x1f0727=JSON['parse'](a44_0x5379d5[_0x10af85(0x88)](_0x18c3ed,'utf8'));_0x1dbcaa=_0x1f0727[_0x10af85(0x7a)]||_0x10af85(0xbe);}catch(_0x177117){}const _0x19f91c=readConfig(),_0x33eb10=typeof _0x19f91c[_0x10af85(0x77)]===_0x10af85(0xc6)?_0x19f91c[_0x10af85(0x77)]:undefined,{app:_0x570791,appcode:_0x58af66,..._0x56c5e5}=_0x19f91c,_0x35b028={..._0x56c5e5,'appcode':_0x6712d8||'','env':_0x15abbe||_0x33eb10||_0x10af85(0xb8),'createdAt':new Date()[_0x10af85(0x97)](),'version':_0x1dbcaa};a44_0x5379d5[_0x10af85(0xd2)](_0x13170b,JSON['stringify'](_0x35b028,null,0x2),_0x10af85(0xb6)),_0x6712d8?console[_0x10af85(0x71)](_0x10af85(0xc1)+_0x6712d8):console[_0x10af85(0x71)](_0x10af85(0xd6)),logger[_0x10af85(0x89)](_0x10af85(0x99),_0x10af85(0x7b)+_0x6712d8);}catch(_0x647b2d){logger[_0x10af85(0x94)]('create','配置应用AppCode失败');}};useEffect(()=>{const _0x532db4=a44_0x4577;_0x2a9a6f[_0x532db4(0xda)]&&_0x42d63a(_0x2a9a6f[_0x532db4(0xda)]);},[_0x2a9a6f[_0x906934(0xda)]]);if(!_0x146472&&!_0xe36d94&&!_0x2a9a6f[_0x906934(0xda)])return a44_0x38635c(EnhancedGuidedCreate,{'onCreate':_0x463cb5,'env':_0x2a9a6f['env']});if(_0x146472)return a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Box,{'width':'1'}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'\x20√\x20'}),a44_0x38635c(Text,{'children':_0x906934(0xc4)}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x28737a?.[_0x906934(0x96)]}),_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Text,{'children':_0x906934(0x6b)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'children':_0x28737a[_0x906934(0xc8)]})]})]}),a44_0x38635c(TaskRunning,{..._0x2d7dea}),a44_0x38635c(TaskRunning,{..._0x205ff7}),a44_0x38635c(TaskRunning,{..._0x1704fe})]});if(_0xe36d94){const _0x1e9c88=_0xfe05d7&&(_0xfe05d7[_0x906934(0x84)][_0x906934(0x79)]>0x0||_0xfe05d7[_0x906934(0x8b)][_0x906934(0x79)]>0x0);return a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Box,{'width':'1'}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x906934(0xdc)}),a44_0x38635c(Text,{'children':_0x906934(0xc4)}),a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x28737a?.[_0x906934(0x96)]}),_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Text,{'children':_0x906934(0x6b)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'children':_0x28737a[_0x906934(0xc8)]})]})]}),a44_0x38635c(TaskFinished,{..._0x2d7dea}),a44_0x38635c(TaskFinished,{..._0x205ff7}),a44_0x38635c(TaskFinished,{..._0x1704fe}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'─'['repeat'](0x3c)})}),_0x1e9c88&&a44_0x41552b(a44_0x430e68,{'children':[_0xfe05d7[_0x906934(0x84)][_0x906934(0x79)]>0x0&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'marginTop':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'bold':!![],'children':_0x906934(0xcb)})}),_0xfe05d7[_0x906934(0x84)]['map']((_0x930230,_0x13a8c0)=>a44_0x38635c(Box,{'marginLeft':0x2,'children':a44_0x41552b(Text,{'color':_0x930230['status']==='success'?_0x906934(0x9d):_0x930230[_0x906934(0xd0)]==='manual'?_0x906934(0x9c):_0x906934(0x72),'children':[_0x930230['ide'],':\x20',_0x930230[_0x906934(0x6d)]]})},_0x906934(0xa7)+_0x13a8c0))]}),_0xfe05d7[_0x906934(0x8b)][_0x906934(0x79)]>0x0&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'marginTop':_0xfe05d7['mcp'][_0x906934(0x79)]>0x0?0x1:0x0,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'bold':!![],'children':_0x906934(0xa4)})}),_0xfe05d7[_0x906934(0x8b)][_0x906934(0xbd)]((_0x5c3f2d,_0x3d083a)=>a44_0x38635c(Box,{'marginLeft':0x2,'children':a44_0x41552b(Text,{'color':_0x5c3f2d[_0x906934(0xd0)]===_0x906934(0x8d)?'white':_0x906934(0x72),'children':[_0x5c3f2d[_0x906934(0xdb)],':\x20',_0x5c3f2d[_0x906934(0x6d)]]})},_0x906934(0xc2)+_0x3d083a))]}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'─'['repeat'](0x3c)})})]}),a44_0x38635c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcf)})}),a44_0x41552b(Box,{'marginLeft':0x2,'flexDirection':_0x906934(0xc0),'children':[_0x1e9c88?a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x70),'children':_0x906934(0x9f)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xaf)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcd)+_0x28737a?.[_0x906934(0x96)]+_0x906934(0x74)})]}),_0x28737a?.[_0x906934(0xc8)]&&!_0x28737a?.[_0x906934(0xab)]&&a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x9c),'children':_0x906934(0xac)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':'拉取API配置:\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0x6c)})]})]}):a44_0x41552b(a44_0x430e68,{'children':[a44_0x38635c(Box,{'children':a44_0x38635c(Text,{'color':_0x906934(0x9c),'bold':!![],'children':'1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill'})}),a44_0x41552b(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xb9)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20skill\x20install'})]}),a44_0x41552b(Box,{'marginLeft':0x2,'children':[a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xc7)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20mcp\x20install'})]}),a44_0x41552b(Box,{'marginTop':0x1,'children':[a44_0x38635c(Text,{'color':_0x906934(0x70),'children':'2.\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xaf)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xcd)+_0x28737a?.['projectName']+_0x906934(0x74)})]}),_0x28737a?.[_0x906934(0xc8)]&&!_0x28737a?.[_0x906934(0xab)]&&a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0x9c),'children':_0x906934(0x76)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':'拉取API配置:\x20'}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0x6c)})]})]}),!_0x28737a?.[_0x906934(0xc8)]&&a44_0x41552b(a44_0x430e68,{'children':[a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':_0x906934(0xa3),'children':_0x906934(0xac)}),a44_0x38635c(Text,{'color':_0x906934(0x9d),'children':_0x906934(0xa2)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':_0x906934(0xd5)})]}),a44_0x41552b(Box,{'children':[a44_0x38635c(Text,{'color':'gray','children':_0x906934(0x76)}),a44_0x38635c(Text,{'color':'white','children':_0x906934(0xd4)}),a44_0x38635c(Text,{'color':_0x906934(0x7e),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a44_0x38635c(Box,{'marginTop':0x1,'children':a44_0x38635c(Text,{'color':'green','children':'─'[_0x906934(0x7c)](0x3c)})})]});}return null;}