@lovrabet/cli 1.3.2-beta.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 -1
  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
@@ -1 +1 @@
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;}
1
+ (function(_0x556f76,_0x581e98){const _0x48b0d0=a44_0x3c97,_0x18301e=_0x556f76();while(!![]){try{const _0x1d4303=parseInt(_0x48b0d0(0x132))/0x1+parseInt(_0x48b0d0(0x13e))/0x2+-parseInt(_0x48b0d0(0x143))/0x3+-parseInt(_0x48b0d0(0x151))/0x4+-parseInt(_0x48b0d0(0x13d))/0x5*(parseInt(_0x48b0d0(0x17e))/0x6)+-parseInt(_0x48b0d0(0x170))/0x7*(parseInt(_0x48b0d0(0x172))/0x8)+parseInt(_0x48b0d0(0x12f))/0x9;if(_0x1d4303===_0x581e98)break;else _0x18301e['push'](_0x18301e['shift']());}catch(_0x2616ba){_0x18301e['push'](_0x18301e['shift']());}}}(a44_0x4dee,0xeba14));import{jsx as a44_0x47b470,Fragment as a44_0x5e98d8,jsxs as a44_0x28b5d1}from'react/jsx-runtime';import a44_0x2f616d from'path';import a44_0x18f95e from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';function a44_0x3c97(_0x67306f,_0x40e2c3){_0x67306f=_0x67306f-0x112;const _0x4dee99=a44_0x4dee();let _0x3c97c7=_0x4dee99[_0x67306f];return _0x3c97c7;}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';function a44_0x4dee(){const _0x3b1adc=['更新\x20package.json\x20失败','Claude\x20Code','warn','needsUpgrade','map','API\x20配置拉取成功:\x20','../..','push','*\x20清理失败的项目目录:\x20','projectName','配置AppCode:\x20','online','cyan','\x20\x20✗\x20Skill\x20','\x20\x20•\x20Skill:\x20','lovrabet\x20skill\x20install','currentVersion','\x20&&\x20lovrabet\x20start','\x20MCP\x20','√\x20API\x20配置拉取完成','stableVersion','√\x20package.json\x20已更新:\x20name=','description','\x20已存在,请使用其他项目名','21729789eyERoR','yellow','W_OK','1438471qvAIJN','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','cd\x20','CLI\x20版本检查','*\x20正在为项目\x20','name','manual','\x20|\x20应用AppCode:\x20','doTask','gray','create','5777405TEVfhL','3074758YJxbgw','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','\x20Generated\x20by\x20lovrabet\x20cli\x20','toLocaleString','2425569VuJxLu','writeFileSync','cursor','更新\x20package.json\x20name','projectCode','项目创建失败:\x20','trim','开始创建项目:\x20','skill-','utf8','status','log','join','×\x20项目创建失败:\x20','6387236nfIBEH','拉取API配置:\x20','✓\x20MCP\x20服务器配置完成:','API\x20配置拉取失败:\x20','green','×\x20项目名不能为空','启动项目:\x20','version','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','dirname','message','appCode','1.0.0','cwd','selectedIDEs','error','repeat','parse','\x20√\x20','ide','red','mcp','env','2.\x20','√\x20配置文件已创建,应用AppCode:\x20','\x20Skill\x20','skill','white','配置应用AppCode失败','\x20\x20✗\x20MCP\x20','info','42nNxLXE','existsSync','1152424OesSMq','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','lovrabet\x20config\x20set\x20appcode\x20[app-code]','stringify','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','\x20配置应用AppCode:\x20','🚀\x20接下来:','Cursor','then','lovrabet\x20mcp\x20install','length','lovrabet\x20api\x20pull','6YGboiL','resolve','*\x20正在拉取\x20API\x20配置...','×\x20无法在当前目录创建项目,请检查目录权限','readFileSync','package.json','清理项目目录失败:\x20','pullApi','filter','\x20创建配置文件','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','setLogPath','项目名称:\x20','\x20\x20•\x20MCP\x20服务器:\x20','success','3.\x20','×\x20项目名过长,最多支持\x20100\x20个字符','.lovrabetrc'];a44_0x4dee=function(){return _0x3b1adc;};return a44_0x4dee();}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(_0x2c38c8){const _0x1b4b59=a44_0x3c97,[_0x4079cb,_0x5edd57]=useState(![]),[_0x5bc5df,_0x3f332c]=useState(![]),[_0x44113c,_0x2417c1]=useState(null),[_0x585443,_0x53b016]=useState(null),_0x216194=useCopyProjectTemplate(),_0x273e90=useInstallDependencies(),_0x4a4446=useFormatCode();useEffect(()=>{const _0x4b7b33=a44_0x3c97;checkCliVersion()[_0x4b7b33(0x17a)](_0x57e9c6=>{const _0x11fd71=_0x4b7b33;_0x57e9c6[_0x11fd71(0x11a)]&&(printCliUpgradeWarning(_0x57e9c6),logger[_0x11fd71(0x16f)](_0x11fd71(0x13c),_0x11fd71(0x135),{'currentVersion':_0x57e9c6[_0x11fd71(0x127)],'stableVersion':_0x57e9c6[_0x11fd71(0x12b)],'needsUpgrade':_0x57e9c6[_0x11fd71(0x11a)]}));});},[]);const _0xe31ece=async _0x153e74=>{const _0x3d016f=a44_0x3c97;if(!_0x153e74[_0x3d016f(0x120)]||_0x153e74['projectName'][_0x3d016f(0x149)]()===''){console[_0x3d016f(0x160)](_0x3d016f(0x156));return;}const _0x34f591=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x34f591['test'](_0x153e74['projectName'])){console[_0x3d016f(0x160)](_0x3d016f(0x173));return;}if(_0x153e74[_0x3d016f(0x120)][_0x3d016f(0x17c)]>0x64){console[_0x3d016f(0x160)](_0x3d016f(0x115));return;}const _0x4d45a6=a44_0x2f616d[_0x3d016f(0x17f)](process['cwd'](),_0x153e74[_0x3d016f(0x120)]);if(a44_0x18f95e[_0x3d016f(0x171)](_0x4d45a6)){console[_0x3d016f(0x160)]('×\x20项目目录\x20'+_0x153e74[_0x3d016f(0x120)]+_0x3d016f(0x12e));return;}try{const _0x250248=a44_0x2f616d[_0x3d016f(0x15a)](_0x4d45a6);a44_0x18f95e['accessSync'](_0x250248,a44_0x18f95e['constants'][_0x3d016f(0x131)]);}catch(_0x3cb1ba){console['error'](_0x3d016f(0x181));return;}_0x2417c1(_0x153e74),_0x5edd57(!![]),logger[_0x3d016f(0x18a)](_0x4d45a6),logger['info'](_0x3d016f(0x13c),_0x3d016f(0x14a)+_0x153e74[_0x3d016f(0x120)],{'projectDir':_0x4d45a6,'appCode':_0x153e74[_0x3d016f(0x15c)]});try{await _0x216194['doTask'](_0x153e74[_0x3d016f(0x120)]),await _0x13f58d(_0x153e74[_0x3d016f(0x120)]),await _0x273e90[_0x3d016f(0x13a)](_0x153e74[_0x3d016f(0x120)]),await _0x4a4446[_0x3d016f(0x13a)](_0x153e74['projectName']),await _0x3e9432(_0x153e74['projectName'],_0x153e74[_0x3d016f(0x15c)]||'',_0x153e74[_0x3d016f(0x167)]);if(_0x153e74['pullApi']&&_0x153e74['appCode']){console[_0x3d016f(0x14e)](_0x3d016f(0x180));try{const _0x3d4fd4=await pullApiSilent(_0x153e74[_0x3d016f(0x15c)],undefined,_0x4d45a6,_0x153e74[_0x3d016f(0x167)]);_0x3d4fd4?(console[_0x3d016f(0x14e)](_0x3d016f(0x12a)),logger['info']('create',_0x3d016f(0x11c)+_0x153e74[_0x3d016f(0x15c)])):(console['log'](_0x3d016f(0x159)),logger[_0x3d016f(0x119)](_0x3d016f(0x13c),_0x3d016f(0x154)+_0x153e74[_0x3d016f(0x15c)]));}catch(_0x2e45df){console['log'](_0x3d016f(0x188)),logger[_0x3d016f(0x119)](_0x3d016f(0x13c),'API\x20配置拉取异常',{'error':_0x2e45df instanceof Error?_0x2e45df[_0x3d016f(0x15b)]:String(_0x2e45df)});}}if(_0x153e74['aiSetup']&&_0x153e74[_0x3d016f(0x15f)]&&_0x153e74[_0x3d016f(0x15f)][_0x3d016f(0x17c)]>0x0&&_0x153e74['appCode']){console[_0x3d016f(0x14e)](_0x3d016f(0x176));const _0x31db9e=[],_0x242b9d=[],_0x51311a=_0x153e74[_0x3d016f(0x15f)][_0x3d016f(0x186)](_0x201596=>MCP_IDES['has'](_0x201596)),_0xbf32bd=_0x153e74[_0x3d016f(0x15f)];for(const _0x5789b8 of _0x51311a){try{const _0x5ed53f=await configureMcp(_0x5789b8,_0x4d45a6);_0x31db9e[_0x3d016f(0x11e)]({'ide':_0x5789b8===_0x3d016f(0x145)?_0x3d016f(0x179):'Claude\x20Code','status':_0x5ed53f['status'],'message':_0x5ed53f['message']}),console[_0x3d016f(0x14e)]('\x20\x20'+(_0x5ed53f[_0x3d016f(0x14d)]===_0x3d016f(0x113)?'✓':_0x5ed53f[_0x3d016f(0x14d)]===_0x3d016f(0x138)?'⚠️':'✗')+_0x3d016f(0x129)+_0x5789b8+':\x20'+_0x5ed53f[_0x3d016f(0x15b)]);}catch(_0x298156){_0x31db9e['push']({'ide':_0x5789b8===_0x3d016f(0x145)?'Cursor':_0x3d016f(0x118),'status':_0x3d016f(0x160),'message':_0x298156 instanceof Error?_0x298156[_0x3d016f(0x15b)]:String(_0x298156)}),console[_0x3d016f(0x14e)](_0x3d016f(0x16e)+_0x5789b8+':\x20'+(_0x298156 instanceof Error?_0x298156[_0x3d016f(0x15b)]:String(_0x298156)));}}await copySharedSkills(_0x4d45a6);for(const _0x29b629 of _0xbf32bd){try{const _0x5c10d0=await installSkill(_0x29b629,_0x4d45a6);_0x242b9d['push']({'ide':_0x5c10d0[_0x3d016f(0x164)],'status':_0x5c10d0[_0x3d016f(0x14d)],'message':_0x5c10d0[_0x3d016f(0x15b)]}),console[_0x3d016f(0x14e)]('\x20\x20'+(_0x5c10d0[_0x3d016f(0x14d)]===_0x3d016f(0x113)?'✓':'✗')+_0x3d016f(0x16a)+_0x5c10d0[_0x3d016f(0x164)]+':\x20'+_0x5c10d0[_0x3d016f(0x15b)]);}catch(_0xefabf0){_0x242b9d['push']({'ide':_0x29b629,'status':_0x3d016f(0x160),'message':_0xefabf0 instanceof Error?_0xefabf0['message']:String(_0xefabf0)}),console['log'](_0x3d016f(0x124)+_0x29b629+':\x20'+(_0xefabf0 instanceof Error?_0xefabf0[_0x3d016f(0x15b)]:String(_0xefabf0)));}}if(_0x242b9d[_0x3d016f(0x17c)]>0x0){const _0x3e764d=_0x242b9d[_0x3d016f(0x186)](_0x770db9=>_0x770db9[_0x3d016f(0x14d)]===_0x3d016f(0x113))[_0x3d016f(0x11b)](_0x334f4f=>_0x334f4f[_0x3d016f(0x164)]);_0x3e764d[_0x3d016f(0x17c)]>0x0&&createSkillManifest(_0x4d45a6,_0x3e764d);}_0x53b016({'mcp':_0x31db9e,'skill':_0x242b9d}),console[_0x3d016f(0x14e)]('√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成');}logger['success'](_0x3d016f(0x13c),'项目创建完成:\x20'+_0x153e74[_0x3d016f(0x120)]),_0x3f332c(!![]),_0x5edd57(![]);}catch(_0x1d535b){logger['error'](_0x3d016f(0x13c),_0x3d016f(0x148)+_0x153e74[_0x3d016f(0x120)],{'error':_0x1d535b instanceof Error?_0x1d535b['message']:String(_0x1d535b)});try{a44_0x18f95e[_0x3d016f(0x171)](_0x4d45a6)&&(console[_0x3d016f(0x14e)](_0x3d016f(0x11f)+_0x4d45a6),a44_0x18f95e['rmSync'](_0x4d45a6,{'recursive':!![],'force':!![]}));}catch(_0x577955){logger[_0x3d016f(0x119)](_0x3d016f(0x13c),_0x3d016f(0x184)+_0x4d45a6);}_0x5edd57(![]),console[_0x3d016f(0x160)](_0x3d016f(0x150)+(_0x1d535b instanceof Error?_0x1d535b[_0x3d016f(0x15b)]:String(_0x1d535b)));}},_0x5c241a=async _0xb365e9=>{const _0x1667db=a44_0x3c97;await _0xe31ece({'projectName':_0xb365e9,'env':_0x2c38c8[_0x1667db(0x167)]});},_0x13f58d=async _0x1753f3=>{const _0x3860c=a44_0x3c97,_0x1bfa1b=a44_0x2f616d['resolve'](process[_0x3860c(0x15e)](),_0x1753f3),_0x44309b=a44_0x2f616d[_0x3860c(0x14f)](_0x1bfa1b,_0x3860c(0x183));try{console[_0x3860c(0x14e)](_0x3860c(0x189));const _0x172a4e=fileURLToPath(import.meta.url),_0x25de95=a44_0x2f616d['resolve'](a44_0x2f616d['dirname'](_0x172a4e),_0x3860c(0x11d)),_0x14eac9=a44_0x2f616d['join'](_0x25de95,'package.json');let _0x551cf3='1.0.0';try{const _0x3aaaa8=JSON[_0x3860c(0x162)](a44_0x18f95e[_0x3860c(0x182)](_0x14eac9,'utf8'));_0x551cf3=_0x3aaaa8[_0x3860c(0x158)]||_0x3860c(0x15d);}catch(_0x1e7079){}const _0x26fd25=a44_0x18f95e[_0x3860c(0x182)](_0x44309b,'utf8'),_0x14b1d8=JSON[_0x3860c(0x162)](_0x26fd25);_0x14b1d8[_0x3860c(0x137)]=_0x1753f3,_0x14b1d8[_0x3860c(0x12d)]=_0x1753f3+_0x3860c(0x141)+_0x551cf3,a44_0x18f95e[_0x3860c(0x144)](_0x44309b,JSON[_0x3860c(0x175)](_0x14b1d8,null,0x2)+'\x0a',_0x3860c(0x14c)),console[_0x3860c(0x14e)](_0x3860c(0x12c)+_0x1753f3),logger[_0x3860c(0x16f)]('create',_0x3860c(0x146));}catch(_0x3ad5c2){logger['error'](_0x3860c(0x13c),_0x3860c(0x117));throw _0x3ad5c2;}},_0x3e9432=async(_0x2a2646,_0x5c54a0,_0x33a3cf)=>{const _0x25e493=a44_0x3c97,_0x454ba9=a44_0x2f616d['resolve'](process[_0x25e493(0x15e)](),_0x2a2646),_0x1ae573=a44_0x2f616d[_0x25e493(0x14f)](_0x454ba9,_0x25e493(0x116));try{_0x5c54a0?console[_0x25e493(0x14e)]('*\x20正在为项目\x20'+_0x2a2646+_0x25e493(0x177)+_0x5c54a0):console[_0x25e493(0x14e)](_0x25e493(0x136)+_0x2a2646+_0x25e493(0x187));const _0x517044=fileURLToPath(import.meta.url),_0x40a2b0=a44_0x2f616d[_0x25e493(0x17f)](a44_0x2f616d[_0x25e493(0x15a)](_0x517044),_0x25e493(0x11d)),_0x33a33f=a44_0x2f616d[_0x25e493(0x14f)](_0x40a2b0,_0x25e493(0x183));let _0x4a0f5a='1.0.0';try{const _0x327153=JSON['parse'](a44_0x18f95e[_0x25e493(0x182)](_0x33a33f,_0x25e493(0x14c)));_0x4a0f5a=_0x327153[_0x25e493(0x158)]||_0x25e493(0x15d);}catch(_0x3dc150){}const _0x193cd6=readConfig(),_0x1780f4=typeof _0x193cd6[_0x25e493(0x167)]==='string'?_0x193cd6[_0x25e493(0x167)]:undefined,{app:_0x3ff52b,appcode:_0x22d1de,..._0x12778a}=_0x193cd6,_0x45c576={..._0x12778a,'appcode':_0x5c54a0||'','env':_0x33a3cf||_0x1780f4||_0x25e493(0x122),'createdAt':new Date()[_0x25e493(0x142)](),'version':_0x4a0f5a};a44_0x18f95e[_0x25e493(0x144)](_0x1ae573,JSON[_0x25e493(0x175)](_0x45c576,null,0x2),'utf8'),_0x5c54a0?console[_0x25e493(0x14e)](_0x25e493(0x169)+_0x5c54a0):console['log'](_0x25e493(0x140)),logger['info'](_0x25e493(0x13c),'配置应用AppCode:\x20'+_0x5c54a0);}catch(_0x5752e2){logger[_0x25e493(0x160)](_0x25e493(0x13c),_0x25e493(0x16d));}};useEffect(()=>{const _0x2a7ddc=a44_0x3c97;_0x2c38c8[_0x2a7ddc(0x147)]&&_0x5c241a(_0x2c38c8[_0x2a7ddc(0x147)]);},[_0x2c38c8[_0x1b4b59(0x147)]]);if(!_0x4079cb&&!_0x5bc5df&&!_0x2c38c8[_0x1b4b59(0x147)])return a44_0x47b470(EnhancedGuidedCreate,{'onCreate':_0xe31ece,'env':_0x2c38c8['env']});if(_0x4079cb)return a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x28b5d1(Box,{'marginTop':0x1,'children':[a44_0x47b470(Box,{'width':'1'}),a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':'\x20√\x20'}),a44_0x47b470(Text,{'children':_0x1b4b59(0x18b)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':_0x44113c?.['projectName']}),_0x44113c?.['appCode']&&a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x47b470(Text,{'children':_0x1b4b59(0x139)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'children':_0x44113c[_0x1b4b59(0x15c)]})]})]}),a44_0x47b470(TaskRunning,{..._0x216194}),a44_0x47b470(TaskRunning,{..._0x273e90}),a44_0x47b470(TaskRunning,{..._0x4a4446})]});if(_0x5bc5df){const _0x1d883b=_0x585443&&(_0x585443[_0x1b4b59(0x166)][_0x1b4b59(0x17c)]>0x0||_0x585443[_0x1b4b59(0x16b)][_0x1b4b59(0x17c)]>0x0);return a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x28b5d1(Box,{'marginTop':0x1,'children':[a44_0x47b470(Box,{'width':'1'}),a44_0x47b470(Text,{'color':'green','children':_0x1b4b59(0x163)}),a44_0x47b470(Text,{'children':_0x1b4b59(0x18b)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':_0x44113c?.['projectName']}),_0x44113c?.[_0x1b4b59(0x15c)]&&a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x47b470(Text,{'children':_0x1b4b59(0x139)}),a44_0x47b470(Text,{'color':'cyan','children':_0x44113c['appCode']})]})]}),a44_0x47b470(TaskFinished,{..._0x216194}),a44_0x47b470(TaskFinished,{..._0x273e90}),a44_0x47b470(TaskFinished,{..._0x4a4446}),a44_0x47b470(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x47b470(Text,{'color':'green','children':'─'[_0x1b4b59(0x161)](0x3c)})}),_0x1d883b&&a44_0x28b5d1(a44_0x5e98d8,{'children':[_0x585443['mcp'][_0x1b4b59(0x17c)]>0x0&&a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x47b470(Box,{'marginTop':0x1,'children':a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'bold':!![],'children':_0x1b4b59(0x153)})}),_0x585443[_0x1b4b59(0x166)][_0x1b4b59(0x11b)]((_0x4922c2,_0x1e3c50)=>a44_0x47b470(Box,{'marginLeft':0x2,'children':a44_0x28b5d1(Text,{'color':_0x4922c2[_0x1b4b59(0x14d)]===_0x1b4b59(0x113)?_0x1b4b59(0x16c):_0x4922c2[_0x1b4b59(0x14d)]===_0x1b4b59(0x138)?_0x1b4b59(0x130):_0x1b4b59(0x165),'children':[_0x4922c2[_0x1b4b59(0x164)],':\x20',_0x4922c2[_0x1b4b59(0x15b)]]})},'mcp-'+_0x1e3c50))]}),_0x585443['skill']['length']>0x0&&a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x47b470(Box,{'marginTop':_0x585443[_0x1b4b59(0x166)][_0x1b4b59(0x17c)]>0x0?0x1:0x0,'children':a44_0x47b470(Text,{'color':'green','bold':!![],'children':'✓\x20Skill\x20安装完成:'})}),_0x585443['skill']['map']((_0x1ca311,_0x14f59d)=>a44_0x47b470(Box,{'marginLeft':0x2,'children':a44_0x28b5d1(Text,{'color':_0x1ca311[_0x1b4b59(0x14d)]===_0x1b4b59(0x113)?_0x1b4b59(0x16c):'red','children':[_0x1ca311[_0x1b4b59(0x164)],':\x20',_0x1ca311[_0x1b4b59(0x15b)]]})},_0x1b4b59(0x14b)+_0x14f59d))]}),a44_0x47b470(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x47b470(Text,{'color':'green','children':'─'[_0x1b4b59(0x161)](0x3c)})})]}),a44_0x47b470(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'bold':!![],'children':_0x1b4b59(0x178)})}),a44_0x28b5d1(Box,{'marginLeft':0x2,'flexDirection':'column','children':[_0x1d883b?a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x28b5d1(Box,{'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':'1.\x20'}),a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x157)}),a44_0x47b470(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x44113c?.[_0x1b4b59(0x120)]+_0x1b4b59(0x128)})]}),_0x44113c?.[_0x1b4b59(0x15c)]&&!_0x44113c?.[_0x1b4b59(0x185)]&&a44_0x28b5d1(Box,{'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x130),'children':_0x1b4b59(0x168)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x152)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'bold':!![],'children':_0x1b4b59(0x17d)})]})]}):a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x47b470(Box,{'children':a44_0x47b470(Text,{'color':'yellow','bold':!![],'children':_0x1b4b59(0x13f)})}),a44_0x28b5d1(Box,{'marginLeft':0x2,'marginTop':0x1,'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x125)}),a44_0x47b470(Text,{'color':'cyan','bold':!![],'children':_0x1b4b59(0x126)})]}),a44_0x28b5d1(Box,{'marginLeft':0x2,'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x112)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'bold':!![],'children':_0x1b4b59(0x17b)})]}),a44_0x28b5d1(Box,{'marginTop':0x1,'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':_0x1b4b59(0x168)}),a44_0x47b470(Text,{'color':'white','children':'启动项目:\x20'}),a44_0x47b470(Text,{'color':'cyan','bold':!![],'children':_0x1b4b59(0x134)+_0x44113c?.[_0x1b4b59(0x120)]+_0x1b4b59(0x128)})]}),_0x44113c?.[_0x1b4b59(0x15c)]&&!_0x44113c?.[_0x1b4b59(0x185)]&&a44_0x28b5d1(Box,{'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x130),'children':_0x1b4b59(0x114)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x152)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'bold':!![],'children':_0x1b4b59(0x17d)})]})]}),!_0x44113c?.[_0x1b4b59(0x15c)]&&a44_0x28b5d1(a44_0x5e98d8,{'children':[a44_0x28b5d1(Box,{'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x13b),'children':_0x1b4b59(0x168)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x121)}),a44_0x47b470(Text,{'color':'cyan','bold':!![],'children':_0x1b4b59(0x174)})]}),a44_0x28b5d1(Box,{'children':[a44_0x47b470(Text,{'color':_0x1b4b59(0x13b),'children':_0x1b4b59(0x114)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x16c),'children':_0x1b4b59(0x152)}),a44_0x47b470(Text,{'color':_0x1b4b59(0x123),'bold':!![],'children':_0x1b4b59(0x133)})]})]})]}),a44_0x47b470(Box,{'marginTop':0x1,'children':a44_0x47b470(Text,{'color':_0x1b4b59(0x155),'children':'─'[_0x1b4b59(0x161)](0x3c)})})]});}return null;}
@@ -1 +1 @@
1
- (function(_0x1cb5fc,_0x3142cd){const _0x3d47f9=a45_0x4e2b,_0x189f6d=_0x1cb5fc();while(!![]){try{const _0x3864a3=parseInt(_0x3d47f9(0x199))/0x1+-parseInt(_0x3d47f9(0x1a3))/0x2*(-parseInt(_0x3d47f9(0x1bd))/0x3)+parseInt(_0x3d47f9(0x1b6))/0x4*(parseInt(_0x3d47f9(0x1bb))/0x5)+parseInt(_0x3d47f9(0x1a1))/0x6+parseInt(_0x3d47f9(0x198))/0x7*(parseInt(_0x3d47f9(0x19c))/0x8)+-parseInt(_0x3d47f9(0x197))/0x9+-parseInt(_0x3d47f9(0x1a8))/0xa;if(_0x3864a3===_0x3142cd)break;else _0x189f6d['push'](_0x189f6d['shift']());}catch(_0x3dd825){_0x189f6d['push'](_0x189f6d['shift']());}}}(a45_0x31a0,0x8127d));import a45_0x11883d from'path';import{fileURLToPath}from'url';import a45_0x2850ee from'fs/promises';function a45_0x4e2b(_0x435fcd,_0x11405f){_0x435fcd=_0x435fcd-0x18d;const _0x31a0a9=a45_0x31a0();let _0x4e2b15=_0x31a0a9[_0x435fcd];return _0x4e2b15;}import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x528c3d=a45_0x4e2b,_0x246af3=fileURLToPath(import.meta.url),_0x23b363=a45_0x11883d[_0x528c3d(0x1a9)](_0x246af3);return a45_0x11883d[_0x528c3d(0x1b9)](_0x23b363,'../../templates/projects/sub-app-react-demo');}export async function createProjectNonInteractive(_0x12e986,_0x6a246a){const _0x47cbdf=a45_0x4e2b,_0x4c1cba=await checkCliVersion();_0x4c1cba[_0x47cbdf(0x1af)]&&printCliUpgradeWarning(_0x4c1cba);(!_0x12e986||_0x12e986['trim']()==='')&&(console[_0x47cbdf(0x1ab)](_0x47cbdf(0x1a6)),process[_0x47cbdf(0x191)](0x1));const _0x463761=/[<>:"|?*\x00-\x1f\x7f]/;_0x463761[_0x47cbdf(0x196)](_0x12e986)&&(console[_0x47cbdf(0x1ab)](_0x47cbdf(0x192)),process[_0x47cbdf(0x191)](0x1));_0x12e986[_0x47cbdf(0x1aa)]>0x64&&(console[_0x47cbdf(0x1ab)](_0x47cbdf(0x1a0)),process['exit'](0x1));const _0x789da8=a45_0x11883d[_0x47cbdf(0x1b9)](process[_0x47cbdf(0x1a2)](),_0x12e986);existsSync(_0x789da8)&&(console[_0x47cbdf(0x1ab)](_0x47cbdf(0x19a)+_0x12e986+_0x47cbdf(0x1b0)),process[_0x47cbdf(0x191)](0x1));try{const _0x975c36=a45_0x11883d[_0x47cbdf(0x1a9)](_0x789da8);await a45_0x2850ee['access'](_0x975c36,a45_0x2850ee[_0x47cbdf(0x1a7)][_0x47cbdf(0x1c2)]);}catch(_0x5d5cd2){console[_0x47cbdf(0x1ab)](_0x47cbdf(0x19d)),process[_0x47cbdf(0x191)](0x1);}try{console[_0x47cbdf(0x1b1)](_0x47cbdf(0x18f)+_0x12e986+_0x47cbdf(0x193));const _0x523a01=getTemplateDir();await copyDirectory(_0x523a01,_0x789da8),console[_0x47cbdf(0x1b1)]('\x20\x20√\x20项目模板已创建'),await updatePackageJsonName(_0x12e986),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x19e)),console['log'](_0x47cbdf(0x1be)),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x1ba)),await formatCode(_0x789da8),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x1b4)),await configureAppEnv(_0x12e986,_0x6a246a),console[_0x47cbdf(0x1b1)]('\x20\x20√\x20环境配置完成'),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x195)+_0x12e986+_0x47cbdf(0x1ad)),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x18e)+_0x12e986),console[_0x47cbdf(0x1b1)](_0x47cbdf(0x19b));}catch(_0xde17a7){const _0x20d5fb=_0xde17a7 instanceof Error?_0xde17a7[_0x47cbdf(0x1b5)]:String(_0xde17a7);try{existsSync(_0x789da8)&&await a45_0x2850ee['rm'](_0x789da8,{'recursive':!![],'force':!![]});}catch{}console['error']('×\x20项目创建失败:\x20'+_0x20d5fb),process[_0x47cbdf(0x191)](0x1);}}async function updatePackageJsonName(_0x246ce0){const _0x4c893b=a45_0x4e2b,_0x281266=a45_0x11883d[_0x4c893b(0x1b9)](process[_0x4c893b(0x1a2)](),_0x246ce0),_0x4e805b=a45_0x11883d[_0x4c893b(0x1a5)](_0x281266,_0x4c893b(0x1a4)),_0x1b8f95=await a45_0x2850ee['readFile'](_0x4e805b,'utf-8'),_0xf90eee=JSON[_0x4c893b(0x1b2)](_0x1b8f95);_0xf90eee[_0x4c893b(0x1bf)]=_0x246ce0,_0xf90eee[_0x4c893b(0x1b7)]=_0x4c893b(0x194),await a45_0x2850ee['writeFile'](_0x4e805b,JSON[_0x4c893b(0x1bc)](_0xf90eee,null,0x2)+'\x0a');}async function installDependencies(_0x455e37){const _0x272293=a45_0x4e2b,_0x55692d=detectPackageManager(),_0x388b9f=_0x55692d+_0x272293(0x19f);try{await execAsync(_0x388b9f,{'cwd':_0x455e37});}catch(_0x29cb01){throw new Error('依赖安装失败:\x20'+_0x29cb01);}}function detectPackageManager(){const _0xd48597=a45_0x4e2b;try{return execAsync(_0xd48597(0x190),{}),_0xd48597(0x1ac);}catch{return _0xd48597(0x1b3);}}async function formatCode(_0x252c7a){const _0x5ea6a9=a45_0x4e2b;try{await execAsync(_0x5ea6a9(0x1b8),{'cwd':_0x252c7a});}catch{}}async function configureAppEnv(_0x43592d,_0x517cff){const _0x32ba89=a45_0x4e2b,_0x3d625d=a45_0x11883d['resolve'](process[_0x32ba89(0x1a2)](),_0x43592d),_0x4c16ea=a45_0x11883d[_0x32ba89(0x1a5)](_0x3d625d,_0x32ba89(0x1c1));let _0x284c73={};if(existsSync(_0x4c16ea)){const _0x3610d0=await a45_0x2850ee[_0x32ba89(0x18d)](_0x4c16ea,'utf-8');_0x284c73=JSON[_0x32ba89(0x1b2)](_0x3610d0);}_0x517cff&&(_0x284c73[_0x32ba89(0x1ae)]=_0x517cff),await a45_0x2850ee[_0x32ba89(0x1c0)](_0x4c16ea,JSON[_0x32ba89(0x1bc)](_0x284c73,null,0x2)+'\x0a');}function a45_0x31a0(){const _0x1a52f1=['×\x20项目名过长,最多支持\x20100\x20个字符','3159576xEjCtu','cwd','3324QEheKD','package.json','join','×\x20项目名不能为空','constants','21152350SqIcUM','dirname','length','error','bun','\x20创建成功!','env','needsUpgrade','\x20已存在,请使用其他项目名','log','parse','npm','\x20\x20√\x20代码已格式化','message','4ztcEor','description','bun\x20run\x20format','resolve','\x20\x20√\x20依赖安装跳过(非交互模式)','4882505NjsCWg','stringify','111OABJDb','\x20\x20正在安装依赖...','name','writeFile','lovrabet.config.json','W_OK','readFile','\x0a\x20\x20cd\x20','*\x20正在创建项目\x20','bun\x20--version','exit','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','...','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x0a√\x20项目\x20','test','2736783sQOQfp','1687RWvirL','612311VzMAoK','×\x20项目目录\x20','\x20\x20lovrabet\x20start\x0a','25608KVpyuB','×\x20无法在当前目录创建项目,请检查目录权限','\x20\x20√\x20package.json\x20已更新','\x20install'];a45_0x31a0=function(){return _0x1a52f1;};return a45_0x31a0();}
1
+ (function(_0x23bb9b,_0x1dcdd3){const _0x2d5b1d=a45_0xce4b,_0x1ef077=_0x23bb9b();while(!![]){try{const _0x45f7d6=parseInt(_0x2d5b1d(0x119))/0x1+parseInt(_0x2d5b1d(0x113))/0x2*(parseInt(_0x2d5b1d(0x126))/0x3)+parseInt(_0x2d5b1d(0x124))/0x4*(-parseInt(_0x2d5b1d(0x133))/0x5)+parseInt(_0x2d5b1d(0x115))/0x6+-parseInt(_0x2d5b1d(0x116))/0x7+-parseInt(_0x2d5b1d(0x117))/0x8+parseInt(_0x2d5b1d(0x131))/0x9;if(_0x45f7d6===_0x1dcdd3)break;else _0x1ef077['push'](_0x1ef077['shift']());}catch(_0x54ebc7){_0x1ef077['push'](_0x1ef077['shift']());}}}(a45_0x199a,0xccadb));import a45_0x4859b0 from'path';function a45_0xce4b(_0x29e192,_0x26cc6a){_0x29e192=_0x29e192-0x103;const _0x199ad7=a45_0x199a();let _0xce4b58=_0x199ad7[_0x29e192];return _0xce4b58;}import{fileURLToPath}from'url';import a45_0x122170 from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a45_0x199a(){const _0x4957a6=['×\x20项目名不能为空','join','W_OK','1419508TFNKBY','\x20\x20正在安装依赖...','249nJnfrj','\x0a√\x20项目\x20','\x20\x20√\x20代码已格式化','length','\x20\x20√\x20依赖安装跳过(非交互模式)','\x20\x20lovrabet\x20start\x0a','×\x20项目目录\x20','readFile','needsUpgrade','access','resolve','14677587GKMGec','lovrabet.config.json','5NYrINt','log','error','stringify','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','\x20\x20√\x20项目模板已创建','description','dirname','cwd','package.json','exit','bun','test','npm','bun\x20--version','\x0a\x20\x20cd\x20','parse','writeFile','22112uqotVi','../../templates/projects/sub-app-react-demo','3040650OXYKVD','8520904Qxiese','10079440bGHGXA','\x20\x20√\x20环境配置完成','615176SHfIiO','\x20\x20√\x20package.json\x20已更新','trim','\x20创建成功!','constants','env','×\x20项目创建失败:\x20','message'];a45_0x199a=function(){return _0x4957a6;};return a45_0x199a();}const execAsync=promisify(exec);function getTemplateDir(){const _0x927f35=a45_0xce4b,_0x409f4b=fileURLToPath(import.meta.url),_0x5dd3ad=a45_0x4859b0['dirname'](_0x409f4b);return a45_0x4859b0['resolve'](_0x5dd3ad,_0x927f35(0x114));}export async function createProjectNonInteractive(_0x306dd8,_0xc10da1){const _0x27fe3d=a45_0xce4b,_0x3c13e9=await checkCliVersion();_0x3c13e9[_0x27fe3d(0x12e)]&&printCliUpgradeWarning(_0x3c13e9);(!_0x306dd8||_0x306dd8[_0x27fe3d(0x11b)]()==='')&&(console['error'](_0x27fe3d(0x121)),process[_0x27fe3d(0x10b)](0x1));const _0x1102b1=/[<>:"|?*\x00-\x1f\x7f]/;_0x1102b1[_0x27fe3d(0x10d)](_0x306dd8)&&(console[_0x27fe3d(0x135)](_0x27fe3d(0x105)),process['exit'](0x1));_0x306dd8[_0x27fe3d(0x129)]>0x64&&(console['error']('×\x20项目名过长,最多支持\x20100\x20个字符'),process[_0x27fe3d(0x10b)](0x1));const _0x443f6f=a45_0x4859b0[_0x27fe3d(0x130)](process[_0x27fe3d(0x109)](),_0x306dd8);existsSync(_0x443f6f)&&(console[_0x27fe3d(0x135)](_0x27fe3d(0x12c)+_0x306dd8+'\x20已存在,请使用其他项目名'),process[_0x27fe3d(0x10b)](0x1));try{const _0xf38548=a45_0x4859b0[_0x27fe3d(0x108)](_0x443f6f);await a45_0x122170[_0x27fe3d(0x12f)](_0xf38548,a45_0x122170[_0x27fe3d(0x11d)][_0x27fe3d(0x123)]);}catch(_0xeeddfa){console[_0x27fe3d(0x135)]('×\x20无法在当前目录创建项目,请检查目录权限'),process[_0x27fe3d(0x10b)](0x1);}try{console[_0x27fe3d(0x134)]('*\x20正在创建项目\x20'+_0x306dd8+'...');const _0x25f01c=getTemplateDir();await copyDirectory(_0x25f01c,_0x443f6f),console[_0x27fe3d(0x134)](_0x27fe3d(0x106)),await updatePackageJsonName(_0x306dd8),console['log'](_0x27fe3d(0x11a)),console[_0x27fe3d(0x134)](_0x27fe3d(0x125)),console[_0x27fe3d(0x134)](_0x27fe3d(0x12a)),await formatCode(_0x443f6f),console[_0x27fe3d(0x134)](_0x27fe3d(0x128)),await configureAppEnv(_0x306dd8,_0xc10da1),console[_0x27fe3d(0x134)](_0x27fe3d(0x118)),console['log'](_0x27fe3d(0x127)+_0x306dd8+_0x27fe3d(0x11c)),console[_0x27fe3d(0x134)](_0x27fe3d(0x110)+_0x306dd8),console[_0x27fe3d(0x134)](_0x27fe3d(0x12b));}catch(_0x1a0902){const _0x38c9e5=_0x1a0902 instanceof Error?_0x1a0902[_0x27fe3d(0x120)]:String(_0x1a0902);try{existsSync(_0x443f6f)&&await a45_0x122170['rm'](_0x443f6f,{'recursive':!![],'force':!![]});}catch{}console['error'](_0x27fe3d(0x11f)+_0x38c9e5),process[_0x27fe3d(0x10b)](0x1);}}async function updatePackageJsonName(_0x3470cd){const _0x16922e=a45_0xce4b,_0x7b7abd=a45_0x4859b0['resolve'](process['cwd'](),_0x3470cd),_0x345ca7=a45_0x4859b0['join'](_0x7b7abd,_0x16922e(0x10a)),_0x2e277b=await a45_0x122170[_0x16922e(0x12d)](_0x345ca7,'utf-8'),_0x54242f=JSON[_0x16922e(0x111)](_0x2e277b);_0x54242f['name']=_0x3470cd,_0x54242f[_0x16922e(0x107)]=_0x16922e(0x104),await a45_0x122170[_0x16922e(0x112)](_0x345ca7,JSON[_0x16922e(0x103)](_0x54242f,null,0x2)+'\x0a');}async function installDependencies(_0x8b1d26){const _0x88f7a0=detectPackageManager(),_0x41371c=_0x88f7a0+'\x20install';try{await execAsync(_0x41371c,{'cwd':_0x8b1d26});}catch(_0x29469d){throw new Error('依赖安装失败:\x20'+_0x29469d);}}function detectPackageManager(){const _0x38ae6a=a45_0xce4b;try{return execAsync(_0x38ae6a(0x10f),{}),_0x38ae6a(0x10c);}catch{return _0x38ae6a(0x10e);}}async function formatCode(_0x5253c0){try{await execAsync('bun\x20run\x20format',{'cwd':_0x5253c0});}catch{}}async function configureAppEnv(_0xea5aad,_0xbc7221){const _0x5a394a=a45_0xce4b,_0xbe5dba=a45_0x4859b0[_0x5a394a(0x130)](process[_0x5a394a(0x109)](),_0xea5aad),_0x5938fc=a45_0x4859b0[_0x5a394a(0x122)](_0xbe5dba,_0x5a394a(0x132));let _0x318e82={};if(existsSync(_0x5938fc)){const _0x343075=await a45_0x122170[_0x5a394a(0x12d)](_0x5938fc,'utf-8');_0x318e82=JSON[_0x5a394a(0x111)](_0x343075);}_0xbc7221&&(_0x318e82[_0x5a394a(0x11e)]=_0xbc7221),await a45_0x122170[_0x5a394a(0x112)](_0x5938fc,JSON[_0x5a394a(0x103)](_0x318e82,null,0x2)+'\x0a');}
@@ -1 +1 @@
1
- (function(_0x42f73e,_0x2176b9){var _0x581601=a46_0x34d8,_0x5c9019=_0x42f73e();while(!![]){try{var _0x530a61=parseInt(_0x581601(0xa6))/0x1+-parseInt(_0x581601(0xa5))/0x2*(parseInt(_0x581601(0xa2))/0x3)+parseInt(_0x581601(0xa4))/0x4+parseInt(_0x581601(0xa9))/0x5*(-parseInt(_0x581601(0xa7))/0x6)+-parseInt(_0x581601(0x9c))/0x7*(parseInt(_0x581601(0xa0))/0x8)+parseInt(_0x581601(0x9f))/0x9*(parseInt(_0x581601(0xa3))/0xa)+parseInt(_0x581601(0x9e))/0xb;if(_0x530a61===_0x2176b9)break;else _0x5c9019['push'](_0x5c9019['shift']());}catch(_0x3e77ea){_0x5c9019['push'](_0x5c9019['shift']());}}}(a46_0x4dbe,0xe9de3));import{jsx as a46_0x29f619,jsxs as a46_0x27c3df}from'react/jsx-runtime';function a46_0x34d8(_0x140db5,_0x587275){_0x140db5=_0x140db5-0x9c;var _0x4dbe67=a46_0x4dbe();var _0x34d82c=_0x4dbe67[_0x140db5];return _0x34d82c;}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x322603){var _0x48a087=a46_0x34d8;return a46_0x27c3df(Box,{'children':[a46_0x29f619(Box,{'width':'1'}),a46_0x29f619(Text,{'color':_0x48a087(0xa8),'children':_0x48a087(0xa1)}),a46_0x29f619(Text,{'children':_0x322603[_0x48a087(0x9d)]}),a46_0x29f619(TaskTime,{'elapsed':_0x322603['elapsed']})]});}function a46_0x4dbe(){var _0x2213e4=['4679616CpjzGC','2tVpVJo','419322xqcrAu','898998IcxncG','green','5ypPCaT','1183tJhNbW','taskName','6625894loagBl','268389lTWGAl','7496hKrjFs','\x20√\x20','4207821PzRReX','160BYTSkW'];a46_0x4dbe=function(){return _0x2213e4;};return a46_0x4dbe();}
1
+ (function(_0x401941,_0x4a47a8){var _0x30ea6c=a46_0x239b,_0x43a263=_0x401941();while(!![]){try{var _0x1b078b=-parseInt(_0x30ea6c(0x1d6))/0x1+parseInt(_0x30ea6c(0x1da))/0x2*(-parseInt(_0x30ea6c(0x1d7))/0x3)+-parseInt(_0x30ea6c(0x1db))/0x4*(-parseInt(_0x30ea6c(0x1dc))/0x5)+-parseInt(_0x30ea6c(0x1d9))/0x6*(-parseInt(_0x30ea6c(0x1d3))/0x7)+-parseInt(_0x30ea6c(0x1d5))/0x8+parseInt(_0x30ea6c(0x1dd))/0x9*(parseInt(_0x30ea6c(0x1de))/0xa)+parseInt(_0x30ea6c(0x1d8))/0xb;if(_0x1b078b===_0x4a47a8)break;else _0x43a263['push'](_0x43a263['shift']());}catch(_0x41eaac){_0x43a263['push'](_0x43a263['shift']());}}}(a46_0x43b7,0x4e147));function a46_0x43b7(){var _0x238c1a=['568675fMsooZ','45174xZIDpB','11930963GpTnsz','6klqitv','78eLGqno','8yrJmBW','255545GFjciK','614682lVNhhL','60fZwvJg','taskName','19264TeEqVC','elapsed','989112BKcMfm'];a46_0x43b7=function(){return _0x238c1a;};return a46_0x43b7();}function a46_0x239b(_0x5d7104,_0xc54cd){_0x5d7104=_0x5d7104-0x1d3;var _0x43b7c5=a46_0x43b7();var _0x239ba9=_0x43b7c5[_0x5d7104];return _0x239ba9;}import{jsx as a46_0x251b1b,jsxs as a46_0x445dcf}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x3a7f86){var _0x3de75a=a46_0x239b;return a46_0x445dcf(Box,{'children':[a46_0x251b1b(Box,{'width':'1'}),a46_0x251b1b(Text,{'color':'green','children':'\x20√\x20'}),a46_0x251b1b(Text,{'children':_0x3a7f86[_0x3de75a(0x1df)]}),a46_0x251b1b(TaskTime,{'elapsed':_0x3a7f86[_0x3de75a(0x1d4)]})]});}
@@ -1 +1 @@
1
- (function(_0x27b535,_0x51555c){var _0x34bf49=a47_0x212d,_0x55f224=_0x27b535();while(!![]){try{var _0x17579b=parseInt(_0x34bf49(0x81))/0x1*(-parseInt(_0x34bf49(0x87))/0x2)+-parseInt(_0x34bf49(0x85))/0x3+-parseInt(_0x34bf49(0x82))/0x4+parseInt(_0x34bf49(0x7c))/0x5*(-parseInt(_0x34bf49(0x89))/0x6)+-parseInt(_0x34bf49(0x88))/0x7*(parseInt(_0x34bf49(0x80))/0x8)+-parseInt(_0x34bf49(0x84))/0x9+parseInt(_0x34bf49(0x83))/0xa*(parseInt(_0x34bf49(0x7e))/0xb);if(_0x17579b===_0x51555c)break;else _0x55f224['push'](_0x55f224['shift']());}catch(_0x59ab22){_0x55f224['push'](_0x55f224['shift']());}}}(a47_0x1b37,0xd5ea1));import{jsx as a47_0x5ccd30,jsxs as a47_0x30bf69}from'react/jsx-runtime';import{Text}from'ink';import a47_0x18db96 from'ink-spinner';function a47_0x212d(_0x5a556e,_0x39ceac){_0x5a556e=_0x5a556e-0x7c;var _0x1b37b6=a47_0x1b37();var _0x212d9f=_0x1b37b6[_0x5a556e];return _0x212d9f;}export function TaskLoading(_0x66c260){var _0x17a5e8=a47_0x212d;if(_0x66c260[_0x17a5e8(0x8b)])return a47_0x5ccd30(Text,{'color':'green','children':_0x17a5e8(0x7f)});if(_0x66c260[_0x17a5e8(0x7d)])return a47_0x30bf69(Text,{'color':_0x17a5e8(0x86),'children':['\x20',a47_0x5ccd30(a47_0x18db96,{'type':'dots'}),'\x20']});return a47_0x5ccd30(Text,{'children':_0x17a5e8(0x8a)});}function a47_0x1b37(){var _0x2f7a11=['91690yJcAsR','4815603rHPXsv','3035343UbGYpo','green','18344CgUhZT','1561399QpxcOw','408XFGaMh','\x20\x20\x20','finished','116365kfsdPE','loading','5379kJZaMz','\x20√\x20','8UzzdHd','2xFHJTn','946540dSblxq'];a47_0x1b37=function(){return _0x2f7a11;};return a47_0x1b37();}
1
+ function a47_0x414f(_0x56961b,_0x19278a){_0x56961b=_0x56961b-0x17d;var _0x1eb982=a47_0x1eb9();var _0x414f0b=_0x1eb982[_0x56961b];return _0x414f0b;}function a47_0x1eb9(){var _0x5dba18=['58976qGGbaI','62757pSdmml','889504VrTwVe','10947699fdyVaB','6416934gAHOwq','\x20√\x20','12mjrNmK','464410nijBpk','green','loading','dots','4384qbiqYe','1515995RRAxOb'];a47_0x1eb9=function(){return _0x5dba18;};return a47_0x1eb9();}(function(_0x3f8c0e,_0x146754){var _0x58596c=a47_0x414f,_0x5136a7=_0x3f8c0e();while(!![]){try{var _0x263db0=-parseInt(_0x58596c(0x184))/0x1+-parseInt(_0x58596c(0x189))/0x2*(-parseInt(_0x58596c(0x188))/0x3)+-parseInt(_0x58596c(0x182))/0x4+-parseInt(_0x58596c(0x181))/0x5+-parseInt(_0x58596c(0x186))/0x6+-parseInt(_0x58596c(0x185))/0x7+-parseInt(_0x58596c(0x180))/0x8*(-parseInt(_0x58596c(0x183))/0x9);if(_0x263db0===_0x146754)break;else _0x5136a7['push'](_0x5136a7['shift']());}catch(_0x3b2294){_0x5136a7['push'](_0x5136a7['shift']());}}}(a47_0x1eb9,0xddf4b));import{jsx as a47_0x1f3338,jsxs as a47_0x1ac878}from'react/jsx-runtime';import{Text}from'ink';import a47_0x25bbae from'ink-spinner';export function TaskLoading(_0x59eccf){var _0x17a058=a47_0x414f;if(_0x59eccf['finished'])return a47_0x1f3338(Text,{'color':_0x17a058(0x17d),'children':_0x17a058(0x187)});if(_0x59eccf[_0x17a058(0x17e)])return a47_0x1ac878(Text,{'color':'green','children':['\x20',a47_0x1f3338(a47_0x25bbae,{'type':_0x17a058(0x17f)}),'\x20']});return a47_0x1f3338(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- (function(_0x558d42,_0x490ccb){var _0x1bc379=a48_0x2133,_0x38f034=_0x558d42();while(!![]){try{var _0x28528b=parseInt(_0x1bc379(0x14d))/0x1*(-parseInt(_0x1bc379(0x155))/0x2)+-parseInt(_0x1bc379(0x14c))/0x3*(parseInt(_0x1bc379(0x150))/0x4)+-parseInt(_0x1bc379(0x149))/0x5*(-parseInt(_0x1bc379(0x151))/0x6)+-parseInt(_0x1bc379(0x14b))/0x7*(parseInt(_0x1bc379(0x146))/0x8)+-parseInt(_0x1bc379(0x14e))/0x9*(-parseInt(_0x1bc379(0x154))/0xa)+parseInt(_0x1bc379(0x14f))/0xb*(-parseInt(_0x1bc379(0x147))/0xc)+-parseInt(_0x1bc379(0x153))/0xd*(-parseInt(_0x1bc379(0x14a))/0xe);if(_0x28528b===_0x490ccb)break;else _0x38f034['push'](_0x38f034['shift']());}catch(_0x434e3c){_0x38f034['push'](_0x38f034['shift']());}}}(a48_0x5dea,0x2ffc6));import{jsx as a48_0x360db4,jsxs as a48_0x5358e4}from'react/jsx-runtime';function a48_0x2133(_0x36ba3e,_0x5cf80d){_0x36ba3e=_0x36ba3e-0x146;var _0x5dea0c=a48_0x5dea();var _0x21336a=_0x5dea0c[_0x36ba3e];return _0x21336a;}function a48_0x5dea(){var _0x1953bf=['elapsed','860240DIyPJm','7737996TbJjST','238fEWfFq','551505deCjrp','235259QQiuZZ','135YHdpHm','29777oIFexA','4kYWhoV','6ZAqwgX','taskName','13JnmKcp','143830pIKNmZ','2xajShC','26120IAZaSy','948gYREjr'];a48_0x5dea=function(){return _0x1953bf;};return a48_0x5dea();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x21396a){var _0x2334cd=a48_0x2133;return a48_0x5358e4(Box,{'children':[a48_0x360db4(Box,{'width':'1'}),a48_0x360db4(TaskLoading,{..._0x21396a}),a48_0x360db4(Text,{'children':_0x21396a[_0x2334cd(0x152)]}),a48_0x360db4(TaskTime,{'elapsed':_0x21396a[_0x2334cd(0x148)]})]});}
1
+ (function(_0x158d23,_0x599dae){var _0x2a0f18=a48_0x3122,_0x31cd3a=_0x158d23();while(!![]){try{var _0x416e8c=parseInt(_0x2a0f18(0x19b))/0x1+-parseInt(_0x2a0f18(0x1a3))/0x2+-parseInt(_0x2a0f18(0x1a1))/0x3*(parseInt(_0x2a0f18(0x19e))/0x4)+-parseInt(_0x2a0f18(0x1a2))/0x5*(-parseInt(_0x2a0f18(0x19a))/0x6)+parseInt(_0x2a0f18(0x199))/0x7+parseInt(_0x2a0f18(0x19f))/0x8*(-parseInt(_0x2a0f18(0x1a0))/0x9)+parseInt(_0x2a0f18(0x19c))/0xa;if(_0x416e8c===_0x599dae)break;else _0x31cd3a['push'](_0x31cd3a['shift']());}catch(_0x102622){_0x31cd3a['push'](_0x31cd3a['shift']());}}}(a48_0xeb3a,0x92684));function a48_0xeb3a(){var _0xf7a5c9=['5176311EYkLuL','6QAXRdn','900829srZjet','6071430IqJarG','taskName','1722652HQLqLb','60184bSjWMm','1017zrwaRF','3yRThYs','925655lkjYAP','1104260PRvRTW'];a48_0xeb3a=function(){return _0xf7a5c9;};return a48_0xeb3a();}import{jsx as a48_0x58564c,jsxs as a48_0x45d702}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a48_0x3122(_0x3cda09,_0x30bd62){_0x3cda09=_0x3cda09-0x199;var _0xeb3a08=a48_0xeb3a();var _0x312217=_0xeb3a08[_0x3cda09];return _0x312217;}import{TaskTime}from'./task-time.js';export function TaskRunning(_0xbb52c9){var _0x2176e8=a48_0x3122;return a48_0x45d702(Box,{'children':[a48_0x58564c(Box,{'width':'1'}),a48_0x58564c(TaskLoading,{..._0xbb52c9}),a48_0x58564c(Text,{'children':_0xbb52c9[_0x2176e8(0x19d)]}),a48_0x58564c(TaskTime,{'elapsed':_0xbb52c9['elapsed']})]});}
@@ -1 +1 @@
1
- (function(_0x5bc5cc,_0x1d8b72){var _0x383f60=a49_0x5419,_0x6a7caa=_0x5bc5cc();while(!![]){try{var _0x113959=-parseInt(_0x383f60(0x10a))/0x1+-parseInt(_0x383f60(0x10e))/0x2*(parseInt(_0x383f60(0x110))/0x3)+parseInt(_0x383f60(0x10d))/0x4+-parseInt(_0x383f60(0x111))/0x5*(parseInt(_0x383f60(0x10b))/0x6)+-parseInt(_0x383f60(0x10f))/0x7+parseInt(_0x383f60(0x108))/0x8+-parseInt(_0x383f60(0x112))/0x9*(-parseInt(_0x383f60(0x109))/0xa);if(_0x113959===_0x1d8b72)break;else _0x6a7caa['push'](_0x6a7caa['shift']());}catch(_0x8990e6){_0x6a7caa['push'](_0x6a7caa['shift']());}}}(a49_0x3c2f,0xb8719));import{jsx as a49_0x4a3b6a,Fragment as a49_0x382d75,jsxs as a49_0x5445d7}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x332bc1){var _0x4924d1=a49_0x5419;if(_0x332bc1[_0x4924d1(0x10c)])return a49_0x5445d7(a49_0x382d75,{'children':[a49_0x4a3b6a(Text,{'color':'gray','children':'\x20['}),a49_0x4a3b6a(Text,{'color':'gray','bold':!![],'children':_0x332bc1[_0x4924d1(0x10c)]}),a49_0x4a3b6a(Text,{'color':_0x4924d1(0x113),'children':']'})]});return null;}function a49_0x5419(_0x710bf4,_0x30c835){_0x710bf4=_0x710bf4-0x108;var _0x3c2fb1=a49_0x3c2f();var _0x5419be=_0x3c2fb1[_0x710bf4];return _0x5419be;}function a49_0x3c2f(){var _0xe074a9=['elapsed','3563300UwOEHR','65778KxrTDP','4949441htWCIK','57ALCdbA','44510vqNvbp','9ACStCA','gray','88736VjsKzc','27590540OliSrW','1368790OPWWSw','138yeCLWN'];a49_0x3c2f=function(){return _0xe074a9;};return a49_0x3c2f();}
1
+ (function(_0x11ad80,_0x2fd3ed){var _0x16270e=a49_0x3c95,_0x237046=_0x11ad80();while(!![]){try{var _0xbbd5a6=-parseInt(_0x16270e(0x101))/0x1*(-parseInt(_0x16270e(0xfa))/0x2)+-parseInt(_0x16270e(0xfc))/0x3*(parseInt(_0x16270e(0xfe))/0x4)+-parseInt(_0x16270e(0xff))/0x5+-parseInt(_0x16270e(0xf9))/0x6+-parseInt(_0x16270e(0x102))/0x7+parseInt(_0x16270e(0x100))/0x8+-parseInt(_0x16270e(0xfb))/0x9*(-parseInt(_0x16270e(0x103))/0xa);if(_0xbbd5a6===_0x2fd3ed)break;else _0x237046['push'](_0x237046['shift']());}catch(_0x95d08d){_0x237046['push'](_0x237046['shift']());}}}(a49_0x55c8,0xbd933));function a49_0x3c95(_0x578734,_0x25f323){_0x578734=_0x578734-0xf9;var _0x55c834=a49_0x55c8();var _0x3c957f=_0x55c834[_0x578734];return _0x3c957f;}import{jsx as a49_0x3e2ead,Fragment as a49_0x2cc830,jsxs as a49_0x267d75}from'react/jsx-runtime';function a49_0x55c8(){var _0x4fd80e=['gray','18876BOFUVU','117262vnmIcC','682218tkkQqU','9cqVrEi','elapsed','1289844WjnwyL','7243690nUzpxe','12194624XcSuKg','16vShChF','2295202eqjkmc','140NyFfzm'];a49_0x55c8=function(){return _0x4fd80e;};return a49_0x55c8();}import{Text}from'ink';export function TaskTime(_0x1140ad){var _0x3cdee9=a49_0x3c95;if(_0x1140ad['elapsed'])return a49_0x267d75(a49_0x2cc830,{'children':[a49_0x3e2ead(Text,{'color':_0x3cdee9(0x104),'children':'\x20['}),a49_0x3e2ead(Text,{'color':_0x3cdee9(0x104),'bold':!![],'children':_0x1140ad[_0x3cdee9(0xfd)]}),a49_0x3e2ead(Text,{'color':'gray','children':']'})]});return null;}
@@ -1 +1 @@
1
- const a50_0x106fd3=a50_0x4818;(function(_0x369d0b,_0x45ec6d){const _0x589296=a50_0x4818,_0x1b3851=_0x369d0b();while(!![]){try{const _0x3a72b3=parseInt(_0x589296(0x18f))/0x1*(-parseInt(_0x589296(0x19d))/0x2)+-parseInt(_0x589296(0x192))/0x3*(parseInt(_0x589296(0x19e))/0x4)+-parseInt(_0x589296(0x18d))/0x5*(parseInt(_0x589296(0x18c))/0x6)+parseInt(_0x589296(0x199))/0x7+parseInt(_0x589296(0x196))/0x8*(parseInt(_0x589296(0x195))/0x9)+parseInt(_0x589296(0x19f))/0xa*(parseInt(_0x589296(0x191))/0xb)+-parseInt(_0x589296(0x190))/0xc;if(_0x3a72b3===_0x45ec6d)break;else _0x1b3851['push'](_0x1b3851['shift']());}catch(_0x486c14){_0x1b3851['push'](_0x1b3851['shift']());}}}(a50_0x1fc1,0x3139c));import a50_0x19cc5a from'node:path';function a50_0x1fc1(){const _0x4c3ec0=['111912UMpyiO','50cDQAeZ','复制项目文件','606iyUivA','9515OPRJYI','项目模板复制失败','3JpViqR','489972xpIbUV','352319cRBbyY','9ksbbLc','copy','dirname','1737567mcflLd','8rBcOGc','success','error','1372819IIkXue','resolve','cwd','now','20486wdOPgb'];a50_0x1fc1=function(){return _0x4c3ec0;};return a50_0x1fc1();}function a50_0x4818(_0xaf74c1,_0xb22491){_0xaf74c1=_0xaf74c1-0x18b;const _0x1fc17e=a50_0x1fc1();let _0x4818ec=_0x1fc17e[_0xaf74c1];return _0x4818ec;}import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a50_0x19cc5a[a50_0x106fd3(0x194)](fileURLToPath(import.meta.url)),templateDir=a50_0x19cc5a[a50_0x106fd3(0x19a)](__dirname,'../../templates/projects/sub-app-react-demo');export function useCopyProjectTemplate(){const _0x2b84b0=a50_0x106fd3,[_0x159249,_0x208725]=useState(![]),[_0x4ba99a,_0x1ff1b2]=useState(![]),[_0x424dbc,_0x204fb2]=useState(''),_0x1fec61=useCallback(async _0x424bcc=>{const _0x110f58=a50_0x4818,_0x1ff850=Date[_0x110f58(0x19c)](),_0x74b9fa=a50_0x19cc5a[_0x110f58(0x19a)](process[_0x110f58(0x19b)](),_0x424bcc);_0x208725(!![]);try{logger['info']('copy','开始复制项目模板',{'projectCode':_0x424bcc,'templateDir':templateDir}),await copyDirectory(templateDir,_0x74b9fa);const _0x5bdd45=Date[_0x110f58(0x19c)]()-_0x1ff850;logger[_0x110f58(0x197)](_0x110f58(0x193),'项目模板复制完成',_0x5bdd45,{'projectCode':_0x424bcc});}catch(_0x2a4ae3){const _0x3aa1c4=Date[_0x110f58(0x19c)]()-_0x1ff850;logger[_0x110f58(0x198)]('copy',_0x110f58(0x18e),{'projectCode':_0x424bcc,'error':_0x2a4ae3 instanceof Error?_0x2a4ae3['message']:String(_0x2a4ae3),'duration':_0x3aa1c4});throw _0x2a4ae3;}finally{_0x208725(![]),_0x1ff1b2(!![]),_0x204fb2(formatElapsed(_0x1ff850));}},[]);return{'taskName':_0x2b84b0(0x18b),'finished':_0x4ba99a,'loading':_0x159249,'elapsed':_0x424dbc,'doTask':_0x1fec61};}
1
+ const a50_0x17f384=a50_0x1097;(function(_0x2f00ee,_0x34fa8a){const _0x395e13=a50_0x1097,_0x247fd0=_0x2f00ee();while(!![]){try{const _0x371468=-parseInt(_0x395e13(0xec))/0x1*(parseInt(_0x395e13(0xf6))/0x2)+parseInt(_0x395e13(0xed))/0x3+-parseInt(_0x395e13(0xf9))/0x4*(parseInt(_0x395e13(0xf7))/0x5)+parseInt(_0x395e13(0xef))/0x6+parseInt(_0x395e13(0xfa))/0x7*(parseInt(_0x395e13(0xfd))/0x8)+-parseInt(_0x395e13(0xfb))/0x9*(-parseInt(_0x395e13(0xf0))/0xa)+-parseInt(_0x395e13(0xf3))/0xb*(parseInt(_0x395e13(0xfc))/0xc);if(_0x371468===_0x34fa8a)break;else _0x247fd0['push'](_0x247fd0['shift']());}catch(_0x235b29){_0x247fd0['push'](_0x247fd0['shift']());}}}(a50_0x4bba,0x48134));function a50_0x1097(_0x3f9481,_0x1d6d6d){_0x3f9481=_0x3f9481-0xe9;const _0x4bba04=a50_0x4bba();let _0x1097c3=_0x4bba04[_0x3f9481];return _0x1097c3;}import a50_0xba9b24 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a50_0xba9b24[a50_0x17f384(0xf1)](fileURLToPath(import.meta.url)),templateDir=a50_0xba9b24['resolve'](__dirname,a50_0x17f384(0xeb));function a50_0x4bba(){const _0x2355d5=['1507168LzCxBG','开始复制项目模板','message','复制项目文件','../../templates/projects/sub-app-react-demo','32FgODHh','87252xxkHuf','info','1785726xAlzWT','10AdMtjA','dirname','error','176NHdcSw','copy','cwd','17720DNUZIm','1670UXjNPX','项目模板复制完成','3748mvbTXB','7wfIoRb','5168925lClBUD','148296rshcaX'];a50_0x4bba=function(){return _0x2355d5;};return a50_0x4bba();}export function useCopyProjectTemplate(){const _0x1de869=a50_0x17f384,[_0x2f70b3,_0x54b08c]=useState(![]),[_0x152e75,_0x31aa3c]=useState(![]),[_0x24c91f,_0x10adf9]=useState(''),_0x534e62=useCallback(async _0x14056a=>{const _0x33f680=a50_0x1097,_0x3c9df8=Date['now'](),_0x1a844d=a50_0xba9b24['resolve'](process[_0x33f680(0xf5)](),_0x14056a);_0x54b08c(!![]);try{logger[_0x33f680(0xee)](_0x33f680(0xf4),_0x33f680(0xfe),{'projectCode':_0x14056a,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1a844d);const _0x57e206=Date['now']()-_0x3c9df8;logger['success']('copy',_0x33f680(0xf8),_0x57e206,{'projectCode':_0x14056a});}catch(_0x3a42da){const _0x26de23=Date['now']()-_0x3c9df8;logger[_0x33f680(0xf2)](_0x33f680(0xf4),'项目模板复制失败',{'projectCode':_0x14056a,'error':_0x3a42da instanceof Error?_0x3a42da[_0x33f680(0xe9)]:String(_0x3a42da),'duration':_0x26de23});throw _0x3a42da;}finally{_0x54b08c(![]),_0x31aa3c(!![]),_0x10adf9(formatElapsed(_0x3c9df8));}},[]);return{'taskName':_0x1de869(0xea),'finished':_0x152e75,'loading':_0x2f70b3,'elapsed':_0x24c91f,'doTask':_0x534e62};}
@@ -1 +1 @@
1
- (function(_0x5c51c3,_0x2fcbed){const _0xfa432e=a51_0x1edd,_0x51fb96=_0x5c51c3();while(!![]){try{const _0xedad4e=-parseInt(_0xfa432e(0x111))/0x1+parseInt(_0xfa432e(0x107))/0x2*(parseInt(_0xfa432e(0x10f))/0x3)+-parseInt(_0xfa432e(0x113))/0x4*(parseInt(_0xfa432e(0x11a))/0x5)+parseInt(_0xfa432e(0x109))/0x6*(parseInt(_0xfa432e(0x112))/0x7)+-parseInt(_0xfa432e(0x116))/0x8*(-parseInt(_0xfa432e(0x119))/0x9)+parseInt(_0xfa432e(0x118))/0xa*(parseInt(_0xfa432e(0x114))/0xb)+-parseInt(_0xfa432e(0x117))/0xc;if(_0xedad4e===_0x2fcbed)break;else _0x51fb96['push'](_0x51fb96['shift']());}catch(_0x278929){_0x51fb96['push'](_0x51fb96['shift']());}}}(a51_0x299e,0x3ffed));import a51_0x4ce548 from'node:path';import{useCallback,useState}from'react';function a51_0x1edd(_0x24ec06,_0x11843a){_0x24ec06=_0x24ec06-0x105;const _0x299e57=a51_0x299e();let _0x1edd78=_0x299e57[_0x24ec06];return _0x1edd78;}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a51_0x299e(){const _0x1e3de3=['开始格式化代码','格式化代码','cwd','720794WYVHFK','error','6cIrIzV','代码格式化完成','format','success','prettier','now','3ZSTfya','info','113773CnlUkG','822241Yoyoli','44FlUXVp','1375fXdXuV','resolve','1350616GxEtSI','854172gcJZBS','12150Dmyjbt','9IohyTy','159765JvrNIK','代码格式化失败'];a51_0x299e=function(){return _0x1e3de3;};return a51_0x299e();}import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x43f02e=a51_0x1edd,[_0x39befb,_0x144bfb]=useState(![]),[_0x174774,_0x4f290f]=useState(![]),[_0x4d35b8,_0x5e2b7a]=useState(''),_0x387f2e=useCallback(async _0x2a3d51=>{const _0x20b9e8=a51_0x1edd,_0x21fb15=Date[_0x20b9e8(0x10e)](),_0x368da5=a51_0x4ce548[_0x20b9e8(0x115)](process[_0x20b9e8(0x106)](),_0x2a3d51);_0x144bfb(!![]);try{logger[_0x20b9e8(0x110)]('format',_0x20b9e8(0x11c),{'projectCode':_0x2a3d51}),await execa('npx',[_0x20b9e8(0x10d),'--write','.'],{'cwd':_0x368da5});const _0x143495=Date['now']()-_0x21fb15;logger[_0x20b9e8(0x10c)]('format',_0x20b9e8(0x10a),_0x143495,{'projectCode':_0x2a3d51});}catch(_0x4ddb05){const _0x2820d7=Date[_0x20b9e8(0x10e)]()-_0x21fb15;logger[_0x20b9e8(0x108)](_0x20b9e8(0x10b),_0x20b9e8(0x11b),{'projectCode':_0x2a3d51,'error':_0x4ddb05 instanceof Error?_0x4ddb05['message']:String(_0x4ddb05),'duration':_0x2820d7});throw _0x4ddb05;}finally{_0x144bfb(![]),_0x4f290f(!![]),_0x5e2b7a(formatElapsed(_0x21fb15));}},[]);return{'taskName':_0x43f02e(0x105),'finished':_0x174774,'loading':_0x39befb,'elapsed':_0x4d35b8,'doTask':_0x387f2e};}
1
+ (function(_0x232869,_0x22bfd7){const _0x5def9=a51_0x42cc,_0x51c86e=_0x232869();while(!![]){try{const _0x95a9e9=parseInt(_0x5def9(0x189))/0x1*(parseInt(_0x5def9(0x188))/0x2)+-parseInt(_0x5def9(0x187))/0x3*(-parseInt(_0x5def9(0x18c))/0x4)+parseInt(_0x5def9(0x183))/0x5+-parseInt(_0x5def9(0x18b))/0x6*(-parseInt(_0x5def9(0x191))/0x7)+parseInt(_0x5def9(0x18e))/0x8+parseInt(_0x5def9(0x196))/0x9+-parseInt(_0x5def9(0x193))/0xa;if(_0x95a9e9===_0x22bfd7)break;else _0x51c86e['push'](_0x51c86e['shift']());}catch(_0x1c4462){_0x51c86e['push'](_0x51c86e['shift']());}}}(a51_0x2eb2,0x5b885));import a51_0x12d7a from'node:path';import{useCallback,useState}from'react';function a51_0x2eb2(){const _0x504841=['608368qdjVzt','message','npx','581nrNpri','代码格式化失败','22395930nGHrrh','now','prettier','4709718GRnbdv','代码格式化完成','开始格式化代码','resolve','2599120hxzmYP','error','format','success','60MiyjUg','96RQlCcM','14167wXTMpr','格式化代码','31524XPTSLv','75848NDLSOT','--write'];a51_0x2eb2=function(){return _0x504841;};return a51_0x2eb2();}import{execa}from'execa';function a51_0x42cc(_0x2c3e36,_0x4dcfb6){_0x2c3e36=_0x2c3e36-0x181;const _0x2eb27b=a51_0x2eb2();let _0x42cc36=_0x2eb27b[_0x2c3e36];return _0x42cc36;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x3bc183=a51_0x42cc,[_0x47bc67,_0x3f6042]=useState(![]),[_0x2730ec,_0x4abfab]=useState(![]),[_0x1e3fa3,_0x332725]=useState(''),_0x5df7b7=useCallback(async _0x38a39b=>{const _0x42f607=a51_0x42cc,_0x5b844e=Date['now'](),_0x457ffa=a51_0x12d7a[_0x42f607(0x182)](process['cwd'](),_0x38a39b);_0x3f6042(!![]);try{logger['info'](_0x42f607(0x185),_0x42f607(0x181),{'projectCode':_0x38a39b}),await execa(_0x42f607(0x190),[_0x42f607(0x195),_0x42f607(0x18d),'.'],{'cwd':_0x457ffa});const _0x40064e=Date[_0x42f607(0x194)]()-_0x5b844e;logger[_0x42f607(0x186)](_0x42f607(0x185),_0x42f607(0x197),_0x40064e,{'projectCode':_0x38a39b});}catch(_0x1ccde1){const _0x4adfa5=Date[_0x42f607(0x194)]()-_0x5b844e;logger[_0x42f607(0x184)](_0x42f607(0x185),_0x42f607(0x192),{'projectCode':_0x38a39b,'error':_0x1ccde1 instanceof Error?_0x1ccde1[_0x42f607(0x18f)]:String(_0x1ccde1),'duration':_0x4adfa5});throw _0x1ccde1;}finally{_0x3f6042(![]),_0x4abfab(!![]),_0x332725(formatElapsed(_0x5b844e));}},[]);return{'taskName':_0x3bc183(0x18a),'finished':_0x2730ec,'loading':_0x47bc67,'elapsed':_0x1e3fa3,'doTask':_0x5df7b7};}
@@ -1 +1 @@
1
- function a52_0x4f72(_0x567ba6,_0x5cee40){_0x567ba6=_0x567ba6-0x76;const _0x408dc7=a52_0x408d();let _0x4f72a5=_0x408dc7[_0x567ba6];return _0x4f72a5;}function a52_0x408d(){const _0x2fe3ce=['4784733JLEESK','8135zYuFyU','3IRVnVs','1287090cqzJpR','依赖安装完成','https://registry.npmmirror.com','cwd','3888610hoagtE','2776aDYDkL','4207xQXIWv','依赖安装失败','开始安装依赖','install','158OjCOUA','48YUyVtP','10FDmLcf','3226284kRsVgX','npm','error','resolve','3334859GvnTOn','--registry','message','now','info'];a52_0x408d=function(){return _0x2fe3ce;};return a52_0x408d();}(function(_0x31484d,_0xe57b67){const _0x88774b=a52_0x4f72,_0x387860=_0x31484d();while(!![]){try{const _0xe19adb=-parseInt(_0x88774b(0x7b))/0x1*(parseInt(_0x88774b(0x87))/0x2)+parseInt(_0x88774b(0x7c))/0x3*(parseInt(_0x88774b(0x8a))/0x4)+parseInt(_0x88774b(0x89))/0x5*(parseInt(_0x88774b(0x7d))/0x6)+parseInt(_0x88774b(0x83))/0x7*(parseInt(_0x88774b(0x82))/0x8)+parseInt(_0x88774b(0x7a))/0x9+parseInt(_0x88774b(0x81))/0xa+parseInt(_0x88774b(0x8e))/0xb*(-parseInt(_0x88774b(0x88))/0xc);if(_0xe19adb===_0xe57b67)break;else _0x387860['push'](_0x387860['shift']());}catch(_0x9b9993){_0x387860['push'](_0x387860['shift']());}}}(a52_0x408d,0x7c579));import a52_0x19c3a9 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const [_0x44461c,_0x1449e5]=useState(![]),[_0x2c9b8d,_0x5f59d5]=useState(![]),[_0x5e0080,_0x5e0413]=useState(''),_0x10310c=useCallback(async _0x1983ef=>{const _0x5ede31=a52_0x4f72,_0x17c7f8=Date[_0x5ede31(0x78)](),_0x469be6=a52_0x19c3a9[_0x5ede31(0x8d)](process[_0x5ede31(0x80)](),_0x1983ef);_0x1449e5(!![]),_0x5f59d5(![]);const _0x4de673=async(_0x440865,_0x189c55)=>{await execa(_0x440865,_0x189c55,{'cwd':_0x469be6});};try{logger[_0x5ede31(0x79)]('install',_0x5ede31(0x85),{'projectCode':_0x1983ef,'registry':_0x5ede31(0x7f)}),await _0x4de673(_0x5ede31(0x8b),[_0x5ede31(0x86),_0x5ede31(0x76),_0x5ede31(0x7f)]);const _0x49b6dd=Date['now']()-_0x17c7f8;logger['success']('install',_0x5ede31(0x7e),_0x49b6dd,{'projectCode':_0x1983ef});}catch(_0x22615c){const _0x4d8da9=Date[_0x5ede31(0x78)]()-_0x17c7f8;logger[_0x5ede31(0x8c)](_0x5ede31(0x86),_0x5ede31(0x84),{'projectCode':_0x1983ef,'error':_0x22615c instanceof Error?_0x22615c[_0x5ede31(0x77)]:String(_0x22615c),'duration':_0x4d8da9});throw _0x22615c;}finally{_0x1449e5(![]),_0x5f59d5(!![]),_0x5e0413(formatElapsed(_0x17c7f8));}},[]);return{'taskName':'安装依赖','finished':_0x2c9b8d,'loading':_0x44461c,'elapsed':_0x5e0080,'doTask':_0x10310c};}
1
+ function a52_0x466e(_0x38986b,_0x53730d){_0x38986b=_0x38986b-0x1a7;const _0x4cb69b=a52_0x4cb6();let _0x466e4a=_0x4cb69b[_0x38986b];return _0x466e4a;}(function(_0x1116ee,_0x320029){const _0x3106ff=a52_0x466e,_0x49951b=_0x1116ee();while(!![]){try{const _0x400619=-parseInt(_0x3106ff(0x1be))/0x1*(-parseInt(_0x3106ff(0x1af))/0x2)+parseInt(_0x3106ff(0x1b4))/0x3+parseInt(_0x3106ff(0x1a8))/0x4*(parseInt(_0x3106ff(0x1aa))/0x5)+parseInt(_0x3106ff(0x1bd))/0x6*(-parseInt(_0x3106ff(0x1b3))/0x7)+parseInt(_0x3106ff(0x1bb))/0x8+parseInt(_0x3106ff(0x1ab))/0x9*(parseInt(_0x3106ff(0x1b6))/0xa)+parseInt(_0x3106ff(0x1b7))/0xb*(-parseInt(_0x3106ff(0x1b1))/0xc);if(_0x400619===_0x320029)break;else _0x49951b['push'](_0x49951b['shift']());}catch(_0x1f8240){_0x49951b['push'](_0x49951b['shift']());}}}(a52_0x4cb6,0xbf13f));function a52_0x4cb6(){const _0x519bdb=['35128404qltPsc','info','8848742cwIcHv','2237034yvVeez','依赖安装完成','9365590uPZhLR','11AvbKwA','resolve','开始安装依赖','--registry','10633192hocOew','error','6ThNEBj','1pQoZyc','install','2812SLPfiV','cwd','6765UsRLRK','9wuFnmr','now','https://registry.npmmirror.com','依赖安装失败','2023166qfRBWS','安装依赖'];a52_0x4cb6=function(){return _0x519bdb;};return a52_0x4cb6();}import a52_0x4ad9a1 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x556355=a52_0x466e,[_0x224105,_0x3e8549]=useState(![]),[_0x1f0de6,_0x5a0ff9]=useState(![]),[_0x18df3f,_0x5db64a]=useState(''),_0x47924e=useCallback(async _0xb5e1d2=>{const _0x416eef=a52_0x466e,_0x49a5d0=Date['now'](),_0x1b9241=a52_0x4ad9a1[_0x416eef(0x1b8)](process[_0x416eef(0x1a9)](),_0xb5e1d2);_0x3e8549(!![]),_0x5a0ff9(![]);const _0x3a03ff=async(_0x415343,_0x99578b)=>{await execa(_0x415343,_0x99578b,{'cwd':_0x1b9241});};try{logger[_0x416eef(0x1b2)](_0x416eef(0x1a7),_0x416eef(0x1b9),{'projectCode':_0xb5e1d2,'registry':_0x416eef(0x1ad)}),await _0x3a03ff('npm',['install',_0x416eef(0x1ba),_0x416eef(0x1ad)]);const _0x5c3ccc=Date[_0x416eef(0x1ac)]()-_0x49a5d0;logger['success'](_0x416eef(0x1a7),_0x416eef(0x1b5),_0x5c3ccc,{'projectCode':_0xb5e1d2});}catch(_0x488856){const _0x362cd5=Date[_0x416eef(0x1ac)]()-_0x49a5d0;logger[_0x416eef(0x1bc)](_0x416eef(0x1a7),_0x416eef(0x1ae),{'projectCode':_0xb5e1d2,'error':_0x488856 instanceof Error?_0x488856['message']:String(_0x488856),'duration':_0x362cd5});throw _0x488856;}finally{_0x3e8549(![]),_0x5a0ff9(!![]),_0x5db64a(formatElapsed(_0x49a5d0));}},[]);return{'taskName':_0x556355(0x1b0),'finished':_0x1f0de6,'loading':_0x224105,'elapsed':_0x18df3f,'doTask':_0x47924e};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a53_0xb511(){var _0x58310b=['9WBOmpc','column','查看可用命令。','1585704bmNcUV','green','380XEjSIu','1064200ZNDtZI','21378xDxSoN','2kKDAwH','14050dVMcTn','920310YBRoqp','!\x20请指定一个有效的命令。','555069HueCgH','173516IWZUYQ'];a53_0xb511=function(){return _0x58310b;};return a53_0xb511();}function a53_0xf195(_0x426f58,_0x105890){_0x426f58=_0x426f58-0x125;var _0xb51147=a53_0xb511();var _0xf19590=_0xb51147[_0x426f58];return _0xf19590;}(function(_0x13583a,_0x43da38){var _0x22ea3c=a53_0xf195,_0xd648f8=_0x13583a();while(!![]){try{var _0x310d5f=parseInt(_0x22ea3c(0x127))/0x1+parseInt(_0x22ea3c(0x126))/0x2*(-parseInt(_0x22ea3c(0x12a))/0x3)+-parseInt(_0x22ea3c(0x132))/0x4+-parseInt(_0x22ea3c(0x131))/0x5*(-parseInt(_0x22ea3c(0x125))/0x6)+parseInt(_0x22ea3c(0x12b))/0x7+parseInt(_0x22ea3c(0x12f))/0x8+parseInt(_0x22ea3c(0x12c))/0x9*(parseInt(_0x22ea3c(0x128))/0xa);if(_0x310d5f===_0x43da38)break;else _0xd648f8['push'](_0xd648f8['shift']());}catch(_0x784673){_0xd648f8['push'](_0xd648f8['shift']());}}}(a53_0xb511,0x2453d));import{jsx as a53_0x586890,jsxs as a53_0x255d74}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x5f4ec5=a53_0xf195;return a53_0x255d74(Box,{'flexDirection':_0x5f4ec5(0x12d),'marginTop':0x1,'marginBottom':0x1,'children':[a53_0x255d74(Box,{'children':[a53_0x586890(Box,{'width':'1'}),a53_0x586890(Text,{'children':_0x5f4ec5(0x129)})]}),a53_0x255d74(Box,{'marginTop':0x1,'children':[a53_0x586890(Box,{'width':'1'}),a53_0x255d74(Text,{'children':['\x20\x20','使用']}),a53_0x255d74(Text,{'bold':!![],'color':_0x5f4ec5(0x130),'children':['\x20','lovrabet\x20--help','\x20']}),a53_0x586890(Text,{'children':_0x5f4ec5(0x12e)})]})]});}
1
+ (function(_0x128a86,_0x253876){var _0x13709e=a53_0x49f7,_0x20c37a=_0x128a86();while(!![]){try{var _0x1b5b55=-parseInt(_0x13709e(0xfc))/0x1*(-parseInt(_0x13709e(0x101))/0x2)+-parseInt(_0x13709e(0xf7))/0x3+parseInt(_0x13709e(0x102))/0x4*(-parseInt(_0x13709e(0xf8))/0x5)+parseInt(_0x13709e(0xfe))/0x6+-parseInt(_0x13709e(0xfa))/0x7*(-parseInt(_0x13709e(0x100))/0x8)+-parseInt(_0x13709e(0xf6))/0x9+parseInt(_0x13709e(0xfb))/0xa*(parseInt(_0x13709e(0xf9))/0xb);if(_0x1b5b55===_0x253876)break;else _0x20c37a['push'](_0x20c37a['shift']());}catch(_0x2d3640){_0x20c37a['push'](_0x20c37a['shift']());}}}(a53_0x3e02,0xd8add));function a53_0x49f7(_0x31664c,_0x151de3){_0x31664c=_0x31664c-0xf6;var _0x3e0290=a53_0x3e02();var _0x49f7c6=_0x3e0290[_0x31664c];return _0x49f7c6;}function a53_0x3e02(){var _0x1cb057=['27748886nHoedu','1722728ibhoSp','10XvwxlC','7989sfyKcG','green','2107914DXOyMy','查看可用命令。','8xBbrIb','282vEGcWL','466016ROCZha','9514341zTqemm','2012328VFqJjI','70psKqBZ'];a53_0x3e02=function(){return _0x1cb057;};return a53_0x3e02();}import{jsx as a53_0x13712f,jsxs as a53_0x104e19}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x3928ed=a53_0x49f7;return a53_0x104e19(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a53_0x104e19(Box,{'children':[a53_0x13712f(Box,{'width':'1'}),a53_0x13712f(Text,{'children':'!\x20请指定一个有效的命令。'})]}),a53_0x104e19(Box,{'marginTop':0x1,'children':[a53_0x13712f(Box,{'width':'1'}),a53_0x104e19(Text,{'children':['\x20\x20','使用']}),a53_0x104e19(Text,{'bold':!![],'color':_0x3928ed(0xfd),'children':['\x20','lovrabet\x20--help','\x20']}),a53_0x13712f(Text,{'children':_0x3928ed(0xff)})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5d9a62,_0x521e0d){const _0x1195be=a54_0x416b,_0x2e71f9=_0x5d9a62();while(!![]){try{const _0x2935b0=-parseInt(_0x1195be(0x166))/0x1+parseInt(_0x1195be(0x180))/0x2*(-parseInt(_0x1195be(0x17b))/0x3)+parseInt(_0x1195be(0x194))/0x4*(parseInt(_0x1195be(0x17a))/0x5)+-parseInt(_0x1195be(0x192))/0x6*(-parseInt(_0x1195be(0x174))/0x7)+parseInt(_0x1195be(0x193))/0x8*(-parseInt(_0x1195be(0x16f))/0x9)+parseInt(_0x1195be(0x172))/0xa+parseInt(_0x1195be(0x17c))/0xb*(parseInt(_0x1195be(0x171))/0xc);if(_0x2935b0===_0x521e0d)break;else _0x2e71f9['push'](_0x2e71f9['shift']());}catch(_0xf8cd6){_0x2e71f9['push'](_0x2e71f9['shift']());}}}(a54_0x274b,0x8383c));import{jsxs as a54_0x463336,jsx as a54_0x14a77e}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';function a54_0x416b(_0x34db3b,_0x237182){_0x34db3b=_0x34db3b-0x164;const _0x274b17=a54_0x274b();let _0x416b30=_0x274b17[_0x34db3b];return _0x416b30;}import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';function a54_0x274b(){const _0x47818b=['return','red','.lovrabetrc','初始化项目配置文件成功','utf8','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','34542TMXemQ','24iOeVpY','83908oiZLjn','正在初始化配置文件...','parse','应用代码只能包含字母、数字、-\x20和\x20_','toLocaleString','666822OZSbud','trim','message','gray','delete','exit','cwd','应用代码不合法','length','2036511XLeWme','stringify','204NkFTWu','9244330TgxBeH','info','721weARVg','init','当前目录已存在\x20.lovrabetrc\x20文件','请输入应用代码\x20(AppCode):\x20','string','column','70eQPcJc','303SaBEfo','294569ScEKKn','env','ctrl','创建配置文件失败','7564BOZRAD','\x20←\x20','slice','package.json','setLogPath','green','1.0.0','error','AppCode:\x20','创建配置文件失败:\x20','version','cyan'];a54_0x274b=function(){return _0x47818b;};return a54_0x274b();}import{readConfig}from'../utils/config.js';export function Init({appcode:_0x1e0b83,env:_0x458f52}){const _0x2119e9=a54_0x416b,[_0x15ecf0,_0x21500c]=useState(null),[_0x70a0aa,_0x33f52a]=useState(![]),[_0x284226,_0x2372f9]=useState(!_0x1e0b83),[_0x2ef08a,_0x4b2e91]=useState(''),[_0x139ba1,_0x2a0637]=useState(''),[_0x1cda33,_0x3b5e07]=useState(_0x1e0b83||''),[_0x5d4dcc]=useState(_0x458f52);function _0x4b709f(_0x3fe120){const _0x304467=a54_0x416b;if(_0x3fe120[_0x304467(0x16e)]===0x0)return{'valid':![],'message':''};if(_0x3fe120['length']>0x64)return{'valid':![],'message':'应用代码长度不能超过\x20100\x20个字符'};const _0x3959b9=/^[A-Za-z0-9_-]+$/;if(!_0x3959b9['test'](_0x3fe120))return{'valid':![],'message':_0x304467(0x164)};return{'valid':!![]};}useInput((_0x29cead,_0x3583d0)=>{const _0x23ddb1=a54_0x416b;if(!_0x284226)return;if(_0x3583d0[_0x23ddb1(0x18c)]){if(_0x139ba1||!_0x2ef08a[_0x23ddb1(0x167)]()){_0x2a0637('应用代码不能为空');return;}const _0x17d85c=_0x2ef08a['trim'](),{valid:_0x162b70,message:_0x3e35f2}=_0x4b709f(_0x17d85c);if(!_0x162b70){_0x2a0637(_0x3e35f2||_0x23ddb1(0x16d));return;}_0x3b5e07(_0x17d85c),_0x2372f9(![]);}else{if(_0x3583d0['backspace']||_0x3583d0[_0x23ddb1(0x16a)])_0x4b2e91(_0x546c0c=>{const _0x5ca81c=_0x23ddb1,_0x1506c1=_0x546c0c[_0x5ca81c(0x182)](0x0,-0x1);if(_0x1506c1[_0x5ca81c(0x16e)]===0x0)_0x2a0637('');else{const {valid:_0x3c56c7,message:_0x48f2d3}=_0x4b709f(_0x1506c1);_0x2a0637(_0x3c56c7?'':_0x48f2d3||_0x5ca81c(0x16d));}return _0x1506c1;});else _0x3583d0[_0x23ddb1(0x17e)]&&_0x29cead==='c'?process[_0x23ddb1(0x16b)](0x0):_0x4b2e91(_0xa72ffb=>{const _0x324d53=_0x23ddb1,_0x17d67b=_0xa72ffb+_0x29cead,{valid:_0x3da788,message:_0x5b2b0e}=_0x4b709f(_0x17d67b);return _0x2a0637(_0x3da788?'':_0x5b2b0e||_0x324d53(0x16d)),_0x17d67b;});}},{'isActive':_0x284226}),useEffect(()=>{const _0x2cf69e=a54_0x416b;if(!_0x1cda33||_0x284226)return;const _0x3ed9ce=resolve(process[_0x2cf69e(0x16c)](),_0x2cf69e(0x18e));if(existsSync(_0x3ed9ce)){_0x21500c(_0x2cf69e(0x176)),setTimeout(()=>process[_0x2cf69e(0x16b)](0x1),0x64);return;}try{const _0x142068=fileURLToPath(import.meta.url),_0x4627bf=resolve(dirname(_0x142068),'../..'),_0x5d2c39=join(_0x4627bf,_0x2cf69e(0x183));let _0x25eac3=_0x2cf69e(0x186);try{const _0x46be38=JSON[_0x2cf69e(0x196)](readFileSync(_0x5d2c39,'utf8'));_0x25eac3=_0x46be38[_0x2cf69e(0x18a)]||'1.0.0';}catch(_0x26f2ab){}const _0x2f5375=readConfig(),_0xefa6ae=typeof _0x2f5375[_0x2cf69e(0x17d)]===_0x2cf69e(0x178)?_0x2f5375[_0x2cf69e(0x17d)]:undefined,{app:_0x493596,appcode:_0x4a1c9f,..._0x3147c8}=_0x2f5375,_0x27cf0a={..._0x3147c8,'appcode':_0x1cda33,'env':_0x5d4dcc||_0xefa6ae||'online','createdAt':new Date()[_0x2cf69e(0x165)](),'version':_0x25eac3};writeFileSync(_0x3ed9ce,JSON[_0x2cf69e(0x170)](_0x27cf0a,null,0x2),{'encoding':_0x2cf69e(0x190),'mode':0x180}),logger[_0x2cf69e(0x184)](process['cwd']()),logger[_0x2cf69e(0x173)](_0x2cf69e(0x175),_0x2cf69e(0x18f),{'appcode':_0x1cda33,'env':_0x27cf0a[_0x2cf69e(0x17d)],'version':_0x27cf0a[_0x2cf69e(0x18a)],'configPath':_0x3ed9ce}),_0x33f52a(!![]),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x50e428){logger[_0x2cf69e(0x187)]('init',_0x2cf69e(0x17f),{'error':_0x50e428 instanceof Error?_0x50e428[_0x2cf69e(0x168)]:String(_0x50e428)}),_0x21500c(_0x2cf69e(0x189)+(_0x50e428 instanceof Error?_0x50e428['message']:String(_0x50e428))),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x1cda33,_0x284226,_0x5d4dcc]);if(_0x15ecf0)return a54_0x14a77e(Box,{'flexDirection':_0x2119e9(0x179),'children':a54_0x463336(Text,{'color':_0x2119e9(0x18d),'children':['✗\x20',_0x15ecf0]})});if(_0x284226)return a54_0x463336(Box,{'flexDirection':'column','children':[a54_0x463336(Box,{'children':[a54_0x14a77e(Text,{'color':_0x2119e9(0x18b),'children':_0x2119e9(0x177)}),_0x2ef08a?a54_0x14a77e(Text,{'color':_0x2119e9(0x185),'children':_0x2ef08a}):a54_0x14a77e(Text,{'color':_0x2119e9(0x169),'children':'_'}),_0x139ba1&&a54_0x463336(Text,{'color':_0x2119e9(0x18d),'children':[_0x2119e9(0x181),_0x139ba1]})]}),!_0x139ba1&&!_0x2ef08a&&a54_0x14a77e(Box,{'children':a54_0x14a77e(Text,{'color':_0x2119e9(0x169),'children':_0x2119e9(0x191)})})]});if(_0x70a0aa)return a54_0x463336(Box,{'flexDirection':_0x2119e9(0x179),'children':[a54_0x14a77e(Text,{'color':_0x2119e9(0x185),'children':'✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件'}),a54_0x463336(Text,{'color':'cyan','children':[_0x2119e9(0x188),_0x1cda33]}),a54_0x14a77e(Text,{'children':'现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了'})]});return a54_0x14a77e(Box,{'children':a54_0x14a77e(Text,{'children':_0x2119e9(0x195)})});}
1
+ function a54_0x2b13(_0xd47a83,_0x3bf15f){_0xd47a83=_0xd47a83-0xcf;const _0x2bd2fc=a54_0x2bd2();let _0x2b1370=_0x2bd2fc[_0xd47a83];return _0x2b1370;}(function(_0x5fa100,_0x30b7cc){const _0x1253c4=a54_0x2b13,_0x5d3cae=_0x5fa100();while(!![]){try{const _0x5901b3=parseInt(_0x1253c4(0xcf))/0x1*(-parseInt(_0x1253c4(0xdd))/0x2)+parseInt(_0x1253c4(0xe6))/0x3*(parseInt(_0x1253c4(0xde))/0x4)+-parseInt(_0x1253c4(0xf6))/0x5+parseInt(_0x1253c4(0xdb))/0x6+parseInt(_0x1253c4(0xe4))/0x7+-parseInt(_0x1253c4(0xeb))/0x8+parseInt(_0x1253c4(0xfa))/0x9;if(_0x5901b3===_0x30b7cc)break;else _0x5d3cae['push'](_0x5d3cae['shift']());}catch(_0x567563){_0x5d3cae['push'](_0x5d3cae['shift']());}}}(a54_0x2bd2,0x9c538));import{jsxs as a54_0x4a3373,jsx as a54_0x5f43cb}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';function a54_0x2bd2(){const _0x4e1802=['5171296KuQCXx','version','column','应用代码不合法','error','当前目录已存在\x20.lovrabetrc\x20文件','green','AppCode:\x20','parse','创建配置文件失败','cyan','2672340bWHeuE','test','online','slice','10229184zqAdis','应用代码不能为空','red','utf8','\x20←\x20','toLocaleString','1dabOgx','message','.lovrabetrc','setLogPath','trim','init','backspace','delete','gray','创建配置文件失败:\x20','1.0.0','stringify','4465464FwCaZm','请输入应用代码\x20(AppCode):\x20','1802028vOPqow','4BXFXDg','应用代码只能包含字母、数字、-\x20和\x20_','cwd','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','env','return','3806824uSnoUt','应用代码长度不能超过\x20100\x20个字符','892662FVqUNN','exit','length','package.json','info'];a54_0x2bd2=function(){return _0x4e1802;};return a54_0x2bd2();}export function Init({appcode:_0x2f42ce,env:_0x36af32}){const _0x537f1f=a54_0x2b13,[_0x14e036,_0xbb154a]=useState(null),[_0x4b2a8b,_0x1f06d1]=useState(![]),[_0x1cb47f,_0x2dab61]=useState(!_0x2f42ce),[_0x137ae6,_0x1ee4b2]=useState(''),[_0x46710f,_0x1260a1]=useState(''),[_0x4eefea,_0x2f9260]=useState(_0x2f42ce||''),[_0x4e25c0]=useState(_0x36af32);function _0x5997a8(_0x7c9d8){const _0x3d539d=a54_0x2b13;if(_0x7c9d8['length']===0x0)return{'valid':![],'message':''};if(_0x7c9d8[_0x3d539d(0xe8)]>0x64)return{'valid':![],'message':_0x3d539d(0xe5)};const _0x521fc2=/^[A-Za-z0-9_-]+$/;if(!_0x521fc2[_0x3d539d(0xf7)](_0x7c9d8))return{'valid':![],'message':_0x3d539d(0xdf)};return{'valid':!![]};}useInput((_0x4962aa,_0x4e7a15)=>{const _0x5e6049=a54_0x2b13;if(!_0x1cb47f)return;if(_0x4e7a15[_0x5e6049(0xe3)]){if(_0x46710f||!_0x137ae6[_0x5e6049(0xd3)]()){_0x1260a1(_0x5e6049(0xfb));return;}const _0x316c55=_0x137ae6[_0x5e6049(0xd3)](),{valid:_0x51e37a,message:_0x3e0e8a}=_0x5997a8(_0x316c55);if(!_0x51e37a){_0x1260a1(_0x3e0e8a||_0x5e6049(0xee));return;}_0x2f9260(_0x316c55),_0x2dab61(![]);}else{if(_0x4e7a15[_0x5e6049(0xd5)]||_0x4e7a15[_0x5e6049(0xd6)])_0x1ee4b2(_0x187f97=>{const _0x2a6592=_0x5e6049,_0x333449=_0x187f97[_0x2a6592(0xf9)](0x0,-0x1);if(_0x333449[_0x2a6592(0xe8)]===0x0)_0x1260a1('');else{const {valid:_0xb94431,message:_0x474d2a}=_0x5997a8(_0x333449);_0x1260a1(_0xb94431?'':_0x474d2a||_0x2a6592(0xee));}return _0x333449;});else _0x4e7a15['ctrl']&&_0x4962aa==='c'?process[_0x5e6049(0xe7)](0x0):_0x1ee4b2(_0x2fbca9=>{const _0x3624d8=_0x5e6049,_0x26e01c=_0x2fbca9+_0x4962aa,{valid:_0x14934d,message:_0x6e2307}=_0x5997a8(_0x26e01c);return _0x1260a1(_0x14934d?'':_0x6e2307||_0x3624d8(0xee)),_0x26e01c;});}},{'isActive':_0x1cb47f}),useEffect(()=>{const _0x2e5387=a54_0x2b13;if(!_0x4eefea||_0x1cb47f)return;const _0xa145d2=resolve(process[_0x2e5387(0xe0)](),_0x2e5387(0xd1));if(existsSync(_0xa145d2)){_0xbb154a(_0x2e5387(0xf0)),setTimeout(()=>process[_0x2e5387(0xe7)](0x1),0x64);return;}try{const _0x21a14f=fileURLToPath(import.meta.url),_0x90fba2=resolve(dirname(_0x21a14f),'../..'),_0x3b7f91=join(_0x90fba2,_0x2e5387(0xe9));let _0x37a4b8=_0x2e5387(0xd9);try{const _0x214ea1=JSON[_0x2e5387(0xf3)](readFileSync(_0x3b7f91,_0x2e5387(0xfd)));_0x37a4b8=_0x214ea1['version']||'1.0.0';}catch(_0x3ee0c2){}const _0x18eb8e=readConfig(),_0x581aff=typeof _0x18eb8e['env']==='string'?_0x18eb8e[_0x2e5387(0xe2)]:undefined,{app:_0x4aecde,appcode:_0x2ffbbd,..._0x37f06b}=_0x18eb8e,_0x3b75e1={..._0x37f06b,'appcode':_0x4eefea,'env':_0x4e25c0||_0x581aff||_0x2e5387(0xf8),'createdAt':new Date()[_0x2e5387(0xff)](),'version':_0x37a4b8};writeFileSync(_0xa145d2,JSON[_0x2e5387(0xda)](_0x3b75e1,null,0x2),{'encoding':_0x2e5387(0xfd),'mode':0x180}),logger[_0x2e5387(0xd2)](process[_0x2e5387(0xe0)]()),logger[_0x2e5387(0xea)](_0x2e5387(0xd4),'初始化项目配置文件成功',{'appcode':_0x4eefea,'env':_0x3b75e1[_0x2e5387(0xe2)],'version':_0x3b75e1[_0x2e5387(0xec)],'configPath':_0xa145d2}),_0x1f06d1(!![]),setTimeout(()=>process[_0x2e5387(0xe7)](0x0),0x64);}catch(_0x501e50){logger[_0x2e5387(0xef)](_0x2e5387(0xd4),_0x2e5387(0xf4),{'error':_0x501e50 instanceof Error?_0x501e50[_0x2e5387(0xd0)]:String(_0x501e50)}),_0xbb154a(_0x2e5387(0xd8)+(_0x501e50 instanceof Error?_0x501e50['message']:String(_0x501e50))),setTimeout(()=>process[_0x2e5387(0xe7)](0x1),0x64);}},[_0x4eefea,_0x1cb47f,_0x4e25c0]);if(_0x14e036)return a54_0x5f43cb(Box,{'flexDirection':_0x537f1f(0xed),'children':a54_0x4a3373(Text,{'color':_0x537f1f(0xfc),'children':['✗\x20',_0x14e036]})});if(_0x1cb47f)return a54_0x4a3373(Box,{'flexDirection':_0x537f1f(0xed),'children':[a54_0x4a3373(Box,{'children':[a54_0x5f43cb(Text,{'color':'cyan','children':_0x537f1f(0xdc)}),_0x137ae6?a54_0x5f43cb(Text,{'color':_0x537f1f(0xf1),'children':_0x137ae6}):a54_0x5f43cb(Text,{'color':_0x537f1f(0xd7),'children':'_'}),_0x46710f&&a54_0x4a3373(Text,{'color':_0x537f1f(0xfc),'children':[_0x537f1f(0xfe),_0x46710f]})]}),!_0x46710f&&!_0x137ae6&&a54_0x5f43cb(Box,{'children':a54_0x5f43cb(Text,{'color':'gray','children':_0x537f1f(0xe1)})})]});if(_0x4b2a8b)return a54_0x4a3373(Box,{'flexDirection':_0x537f1f(0xed),'children':[a54_0x5f43cb(Text,{'color':_0x537f1f(0xf1),'children':'✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件'}),a54_0x4a3373(Text,{'color':_0x537f1f(0xf5),'children':[_0x537f1f(0xf2),_0x4eefea]}),a54_0x5f43cb(Text,{'children':'现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了'})]});return a54_0x5f43cb(Box,{'children':a54_0x5f43cb(Text,{'children':'正在初始化配置文件...'})});}
@@ -1 +1 @@
1
- const a55_0x45c977=a55_0x43d5;(function(_0x2b9340,_0x1e2b3e){const _0x243fe5=a55_0x43d5,_0x3be7b9=_0x2b9340();while(!![]){try{const _0x55bca9=-parseInt(_0x243fe5(0x90))/0x1*(parseInt(_0x243fe5(0x88))/0x2)+-parseInt(_0x243fe5(0x89))/0x3*(parseInt(_0x243fe5(0xa5))/0x4)+parseInt(_0x243fe5(0x79))/0x5*(-parseInt(_0x243fe5(0x70))/0x6)+-parseInt(_0x243fe5(0x83))/0x7*(parseInt(_0x243fe5(0x78))/0x8)+-parseInt(_0x243fe5(0x7a))/0x9+-parseInt(_0x243fe5(0x7d))/0xa+parseInt(_0x243fe5(0x7e))/0xb;if(_0x55bca9===_0x1e2b3e)break;else _0x3be7b9['push'](_0x3be7b9['shift']());}catch(_0x36749d){_0x3be7b9['push'](_0x3be7b9['shift']());}}}(a55_0xa842,0x8162d));function a55_0xa842(){const _0x440cdb=['column','ide','selectedIndexes','find','✗\x20配置失败','green','white','message','selecting','已选择\x20IDE','cwd','⚠️\x20配置需要手动完成','claude','red','不支持的\x20IDE:\x20','请至少选择一个\x20IDE','error','size','description','1053508GocXnR','setErrorMsg','cursor','正在配置\x20MCP\x20服务器...','2984874oUrNNK','cyan','其他\x20IDE','return','\x20\x20⚠️','success','label','yellow','4760NCHdJK','5VLdbyC','4317624IpTtAX','handleKeyDown','⚠️\x20部分配置需要手动完成','2813070TbKsdm','40508611krFeLi','length','done','manual','gray','5705gxjBgD','some','every','配置\x20Lovrabet\x20MCP\x20服务器','name','74wBXoHw','12mdlSqV','map','✓\x20MCP\x20配置完成!','按任意键退出...','status','other','\x20\x20✗','9613qlXDOT','configuring'];a55_0xa842=function(){return _0x440cdb;};return a55_0xa842();}import{jsx as a55_0x4c13bc,jsxs as a55_0x1ed093,Fragment as a55_0x2cc5c9}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';function a55_0x43d5(_0xe0c8da,_0x11baa5){_0xe0c8da=_0xe0c8da-0x6f;const _0xa84239=a55_0xa842();let _0x43d57f=_0xa84239[_0xe0c8da];return _0x43d57f;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array['from'](MCP_IDES)[a55_0x45c977(0x8a)](_0x1079a1=>({'key':_0x1079a1,'name':IDE_CONFIGS[_0x1079a1][a55_0x45c977(0x87)],'description':IDE_CONFIGS[_0x1079a1][a55_0x45c977(0xa4)]})),{'key':a55_0x45c977(0x8e),'name':a55_0x45c977(0x72),'description':'其他\x20IDE\x20配置指引'}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x5eddcb=a55_0x45c977,{exit:_0x188ce3}=useApp(),[_0x49caca,_0x26d842]=useState(_0x5eddcb(0x9a)),[_0x4d0fb1,_0x1c4061]=useState([]),[_0x3be192,_0x409d15]=useState([]),_0x44d05e=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x158726=_0x5eddcb;preselectedIDEs[_0x158726(0x7f)]>0x0&&_0x44d05e[_0x158726(0x94)][_0x158726(0xa3)]>0x0&&_0x414c28();},[]),useInput((_0x4ba23f,_0x3b49c9)=>{const _0x24cb09=_0x5eddcb;if(_0x49caca==='selecting'){if(_0x4ba23f==='q'||_0x4ba23f==='Q'){_0x188ce3();return;}if(_0x3b49c9[_0x24cb09(0x73)]){if(_0x44d05e[_0x24cb09(0x94)]['size']===0x0){_0x44d05e[_0x24cb09(0xa6)](_0x24cb09(0xa1));return;}_0x414c28();return;}_0x44d05e[_0x24cb09(0x7b)](_0x4ba23f,_0x3b49c9);}_0x49caca===_0x24cb09(0x80)&&_0x188ce3();});async function _0x414c28(){const _0xc95680=_0x5eddcb,_0x5c4aa9=_0x44d05e['getSelectedIDEs']();_0x1c4061([{'label':_0xc95680(0x9b),'value':_0x44d05e['selectedIndexes'][_0xc95680(0xa3)]+'\x20个'}]),_0x26d842('configuring');const _0x49849b=[];for(const _0x3a29db of _0x5c4aa9){try{const _0x1346b7=await configureMcp(_0x3a29db);_0x49849b['push']({'ide':IDE_LIST['find'](_0x46e5f8=>_0x46e5f8['key']===_0x3a29db)?.[_0xc95680(0x87)]||_0x3a29db,'status':_0x1346b7['needsManualAction']?_0xc95680(0x81):_0x1346b7[_0xc95680(0x75)]?'success':_0xc95680(0xa2),'message':_0x1346b7[_0xc95680(0x99)]});}catch(_0x23c6b8){_0x49849b['push']({'ide':IDE_LIST[_0xc95680(0x95)](_0x4c1d68=>_0x4c1d68['key']===_0x3a29db)?.[_0xc95680(0x87)]||_0x3a29db,'status':_0xc95680(0xa2),'message':_0x23c6b8 instanceof Error?_0x23c6b8[_0xc95680(0x99)]:String(_0x23c6b8)});}}_0x409d15(_0x49849b),_0x26d842(_0xc95680(0x80)),setTimeout(()=>{_0x188ce3();},0x1388);}return a55_0x1ed093(Box,{'flexDirection':_0x5eddcb(0x92),'marginTop':0x1,'children':[_0x49caca===_0x5eddcb(0x9a)&&a55_0x4c13bc(IDESelector,{'ideList':IDE_LIST,'title':_0x5eddcb(0x86),'selection':_0x44d05e}),_0x49caca===_0x5eddcb(0x91)&&a55_0x1ed093(a55_0x2cc5c9,{'children':[_0x4d0fb1[_0x5eddcb(0x8a)]((_0x42d1c3,_0x495234)=>a55_0x1ed093(Box,{'children':[a55_0x1ed093(Text,{'color':_0x5eddcb(0x97),'children':['√\x20',_0x42d1c3[_0x5eddcb(0x76)],':\x20']}),a55_0x4c13bc(Text,{'color':_0x5eddcb(0x71),'children':_0x42d1c3['value']})]},_0x495234)),a55_0x4c13bc(Box,{'marginTop':0x1,'children':a55_0x4c13bc(Text,{'children':_0x5eddcb(0x6f)})})]}),_0x49caca===_0x5eddcb(0x80)&&a55_0x4c13bc(DoneStep,{'configResults':_0x3be192})]});}function DoneStep({configResults:_0x2b9afe}){const _0x28f842=a55_0x45c977,_0xa91388=_0x2b9afe[_0x28f842(0x85)](_0x2d9979=>_0x2d9979['status']===_0x28f842(0x75)),_0x4ba256=_0x2b9afe['some'](_0x2d9134=>_0x2d9134[_0x28f842(0x8d)]===_0x28f842(0x81)),_0x258670=_0x2b9afe[_0x28f842(0x84)](_0x1cd261=>_0x1cd261[_0x28f842(0x8d)]===_0x28f842(0xa2));return a55_0x1ed093(a55_0x2cc5c9,{'children':[a55_0x4c13bc(Box,{'children':_0xa91388?a55_0x4c13bc(Text,{'color':'green','children':_0x28f842(0x8b)}):_0x4ba256?a55_0x4c13bc(Text,{'color':_0x28f842(0x77),'children':_0x28f842(0x7c)}):_0x258670?a55_0x4c13bc(Text,{'color':_0x28f842(0x9f),'children':_0x28f842(0x96)}):a55_0x4c13bc(Text,{'color':_0x28f842(0x77),'children':_0x28f842(0x9d)})}),_0x2b9afe[_0x28f842(0x8a)]((_0x385516,_0x279523)=>a55_0x1ed093(Box,{'flexDirection':_0x28f842(0x92),'children':[a55_0x1ed093(Text,{'color':_0x385516[_0x28f842(0x8d)]===_0x28f842(0x75)?_0x28f842(0x97):_0x385516[_0x28f842(0x8d)]==='manual'?_0x28f842(0x77):_0x28f842(0x9f),'children':[_0x385516[_0x28f842(0x8d)]===_0x28f842(0x75)?'\x20\x20✓':_0x385516[_0x28f842(0x8d)]===_0x28f842(0x81)?_0x28f842(0x74):_0x28f842(0x8f),'\x20',_0x385516[_0x28f842(0x93)],':']}),a55_0x4c13bc(Text,{'color':_0x385516['status']===_0x28f842(0x75)?_0x28f842(0x98):_0x385516['status']===_0x28f842(0x81)?'yellow':_0x28f842(0x9f),'children':_0x385516[_0x28f842(0x99)]})]},_0x279523)),a55_0x4c13bc(Box,{'marginTop':0x1,'children':a55_0x4c13bc(Text,{'color':_0x28f842(0x82),'children':_0x28f842(0x8c)})})]});}async function configureMcp(_0x1b3b08){const _0x230ab2=a55_0x45c977,_0x16e42e=process[_0x230ab2(0x9c)]();switch(_0x1b3b08){case _0x230ab2(0xa7):return configureCursorMcp(_0x16e42e);case _0x230ab2(0x9e):return configureClaudeMcp(_0x16e42e);case _0x230ab2(0x8e):return showOtherMcpGuide(_0x16e42e);default:throw new Error(_0x230ab2(0xa0)+_0x1b3b08);}}
1
+ const a55_0x33242a=a55_0x35c7;(function(_0x51d884,_0x5b2b88){const _0x28ce64=a55_0x35c7,_0x4c1fc9=_0x51d884();while(!![]){try{const _0x254f2d=parseInt(_0x28ce64(0xf7))/0x1+parseInt(_0x28ce64(0xfc))/0x2*(-parseInt(_0x28ce64(0xfe))/0x3)+-parseInt(_0x28ce64(0x10f))/0x4*(parseInt(_0x28ce64(0x114))/0x5)+-parseInt(_0x28ce64(0xe0))/0x6*(parseInt(_0x28ce64(0xed))/0x7)+parseInt(_0x28ce64(0x104))/0x8+parseInt(_0x28ce64(0x10b))/0x9*(parseInt(_0x28ce64(0xf0))/0xa)+parseInt(_0x28ce64(0xe2))/0xb*(parseInt(_0x28ce64(0xdf))/0xc);if(_0x254f2d===_0x5b2b88)break;else _0x4c1fc9['push'](_0x4c1fc9['shift']());}catch(_0x596361){_0x4c1fc9['push'](_0x4c1fc9['shift']());}}}(a55_0x283f,0x5bc98));function a55_0x283f(){const _0x35e8be=['white','✓\x20MCP\x20配置完成!','message','cyan','425584lUlQOy','label','done','ide','name','success','green','36648pgJyut','description','cwd','red','1022668gVBTki','error','setErrorMsg','other','manual','5MKyYgk','gray','push','\x20\x20⚠️','map','82956MsVTWy','187356OzJigj','status','1496jyLpuA','selectedIndexes','不支持的\x20IDE:\x20','value','yellow','every','column','请至少选择一个\x20IDE','configuring','length','\x20\x20✓','105ZMTVlw','cursor','selecting','30LMadoo','⚠️\x20部分配置需要手动完成','已选择\x20IDE','return','claude','其他\x20IDE','\x20\x20','190023ZKsfTo','key','handleKeyDown','配置\x20Lovrabet\x20MCP\x20服务器','from','191176xfnlJG','some','3nDMmiM','find'];a55_0x283f=function(){return _0x35e8be;};return a55_0x283f();}function a55_0x35c7(_0x40d985,_0x5d3af2){_0x40d985=_0x40d985-0xdb;const _0x283f8a=a55_0x283f();let _0x35c730=_0x283f8a[_0x40d985];return _0x35c730;}import{jsx as a55_0x3f71b2,jsxs as a55_0x34c836,Fragment as a55_0x1d077f}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array[a55_0x33242a(0xfb)](MCP_IDES)[a55_0x33242a(0xde)](_0x18e845=>({'key':_0x18e845,'name':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x108)],'description':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x10c)]})),{'key':a55_0x33242a(0x112),'name':a55_0x33242a(0xf5),'description':'其他\x20IDE\x20配置指引'}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x58e348=a55_0x33242a,{exit:_0x4653d6}=useApp(),[_0x40a10a,_0x983f8]=useState(_0x58e348(0xef)),[_0x4a510a,_0x297670]=useState([]),[_0x1c146f,_0x330c11]=useState([]),_0x53eabc=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x585855=_0x58e348;preselectedIDEs[_0x585855(0xeb)]>0x0&&_0x53eabc[_0x585855(0xe3)]['size']>0x0&&_0x2876a5();},[]),useInput((_0x44e870,_0x1d8182)=>{const _0x226570=_0x58e348;if(_0x40a10a===_0x226570(0xef)){if(_0x44e870==='q'||_0x44e870==='Q'){_0x4653d6();return;}if(_0x1d8182[_0x226570(0xf3)]){if(_0x53eabc[_0x226570(0xe3)]['size']===0x0){_0x53eabc[_0x226570(0x111)](_0x226570(0xe9));return;}_0x2876a5();return;}_0x53eabc[_0x226570(0xf9)](_0x44e870,_0x1d8182);}_0x40a10a===_0x226570(0x106)&&_0x4653d6();});async function _0x2876a5(){const _0x5e9b9c=_0x58e348,_0x58fdca=_0x53eabc['getSelectedIDEs']();_0x297670([{'label':_0x5e9b9c(0xf2),'value':_0x53eabc[_0x5e9b9c(0xe3)]['size']+'\x20个'}]),_0x983f8(_0x5e9b9c(0xea));const _0xb2dd38=[];for(const _0x1dba7e of _0x58fdca){try{const _0x31b473=await configureMcp(_0x1dba7e);_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST[_0x5e9b9c(0xff)](_0x559f3b=>_0x559f3b[_0x5e9b9c(0xf8)]===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x31b473['needsManualAction']?'manual':_0x31b473[_0x5e9b9c(0x109)]?_0x5e9b9c(0x109):'error','message':_0x31b473[_0x5e9b9c(0x102)]});}catch(_0xd9a734){_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST['find'](_0x46dd41=>_0x46dd41['key']===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x5e9b9c(0x110),'message':_0xd9a734 instanceof Error?_0xd9a734[_0x5e9b9c(0x102)]:String(_0xd9a734)});}}_0x330c11(_0xb2dd38),_0x983f8('done'),setTimeout(()=>{_0x4653d6();},0x1388);}return a55_0x34c836(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x40a10a==='selecting'&&a55_0x3f71b2(IDESelector,{'ideList':IDE_LIST,'title':_0x58e348(0xfa),'selection':_0x53eabc}),_0x40a10a===_0x58e348(0xea)&&a55_0x34c836(a55_0x1d077f,{'children':[_0x4a510a['map']((_0x447b19,_0x5a94c4)=>a55_0x34c836(Box,{'children':[a55_0x34c836(Text,{'color':'green','children':['√\x20',_0x447b19[_0x58e348(0x105)],':\x20']}),a55_0x3f71b2(Text,{'color':_0x58e348(0x103),'children':_0x447b19[_0x58e348(0xe5)]})]},_0x5a94c4)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'children':'正在配置\x20MCP\x20服务器...'})})]}),_0x40a10a===_0x58e348(0x106)&&a55_0x3f71b2(DoneStep,{'configResults':_0x1c146f})]});}function DoneStep({configResults:_0x43c5a4}){const _0xc9a5b6=a55_0x33242a,_0x5b1a06=_0x43c5a4[_0xc9a5b6(0xe7)](_0x4b9fd5=>_0x4b9fd5[_0xc9a5b6(0xe1)]==='success'),_0x1ca0c6=_0x43c5a4[_0xc9a5b6(0xfd)](_0xdb669=>_0xdb669[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)),_0x41c072=_0x43c5a4[_0xc9a5b6(0xfd)](_0xfc8d=>_0xfc8d[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x110));return a55_0x34c836(a55_0x1d077f,{'children':[a55_0x3f71b2(Box,{'children':_0x5b1a06?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10a),'children':_0xc9a5b6(0x101)}):_0x1ca0c6?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xe6),'children':_0xc9a5b6(0xf1)}):_0x41c072?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10e),'children':'✗\x20配置失败'}):a55_0x3f71b2(Text,{'color':'yellow','children':'⚠️\x20配置需要手动完成'})}),_0x43c5a4['map']((_0x532de4,_0x2d8835)=>a55_0x34c836(Box,{'flexDirection':_0xc9a5b6(0xe8),'children':[a55_0x34c836(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?'green':_0x532de4[_0xc9a5b6(0xe1)]==='manual'?'yellow':_0xc9a5b6(0x10e),'children':[_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0xec):_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)?_0xc9a5b6(0xdd):_0xc9a5b6(0xf6),'\x20',_0x532de4[_0xc9a5b6(0x107)],':']}),a55_0x3f71b2(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0x100):_0x532de4['status']===_0xc9a5b6(0x113)?'yellow':_0xc9a5b6(0x10e),'children':_0x532de4[_0xc9a5b6(0x102)]})]},_0x2d8835)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xdb),'children':'按任意键退出...'})})]});}async function configureMcp(_0x146189){const _0x5c2ea6=a55_0x33242a,_0x491575=process[_0x5c2ea6(0x10d)]();switch(_0x146189){case _0x5c2ea6(0xee):return configureCursorMcp(_0x491575);case _0x5c2ea6(0xf4):return configureClaudeMcp(_0x491575);case _0x5c2ea6(0x112):return showOtherMcpGuide(_0x491575);default:throw new Error(_0x5c2ea6(0xe4)+_0x146189);}}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3253e0,_0x5137ef){const _0x531bb4=a56_0x308e,_0x259049=_0x3253e0();while(!![]){try{const _0x5ac05c=parseInt(_0x531bb4(0x199))/0x1*(-parseInt(_0x531bb4(0x1a7))/0x2)+-parseInt(_0x531bb4(0x1a6))/0x3*(-parseInt(_0x531bb4(0x195))/0x4)+parseInt(_0x531bb4(0x1a2))/0x5*(parseInt(_0x531bb4(0x1a5))/0x6)+parseInt(_0x531bb4(0x19e))/0x7*(parseInt(_0x531bb4(0x19f))/0x8)+-parseInt(_0x531bb4(0x198))/0x9+-parseInt(_0x531bb4(0x19d))/0xa*(parseInt(_0x531bb4(0x19b))/0xb)+parseInt(_0x531bb4(0x1a4))/0xc;if(_0x5ac05c===_0x5137ef)break;else _0x259049['push'](_0x259049['shift']());}catch(_0x1ee4a2){_0x259049['push'](_0x259049['shift']());}}}(a56_0x1430,0x9bf13));function a56_0x308e(_0x5b1cdb,_0x5e446c){_0x5b1cdb=_0x5b1cdb-0x194;const _0x1430d1=a56_0x1430();let _0x308ef5=_0x1430d1[_0x5b1cdb];return _0x308ef5;}import{configureClaudeMcp as a56_0x52cc93}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x225a9f=a56_0x308e,_0x2f0de2=process[_0x225a9f(0x196)](),_0x2c8d55=a56_0x52cc93(_0x2f0de2);_0x2c8d55[_0x225a9f(0x19a)]?(console[_0x225a9f(0x19c)](_0x225a9f(0x1a3)+_0x2c8d55[_0x225a9f(0x197)]+'\x0a'),process[_0x225a9f(0x194)](0x0)):(console[_0x225a9f(0x1a0)](_0x225a9f(0x1a1)+_0x2c8d55[_0x225a9f(0x197)]+'\x0a'),process[_0x225a9f(0x194)](0x1));}function a56_0x1430(){const _0x422346=['exit','2313604epXlfO','cwd','message','4315599JJHGCW','13PRvlJA','success','442211vMbBkC','log','160NQuNJI','9051DUrNdK','1168IUzQFz','error','\x0a错误:\x20配置失败\x20-\x20','10jevlxt','\x0a📋\x20','23193744OmvNSn','664278lBtbAt','3yICefA','178454IlqVnq'];a56_0x1430=function(){return _0x422346;};return a56_0x1430();}
1
+ (function(_0x35de3f,_0x478a66){const _0x26ab21=a56_0x133a,_0x26ef81=_0x35de3f();while(!![]){try{const _0x2a1cb9=-parseInt(_0x26ab21(0x1d5))/0x1*(parseInt(_0x26ab21(0x1d7))/0x2)+-parseInt(_0x26ab21(0x1d1))/0x3*(-parseInt(_0x26ab21(0x1cf))/0x4)+-parseInt(_0x26ab21(0x1cd))/0x5+-parseInt(_0x26ab21(0x1d3))/0x6*(-parseInt(_0x26ab21(0x1da))/0x7)+-parseInt(_0x26ab21(0x1d8))/0x8+-parseInt(_0x26ab21(0x1d0))/0x9+parseInt(_0x26ab21(0x1ce))/0xa;if(_0x2a1cb9===_0x478a66)break;else _0x26ef81['push'](_0x26ef81['shift']());}catch(_0x141037){_0x26ef81['push'](_0x26ef81['shift']());}}}(a56_0x1792,0x36a77));function a56_0x133a(_0x22d94b,_0xf74a0c){_0x22d94b=_0x22d94b-0x1cd;const _0x17923d=a56_0x1792();let _0x133aad=_0x17923d[_0x22d94b];return _0x133aad;}import{configureClaudeMcp as a56_0x580a34}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x3695c3=a56_0x133a,_0x19c56c=process['cwd'](),_0x146dbf=a56_0x580a34(_0x19c56c);_0x146dbf[_0x3695c3(0x1db)]?(console[_0x3695c3(0x1d2)](_0x3695c3(0x1dc)+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x0)):(console[_0x3695c3(0x1d9)]('\x0a错误:\x20配置失败\x20-\x20'+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x1));}function a56_0x1792(){const _0x1175ae=['message','10HpYWaU','2943080RREljs','error','560245UIGJiu','success','\x0a📋\x20','940475XzPCjU','6944200VtYrbi','32792vTFcYS','2271177VAMDtn','126wQwuRJ','log','6WFGEfe','exit','17315evUyzX'];a56_0x1792=function(){return _0x1175ae;};return a56_0x1792();}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- (function(_0x497959,_0x3c17af){const _0x4b41fc=a57_0x41de,_0x2df7fc=_0x497959();while(!![]){try{const _0xd65bf1=-parseInt(_0x4b41fc(0x1af))/0x1+parseInt(_0x4b41fc(0x1bc))/0x2*(parseInt(_0x4b41fc(0x1bf))/0x3)+-parseInt(_0x4b41fc(0x1b2))/0x4*(-parseInt(_0x4b41fc(0x1be))/0x5)+parseInt(_0x4b41fc(0x1ba))/0x6*(parseInt(_0x4b41fc(0x1b5))/0x7)+-parseInt(_0x4b41fc(0x1bb))/0x8+parseInt(_0x4b41fc(0x1b8))/0x9*(-parseInt(_0x4b41fc(0x1b0))/0xa)+parseInt(_0x4b41fc(0x1b1))/0xb;if(_0xd65bf1===_0x3c17af)break;else _0x2df7fc['push'](_0x2df7fc['shift']());}catch(_0x9f7c79){_0x2df7fc['push'](_0x2df7fc['shift']());}}}(a57_0x59bc,0xefb5e));import{configureCursorMcp as a57_0x3505c8}from'./mcp-installer.js';function a57_0x41de(_0x399014,_0x5d72e9){_0x399014=_0x399014-0x1ae;const _0x59bc4f=a57_0x59bc();let _0x41defb=_0x59bc4f[_0x399014];return _0x41defb;}export async function configureCursorMcp(){const _0x23187c=a57_0x41de,_0x452865=process[_0x23187c(0x1c0)](),_0x320cf6=await a57_0x3505c8(_0x452865);_0x320cf6[_0x23187c(0x1b4)]?(console['log']('\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a'),console[_0x23187c(0x1ae)]('配置信息:'),console[_0x23187c(0x1ae)]('\x20\x20'+_0x320cf6[_0x23187c(0x1b3)]+'\x0a'),console[_0x23187c(0x1ae)](_0x23187c(0x1b6)),console[_0x23187c(0x1ae)](_0x23187c(0x1b9)),process[_0x23187c(0x1bd)](0x0)):(console[_0x23187c(0x1b7)]('\x0a错误:\x20配置失败\x20-\x20'+_0x320cf6[_0x23187c(0x1b3)]+'\x0a'),process[_0x23187c(0x1bd)](0x1));}function a57_0x59bc(){const _0x2ce800=['1747936CriSEn','2RhgbdQ','exit','15IyUQmL','1668246MxsJch','cwd','log','1241362oREEqo','32060VRMWbv','9594244IPbbsq','2345676dnEgIn','message','success','38605FtkkRV','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','error','2295VKFXoi','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','78MkrTbP'];a57_0x59bc=function(){return _0x2ce800;};return a57_0x59bc();}
1
+ function a57_0x31d3(_0x1f8e26,_0xd61d8e){_0x1f8e26=_0x1f8e26-0x1d6;const _0x3932a1=a57_0x3932();let _0x31d3b7=_0x3932a1[_0x1f8e26];return _0x31d3b7;}function a57_0x3932(){const _0x16bf2e=['5564785BcEMfc','8obxWhP','exit','success','11770398APUEgE','8pQaOhB','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','message','1179066Vytnvk','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','error','1130082CMKVdC','308951lkMuaP','5702610uTTREJ','cwd','9053373gCQigI','配置信息:','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','log'];a57_0x3932=function(){return _0x16bf2e;};return a57_0x3932();}(function(_0x1b3c7c,_0x5e3678){const _0x436d34=a57_0x31d3,_0x1283ac=_0x1b3c7c();while(!![]){try{const _0x331ca5=parseInt(_0x436d34(0x1d6))/0x1+-parseInt(_0x436d34(0x1e5))/0x2+-parseInt(_0x436d34(0x1e8))/0x3*(-parseInt(_0x436d34(0x1de))/0x4)+parseInt(_0x436d34(0x1dd))/0x5+-parseInt(_0x436d34(0x1d7))/0x6+-parseInt(_0x436d34(0x1d9))/0x7+-parseInt(_0x436d34(0x1e2))/0x8*(-parseInt(_0x436d34(0x1e1))/0x9);if(_0x331ca5===_0x5e3678)break;else _0x1283ac['push'](_0x1283ac['shift']());}catch(_0x179c44){_0x1283ac['push'](_0x1283ac['shift']());}}}(a57_0x3932,0x9ea53));import{configureCursorMcp as a57_0x15a779}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x192e4d=a57_0x31d3,_0x48c36d=process[_0x192e4d(0x1d8)](),_0x4c1331=await a57_0x15a779(_0x48c36d);_0x4c1331[_0x192e4d(0x1e0)]?(console[_0x192e4d(0x1dc)](_0x192e4d(0x1db)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1da)),console[_0x192e4d(0x1dc)]('\x20\x20'+_0x4c1331[_0x192e4d(0x1e4)]+'\x0a'),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e6)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e3)),process[_0x192e4d(0x1df)](0x0)):(console[_0x192e4d(0x1e7)]('\x0a错误:\x20配置失败\x20-\x20'+_0x4c1331['message']+'\x0a'),process['exit'](0x1));}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2c04aa,_0x2b681d){const _0x49dc7a=a58_0x24c0,_0xac0fd7=_0x2c04aa();while(!![]){try{const _0xd8fd50=parseInt(_0x49dc7a(0xe1))/0x1+parseInt(_0x49dc7a(0xec))/0x2*(-parseInt(_0x49dc7a(0xc1))/0x3)+-parseInt(_0x49dc7a(0xc3))/0x4*(-parseInt(_0x49dc7a(0xf0))/0x5)+parseInt(_0x49dc7a(0xee))/0x6+-parseInt(_0x49dc7a(0xe2))/0x7*(-parseInt(_0x49dc7a(0xd9))/0x8)+-parseInt(_0x49dc7a(0xbd))/0x9*(parseInt(_0x49dc7a(0xed))/0xa)+parseInt(_0x49dc7a(0xbe))/0xb;if(_0xd8fd50===_0x2b681d)break;else _0xac0fd7['push'](_0xac0fd7['shift']());}catch(_0x443994){_0xac0fd7['push'](_0xac0fd7['shift']());}}}(a58_0x337d,0x28753));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0xb81054,_0x52b1a1,_0x478449){const _0x4d5bc2=a58_0x24c0;logger[_0x4d5bc2(0xdd)](process[_0x4d5bc2(0xd8)]());if(_0x478449?.[_0x4d5bc2(0xdf)]||_0xb81054===_0x4d5bc2(0xe4)){showHelp();return;}_0xb81054!=='install'&&(console[_0x4d5bc2(0xe9)](_0x4d5bc2(0xc2)+(_0xb81054||_0x4d5bc2(0xd7))),console[_0x4d5bc2(0xd1)](_0x4d5bc2(0xeb)),console[_0x4d5bc2(0xd1)](_0x4d5bc2(0xbc)),console['log']('\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a'),logger[_0x4d5bc2(0xe9)]('mcp',_0x4d5bc2(0xcc)+_0xb81054),process[_0x4d5bc2(0xe7)](0x1));let _0xdc965d;if(_0x478449?.[_0x4d5bc2(0xc6)])_0xdc965d='cursor';else{if(_0x478449?.[_0x4d5bc2(0xd2)])_0xdc965d='claude';else{if(_0x52b1a1?.[0x0]){const _0x32670d=_0x52b1a1[0x0][_0x4d5bc2(0xdb)]();MCP_IDES['has'](_0x32670d)&&(_0xdc965d=_0x32670d);}}}await installMcp(_0xdc965d);}function showHelp(){const _0x24119c=a58_0x24c0;console[_0x24119c(0xd1)](_0x24119c(0xf1)+Array[_0x24119c(0xc4)](MCP_IDES)[_0x24119c(0xcd)]((_0x2d3752,_0x247868)=>'\x20\x20'+(_0x247868+0x1)+'.\x20'+IDE_CONFIGS[_0x2d3752][_0x24119c(0xea)]+_0x24119c(0xde)+IDE_CONFIGS[_0x2d3752][_0x24119c(0xc5)])[_0x24119c(0xcf)]('\x0a')+_0x24119c(0xd0));}function a58_0x24c0(_0x51ccf5,_0x133b93){_0x51ccf5=_0x51ccf5-0xbc;const _0x337dfb=a58_0x337d();let _0x24c07c=_0x337dfb[_0x51ccf5];return _0x24c07c;}async function selectIDE(){const _0x9eecaa=a58_0x24c0;console[_0x9eecaa(0xd1)](_0x9eecaa(0xda));const _0x284e8e=Array[_0x9eecaa(0xc4)](MCP_IDES);return _0x284e8e[_0x9eecaa(0xc8)]((_0x50db25,_0x224db0)=>{const _0x32671d=_0x9eecaa;console[_0x32671d(0xd1)]('\x20\x20'+(_0x224db0+0x1)+'.\x20'+IDE_CONFIGS[_0x50db25][_0x32671d(0xea)]+_0x32671d(0xde)+IDE_CONFIGS[_0x50db25][_0x32671d(0xc5)]);}),console[_0x9eecaa(0xd1)](_0x9eecaa(0xe5)),console[_0x9eecaa(0xd1)](_0x9eecaa(0xce)),new Promise(_0x1203f8=>{const _0x4f09c5=_0x9eecaa,_0x3ed57f=createInterface({'input':process[_0x4f09c5(0xc9)],'output':process[_0x4f09c5(0xbf)]});_0x3ed57f[_0x4f09c5(0xdc)]('请选择:\x20',_0x2d95a6=>{const _0x1dd8cd=_0x4f09c5;_0x3ed57f[_0x1dd8cd(0xd6)]();const _0x1a155c=_0x2d95a6[_0x1dd8cd(0xe8)]()[_0x1dd8cd(0xdb)]();(_0x1a155c==='q'||_0x1a155c===_0x1dd8cd(0xef)||_0x1a155c===_0x1dd8cd(0xe7))&&(console[_0x1dd8cd(0xd1)](_0x1dd8cd(0xca)),process[_0x1dd8cd(0xe7)](0x0));const _0x9480ff=parseInt(_0x1a155c,0xa);if(!isNaN(_0x9480ff)&&_0x9480ff>=0x1&&_0x9480ff<=_0x284e8e[_0x1dd8cd(0xd3)]){const _0x4bcf0e=_0x284e8e[_0x9480ff-0x1];_0x4bcf0e&&_0x1203f8(_0x4bcf0e);return;}console[_0x1dd8cd(0xd1)](_0x1dd8cd(0xcb)+_0x284e8e[_0x1dd8cd(0xd3)]+_0x1dd8cd(0xe0)),process[_0x1dd8cd(0xe7)](0x1);});});}function a58_0x337d(){const _0x1dc353=['7LvLxfi','message','--help','\x20\x20q.\x20取消\x0a','claude','exit','trim','error','name','\x0a可用命令:','20IBCxzI','920590GZVuMr','1061016zCCkPL','quit','4570glCyrR','\x0aLovrabet\x20MCP\x20-\x20MCP\x20服务器配置工具\x0a\x0a用法:\x0a\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息\x0a\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并配置\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20直接配置\x20Cursor\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20直接配置\x20Claude\x20Code\x20MCP\x0a\x0a配置方式:\x0a\x20\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20输入编号选择\x20IDE\x0a\x0a\x20\x20直接配置指定\x20IDE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接配置\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Claude\x20Code\x0a\x0a支持的\x20IDE:\x0a','cursor','\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP','9qKbeAV','433158wWauvY','stdout','mcp-install','37149HdUmmC','错误:\x20不支持的命令:\x20','428MdQtCD','from','description','mcpCursor','\x20MCP...\x0a','forEach','stdin','\x0a已取消配置\x0a','\x0a无效的选择,请输入\x201-','不支持的命令:\x20','map','请输入编号选择\x20IDE:\x0a','join','\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20交互式选择\x20IDE\x0a\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20直接配置\x20Cursor\x20MCP\x20(写入\x20.cursor/mcp.json)\x0a\x0a配置指南:\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','log','mcpClaude','length','\x0a错误:\x20配置失败\x20-\x20','配置失败','close','()','cwd','116168OphGwU','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','toLowerCase','question','setLogPath','\x20-\x20','help','\x20之间的数字\x0a','53071uFGWHb'];a58_0x337d=function(){return _0x1dc353;};return a58_0x337d();}async function installMcp(_0x221140){const _0x2252af=a58_0x24c0;let _0x9fca6e;!_0x221140?_0x9fca6e=await selectIDE():_0x9fca6e=_0x221140;try{const _0x311657=IDE_CONFIGS[_0x9fca6e];console[_0x2252af(0xd1)]('\x0a📦\x20正在配置\x20'+_0x311657[_0x2252af(0xea)]+_0x2252af(0xc7));switch(_0x9fca6e){case _0x2252af(0xf2):await configureCursorMcp();break;case _0x2252af(0xe6):await configureClaudeMcp();break;}}catch(_0x728e13){logger['error'](_0x2252af(0xc0),_0x2252af(0xd5),{'error':_0x728e13 instanceof Error?_0x728e13[_0x2252af(0xe3)]:String(_0x728e13)}),console['error'](_0x2252af(0xd4)+(_0x728e13 instanceof Error?_0x728e13[_0x2252af(0xe3)]:String(_0x728e13))+'\x0a'),process['exit'](0x1);}}
1
+ (function(_0x5605d1,_0x1f3dc6){const _0x3a40e8=a58_0x44e6,_0x33d6a7=_0x5605d1();while(!![]){try{const _0xe8b7d7=-parseInt(_0x3a40e8(0x1e5))/0x1+-parseInt(_0x3a40e8(0x1f0))/0x2+parseInt(_0x3a40e8(0x1d2))/0x3+-parseInt(_0x3a40e8(0x1eb))/0x4+parseInt(_0x3a40e8(0x1d0))/0x5+parseInt(_0x3a40e8(0x1ce))/0x6+parseInt(_0x3a40e8(0x1d1))/0x7;if(_0xe8b7d7===_0x1f3dc6)break;else _0x33d6a7['push'](_0x33d6a7['shift']());}catch(_0x1008e7){_0x33d6a7['push'](_0x33d6a7['shift']());}}}(a58_0x4db6,0x58381));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';function a58_0x44e6(_0x9f9b52,_0x49994e){_0x9f9b52=_0x9f9b52-0x1cd;const _0x4db6f3=a58_0x4db6();let _0x44e674=_0x4db6f3[_0x9f9b52];return _0x44e674;}function a58_0x4db6(){const _0x3b9497=['has','\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20交互式选择\x20IDE\x0a\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20直接配置\x20Cursor\x20MCP\x20(写入\x20.cursor/mcp.json)\x0a\x0a配置指南:\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','不支持的命令:\x20','\x0a📦\x20正在配置\x20','请输入编号选择\x20IDE:\x0a','length','1787898ZGxmds','description','1865175UCQYxe','2036629IftuUA','795903NpxYzx','exit','(空)','from','\x0a已取消配置\x0a','\x0aLovrabet\x20MCP\x20-\x20MCP\x20服务器配置工具\x0a\x0a用法:\x0a\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息\x0a\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并配置\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20直接配置\x20Cursor\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20直接配置\x20Claude\x20Code\x20MCP\x0a\x0a配置方式:\x0a\x20\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20输入编号选择\x20IDE\x0a\x0a\x20\x20直接配置指定\x20IDE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接配置\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Claude\x20Code\x0a\x0a支持的\x20IDE:\x0a','error','help','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','mcp-install','mcpClaude','\x20之间的数字\x0a','claude','join','stdin','stdout','message','请选择:\x20','quit','219577OnPbWj','forEach','cursor','close','配置失败','name','1355148BtksrB','错误:\x20不支持的命令:\x20','toLowerCase','log','cwd','615114MwCdqp','trim','mcp','question','install','map','\x20-\x20','--help'];a58_0x4db6=function(){return _0x3b9497;};return a58_0x4db6();}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x2ed278,_0xf3b409,_0x2fcab8){const _0x51fd1e=a58_0x44e6;logger['setLogPath'](process[_0x51fd1e(0x1ef)]());if(_0x2fcab8?.[_0x51fd1e(0x1d9)]||_0x2ed278===_0x51fd1e(0x1f7)){showHelp();return;}_0x2ed278!==_0x51fd1e(0x1f4)&&(console[_0x51fd1e(0x1d8)](_0x51fd1e(0x1ec)+(_0x2ed278||_0x51fd1e(0x1d4))),console[_0x51fd1e(0x1ee)]('\x0a可用命令:'),console[_0x51fd1e(0x1ee)]('\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP'),console['log']('\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a'),logger[_0x51fd1e(0x1d8)](_0x51fd1e(0x1f2),_0x51fd1e(0x1fa)+_0x2ed278),process[_0x51fd1e(0x1d3)](0x1));let _0x2b2e15;if(_0x2fcab8?.['mcpCursor'])_0x2b2e15='cursor';else{if(_0x2fcab8?.[_0x51fd1e(0x1dc)])_0x2b2e15=_0x51fd1e(0x1de);else{if(_0xf3b409?.[0x0]){const _0x2a83d1=_0xf3b409[0x0][_0x51fd1e(0x1ed)]();MCP_IDES[_0x51fd1e(0x1f8)](_0x2a83d1)&&(_0x2b2e15=_0x2a83d1);}}}await installMcp(_0x2b2e15);}function showHelp(){const _0x3c2d9f=a58_0x44e6;console['log'](_0x3c2d9f(0x1d7)+Array[_0x3c2d9f(0x1d5)](MCP_IDES)[_0x3c2d9f(0x1f5)]((_0x5abcd5,_0x570baa)=>'\x20\x20'+(_0x570baa+0x1)+'.\x20'+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1ea)]+_0x3c2d9f(0x1f6)+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1cf)])[_0x3c2d9f(0x1df)]('\x0a')+_0x3c2d9f(0x1f9));}async function selectIDE(){const _0x40543b=a58_0x44e6;console[_0x40543b(0x1ee)](_0x40543b(0x1da));const _0x3bf265=Array[_0x40543b(0x1d5)](MCP_IDES);return _0x3bf265[_0x40543b(0x1e6)]((_0xd5fab6,_0x26bd18)=>{const _0x468d3d=_0x40543b;console[_0x468d3d(0x1ee)]('\x20\x20'+(_0x26bd18+0x1)+'.\x20'+IDE_CONFIGS[_0xd5fab6]['name']+_0x468d3d(0x1f6)+IDE_CONFIGS[_0xd5fab6]['description']);}),console[_0x40543b(0x1ee)]('\x20\x20q.\x20取消\x0a'),console[_0x40543b(0x1ee)](_0x40543b(0x1fc)),new Promise(_0x3bed1e=>{const _0x351c33=_0x40543b,_0x16653f=createInterface({'input':process[_0x351c33(0x1e0)],'output':process[_0x351c33(0x1e1)]});_0x16653f[_0x351c33(0x1f3)](_0x351c33(0x1e3),_0x43677e=>{const _0x1737c9=_0x351c33;_0x16653f[_0x1737c9(0x1e8)]();const _0x1eda65=_0x43677e[_0x1737c9(0x1f1)]()['toLowerCase']();(_0x1eda65==='q'||_0x1eda65===_0x1737c9(0x1e4)||_0x1eda65===_0x1737c9(0x1d3))&&(console['log'](_0x1737c9(0x1d6)),process[_0x1737c9(0x1d3)](0x0));const _0xa2b32e=parseInt(_0x1eda65,0xa);if(!isNaN(_0xa2b32e)&&_0xa2b32e>=0x1&&_0xa2b32e<=_0x3bf265['length']){const _0x5bae03=_0x3bf265[_0xa2b32e-0x1];_0x5bae03&&_0x3bed1e(_0x5bae03);return;}console[_0x1737c9(0x1ee)]('\x0a无效的选择,请输入\x201-'+_0x3bf265[_0x1737c9(0x1cd)]+_0x1737c9(0x1dd)),process[_0x1737c9(0x1d3)](0x1);});});}async function installMcp(_0x5aaa63){const _0x44a620=a58_0x44e6;let _0x1d620e;!_0x5aaa63?_0x1d620e=await selectIDE():_0x1d620e=_0x5aaa63;try{const _0xeb878a=IDE_CONFIGS[_0x1d620e];console[_0x44a620(0x1ee)](_0x44a620(0x1fb)+_0xeb878a[_0x44a620(0x1ea)]+'\x20MCP...\x0a');switch(_0x1d620e){case _0x44a620(0x1e7):await configureCursorMcp();break;case _0x44a620(0x1de):await configureClaudeMcp();break;}}catch(_0x21aacb){logger[_0x44a620(0x1d8)](_0x44a620(0x1db),_0x44a620(0x1e9),{'error':_0x21aacb instanceof Error?_0x21aacb[_0x44a620(0x1e2)]:String(_0x21aacb)}),console[_0x44a620(0x1d8)]('\x0a错误:\x20配置失败\x20-\x20'+(_0x21aacb instanceof Error?_0x21aacb['message']:String(_0x21aacb))+'\x0a'),process[_0x44a620(0x1d3)](0x1);}}
@@ -1 +1 @@
1
- function a59_0x43f2(){const _0x5c2c0f=['32825468OzBdss','\x20MCP\x20配置成功','log','\x0a✗\x20','error','success','mcp-install-non-interactive','claude','20UQLmNV','push','filter','20Phextl','12zjTKtb','1403fwBMLn','\x20MCP\x20配置失败:\x20','282amubMo','3856779Nuyhdd','683916csFHeu','579944KHqkZw','\x0a注意:部分配置需要手动执行命令,请按照上述说明操作','91vcdlvo','其他\x20IDE','1366VexTkg','124365LKTkjS','message','Cursor','cwd','cursor','length','Claude\x20Code','18996791diQOUL','开始配置\x20MCP','other','some','未知的\x20IDE:\x20','\x0a✓\x20MCP\x20配置完成\x20(','setLogPath'];a59_0x43f2=function(){return _0x5c2c0f;};return a59_0x43f2();}const a59_0x3184f7=a59_0x5610;(function(_0x944d11,_0x5499fa){const _0x2e4b99=a59_0x5610,_0x1f4126=_0x944d11();while(!![]){try{const _0x4210c5=-parseInt(_0x2e4b99(0xd9))/0x1*(parseInt(_0x2e4b99(0xe2))/0x2)+-parseInt(_0x2e4b99(0xdd))/0x3*(parseInt(_0x2e4b99(0xd7))/0x4)+parseInt(_0x2e4b99(0xe3))/0x5*(-parseInt(_0x2e4b99(0xdb))/0x6)+-parseInt(_0x2e4b99(0xe0))/0x7*(parseInt(_0x2e4b99(0xde))/0x8)+parseInt(_0x2e4b99(0xdc))/0x9*(parseInt(_0x2e4b99(0xd4))/0xa)+-parseInt(_0x2e4b99(0xc5))/0xb*(-parseInt(_0x2e4b99(0xd8))/0xc)+parseInt(_0x2e4b99(0xcc))/0xd;if(_0x4210c5===_0x5499fa)break;else _0x1f4126['push'](_0x1f4126['shift']());}catch(_0x1e8880){_0x1f4126['push'](_0x1f4126['shift']());}}}(a59_0x43f2,0xdb9ca));function a59_0x5610(_0x43e2fc,_0x49ba23){_0x43e2fc=_0x43e2fc-0xc2;const _0x43f201=a59_0x43f2();let _0x5610da=_0x43f201[_0x43e2fc];return _0x5610da;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x42e615,_0x290813=process[a59_0x3184f7(0xe6)]()){const _0x3e9dd4=a59_0x3184f7;logger[_0x3e9dd4(0xcb)](_0x290813),logger['info'](_0x3e9dd4(0xd2),_0x3e9dd4(0xc6),{'ides':_0x42e615});const _0x667b04=[];for(const _0x2ab665 of _0x42e615){try{let _0x4adb2b;switch(_0x2ab665){case _0x3e9dd4(0xc2):_0x4adb2b=await configureCursorMcp(_0x290813);break;case _0x3e9dd4(0xd3):_0x4adb2b=configureClaudeMcp(_0x290813);break;case _0x3e9dd4(0xc7):_0x4adb2b=showOtherMcpGuide(_0x290813);break;default:_0x4adb2b={'success':![],'message':_0x3e9dd4(0xc9)+_0x2ab665};}_0x667b04[_0x3e9dd4(0xd5)](_0x4adb2b);if(_0x4adb2b[_0x3e9dd4(0xd1)]){const _0x3df3e6=_0x2ab665===_0x3e9dd4(0xc2)?_0x3e9dd4(0xe5):_0x2ab665==='claude'?_0x3e9dd4(0xc4):_0x3e9dd4(0xe1);console[_0x3e9dd4(0xce)]('\x0a✓\x20'+_0x3df3e6+_0x3e9dd4(0xcd)),console[_0x3e9dd4(0xce)]('\x20\x20'+_0x4adb2b[_0x3e9dd4(0xe4)]);}else console[_0x3e9dd4(0xd0)](_0x3e9dd4(0xcf)+_0x2ab665+_0x3e9dd4(0xda)+_0x4adb2b[_0x3e9dd4(0xe4)]);}catch(_0x42414f){console[_0x3e9dd4(0xd0)](_0x3e9dd4(0xcf)+_0x2ab665+_0x3e9dd4(0xda)+(_0x42414f instanceof Error?_0x42414f[_0x3e9dd4(0xe4)]:String(_0x42414f)));}}const _0xf8c17c=_0x667b04[_0x3e9dd4(0xd6)](_0x217ea4=>_0x217ea4[_0x3e9dd4(0xd1)])[_0x3e9dd4(0xc3)],_0x1b8bf9=_0x667b04[_0x3e9dd4(0xc3)];console[_0x3e9dd4(0xce)](_0x3e9dd4(0xca)+_0xf8c17c+'/'+_0x1b8bf9+'\x20成功)');const _0x4cf7af=_0x667b04[_0x3e9dd4(0xc8)](_0x34f86b=>_0x34f86b['needsManualAction']);_0x4cf7af&&console[_0x3e9dd4(0xce)](_0x3e9dd4(0xdf));}
1
+ (function(_0x29cac8,_0x1b3bac){const _0x39ce64=a59_0x4fea,_0xc5df02=_0x29cac8();while(!![]){try{const _0x5d83e6=-parseInt(_0x39ce64(0xa4))/0x1*(-parseInt(_0x39ce64(0xa8))/0x2)+parseInt(_0x39ce64(0xa5))/0x3+-parseInt(_0x39ce64(0xa7))/0x4+parseInt(_0x39ce64(0x9e))/0x5*(-parseInt(_0x39ce64(0x97))/0x6)+parseInt(_0x39ce64(0xa2))/0x7*(-parseInt(_0x39ce64(0x9d))/0x8)+parseInt(_0x39ce64(0x99))/0x9+-parseInt(_0x39ce64(0xa6))/0xa*(-parseInt(_0x39ce64(0x9b))/0xb);if(_0x5d83e6===_0x1b3bac)break;else _0xc5df02['push'](_0xc5df02['shift']());}catch(_0x953745){_0xc5df02['push'](_0xc5df02['shift']());}}}(a59_0x784c,0x2bb04));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a59_0x784c(){const _0x5d7dba=['\x20成功)','setLogPath','35TVHVSQ','message','2wOexdM','460980FGvKom','190AUuibf','427424DJtRbD','169256SJQtIW','length','info','其他\x20IDE','needsManualAction','\x20MCP\x20配置成功','error','success','other','some','\x0a✗\x20','\x0a✓\x20','\x20MCP\x20配置失败:\x20','33438QzBuQL','cursor','481599eVqmOf','filter','249238flsYeo','mcp-install-non-interactive','387960brXyYn','250FJruId','log'];a59_0x784c=function(){return _0x5d7dba;};return a59_0x784c();}function a59_0x4fea(_0x353005,_0x4d4a7e){_0x353005=_0x353005-0x91;const _0x784c5f=a59_0x784c();let _0x4fea50=_0x784c5f[_0x353005];return _0x4fea50;}export async function installMcpNonInteractive(_0x4d0972,_0x3f04e6=process['cwd']()){const _0x147331=a59_0x4fea;logger[_0x147331(0xa1)](_0x3f04e6),logger[_0x147331(0xaa)](_0x147331(0x9c),'开始配置\x20MCP',{'ides':_0x4d0972});const _0x2682eb=[];for(const _0x509da4 of _0x4d0972){try{let _0x236ce6;switch(_0x509da4){case'cursor':_0x236ce6=await configureCursorMcp(_0x3f04e6);break;case'claude':_0x236ce6=configureClaudeMcp(_0x3f04e6);break;case _0x147331(0x92):_0x236ce6=showOtherMcpGuide(_0x3f04e6);break;default:_0x236ce6={'success':![],'message':'未知的\x20IDE:\x20'+_0x509da4};}_0x2682eb['push'](_0x236ce6);if(_0x236ce6[_0x147331(0x91)]){const _0x1386f8=_0x509da4===_0x147331(0x98)?'Cursor':_0x509da4==='claude'?'Claude\x20Code':_0x147331(0xab);console[_0x147331(0x9f)](_0x147331(0x95)+_0x1386f8+_0x147331(0xad)),console['log']('\x20\x20'+_0x236ce6[_0x147331(0xa3)]);}else console[_0x147331(0xae)]('\x0a✗\x20'+_0x509da4+_0x147331(0x96)+_0x236ce6[_0x147331(0xa3)]);}catch(_0x5ee7c6){console[_0x147331(0xae)](_0x147331(0x94)+_0x509da4+_0x147331(0x96)+(_0x5ee7c6 instanceof Error?_0x5ee7c6[_0x147331(0xa3)]:String(_0x5ee7c6)));}}const _0x4d8db1=_0x2682eb[_0x147331(0x9a)](_0x1a2da5=>_0x1a2da5['success'])[_0x147331(0xa9)],_0xe05d6c=_0x2682eb[_0x147331(0xa9)];console['log']('\x0a✓\x20MCP\x20配置完成\x20('+_0x4d8db1+'/'+_0xe05d6c+_0x147331(0xa0));const _0x5bfc37=_0x2682eb[_0x147331(0x93)](_0x1acfae=>_0x1acfae[_0x147331(0xac)]);_0x5bfc37&&console[_0x147331(0x9f)]('\x0a注意:部分配置需要手动执行命令,请按照上述说明操作');}