@lovrabet/cli 1.3.0 → 1.3.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -0
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x193dc5,_0x4926b5){const _0x1ca19c=a44_0x42ff,_0x4ef2ed=_0x193dc5();while(!![]){try{const _0x3c2d96=parseInt(_0x1ca19c(0x147))/0x1*(parseInt(_0x1ca19c(0x144))/0x2)+parseInt(_0x1ca19c(0x13f))/0x3+-parseInt(_0x1ca19c(0x14a))/0x4+parseInt(_0x1ca19c(0x12a))/0x5*(-parseInt(_0x1ca19c(0x122))/0x6)+parseInt(_0x1ca19c(0x143))/0x7+parseInt(_0x1ca19c(0x137))/0x8*(-parseInt(_0x1ca19c(0x124))/0x9)+parseInt(_0x1ca19c(0x138))/0xa*(parseInt(_0x1ca19c(0x132))/0xb);if(_0x3c2d96===_0x4926b5)break;else _0x4ef2ed['push'](_0x4ef2ed['shift']());}catch(_0x383126){_0x4ef2ed['push'](_0x4ef2ed['shift']());}}}(a44_0x37d2,0x919e0));import a44_0x554267 from'path';import{fileURLToPath}from'url';import a44_0x5a7c12 from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';function a44_0x37d2(){const _0x4ca2d3=['description','env','2648808jyVzqj','23160MGJjOu','\x20\x20√\x20环境配置完成','stringify','bun\x20--version','\x20\x20lovrabet\x20start\x0a','×\x20项目名不能为空','dirname','3113991ODQJkp','×\x20项目创建失败:\x20','join','constants','2290057MFWwJg','87272inHoFg','\x20创建成功!','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','26CkMpRg','package.json','W_OK','4268692KvEBFY','\x0a√\x20项目\x20','*\x20正在创建项目\x20','\x20\x20√\x20package.json\x20已更新','access','\x0a\x20\x20cd\x20','依赖安装失败:\x20','length','\x20已存在,请使用其他项目名','resolve','error','bun\x20run\x20format','66WaGsvX','name','27QeJZpV','exit','log','cwd','test','utf-8','22220YjSQPm','\x20install','writeFile','×\x20项目目录\x20','×\x20项目名过长,最多支持\x20100\x20个字符','bun','parse','\x20\x20√\x20项目模板已创建','979VRIkZi','\x20\x20√\x20代码已格式化','npm'];a44_0x37d2=function(){return _0x4ca2d3;};return a44_0x37d2();}import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x29fb01=a44_0x42ff,_0xf74c23=fileURLToPath(import.meta.url),_0x562117=a44_0x554267[_0x29fb01(0x13e)](_0xf74c23);return a44_0x554267[_0x29fb01(0x11f)](_0x562117,'../../templates/projects/sub-app-react-demo');}export async function createProjectNonInteractive(_0x176feb,_0x414c59){const _0xb076da=a44_0x42ff,_0x5a024b=await checkCliVersion();_0x5a024b['needsUpgrade']&&printCliUpgradeWarning(_0x5a024b);(!_0x176feb||_0x176feb['trim']()==='')&&(console[_0xb076da(0x120)](_0xb076da(0x13d)),process[_0xb076da(0x125)](0x1));const _0x4f5e1d=/[<>:"|?*\x00-\x1f\x7f]/;_0x4f5e1d[_0xb076da(0x128)](_0x176feb)&&(console['error']('×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符'),process[_0xb076da(0x125)](0x1));_0x176feb[_0xb076da(0x11d)]>0x64&&(console[_0xb076da(0x120)](_0xb076da(0x12e)),process[_0xb076da(0x125)](0x1));const _0xcfea37=a44_0x554267[_0xb076da(0x11f)](process[_0xb076da(0x127)](),_0x176feb);existsSync(_0xcfea37)&&(console[_0xb076da(0x120)](_0xb076da(0x12d)+_0x176feb+_0xb076da(0x11e)),process[_0xb076da(0x125)](0x1));try{const _0x1e7923=a44_0x554267['dirname'](_0xcfea37);await a44_0x5a7c12[_0xb076da(0x11a)](_0x1e7923,a44_0x5a7c12[_0xb076da(0x142)][_0xb076da(0x149)]);}catch(_0x4a8b1e){console[_0xb076da(0x120)]('×\x20无法在当前目录创建项目,请检查目录权限'),process['exit'](0x1);}try{console[_0xb076da(0x126)](_0xb076da(0x118)+_0x176feb+'...');const _0x4a608c=getTemplateDir();await copyDirectory(_0x4a608c,_0xcfea37),console[_0xb076da(0x126)](_0xb076da(0x131)),await updatePackageJsonName(_0x176feb),console[_0xb076da(0x126)](_0xb076da(0x119)),console['log']('\x20\x20正在安装依赖...'),console[_0xb076da(0x126)]('\x20\x20√\x20依赖安装跳过(非交互模式)'),await formatCode(_0xcfea37),console[_0xb076da(0x126)](_0xb076da(0x133)),await configureAppEnv(_0x176feb,_0x414c59),console[_0xb076da(0x126)](_0xb076da(0x139)),console[_0xb076da(0x126)](_0xb076da(0x14b)+_0x176feb+_0xb076da(0x145)),console[_0xb076da(0x126)](_0xb076da(0x11b)+_0x176feb),console[_0xb076da(0x126)](_0xb076da(0x13c));}catch(_0x2e932c){const _0x2bc8b5=_0x2e932c instanceof Error?_0x2e932c['message']:String(_0x2e932c);try{existsSync(_0xcfea37)&&await a44_0x5a7c12['rm'](_0xcfea37,{'recursive':!![],'force':!![]});}catch{}console[_0xb076da(0x120)](_0xb076da(0x140)+_0x2bc8b5),process[_0xb076da(0x125)](0x1);}}async function updatePackageJsonName(_0x10ebc5){const _0x549065=a44_0x42ff,_0x336b25=a44_0x554267[_0x549065(0x11f)](process[_0x549065(0x127)](),_0x10ebc5),_0x5bd658=a44_0x554267[_0x549065(0x141)](_0x336b25,_0x549065(0x148)),_0x4e4aab=await a44_0x5a7c12['readFile'](_0x5bd658,'utf-8'),_0x1f81a0=JSON[_0x549065(0x130)](_0x4e4aab);_0x1f81a0[_0x549065(0x123)]=_0x10ebc5,_0x1f81a0[_0x549065(0x135)]=_0x549065(0x146),await a44_0x5a7c12['writeFile'](_0x5bd658,JSON[_0x549065(0x13a)](_0x1f81a0,null,0x2)+'\x0a');}function a44_0x42ff(_0x447432,_0x3eb2f4){_0x447432=_0x447432-0x118;const _0x37d281=a44_0x37d2();let _0x42ff11=_0x37d281[_0x447432];return _0x42ff11;}async function installDependencies(_0x38a10a){const _0x51d0f8=a44_0x42ff,_0x2da25e=detectPackageManager(),_0x174820=_0x2da25e+_0x51d0f8(0x12b);try{await execAsync(_0x174820,{'cwd':_0x38a10a});}catch(_0x57b783){throw new Error(_0x51d0f8(0x11c)+_0x57b783);}}function detectPackageManager(){const _0x44bafb=a44_0x42ff;try{return execAsync(_0x44bafb(0x13b),{}),_0x44bafb(0x12f);}catch{return _0x44bafb(0x134);}}async function formatCode(_0x109c08){const _0x3e44ed=a44_0x42ff;try{await execAsync(_0x3e44ed(0x121),{'cwd':_0x109c08});}catch{}}async function configureAppEnv(_0x3d83ce,_0x214428){const _0x1e4895=a44_0x42ff,_0x266937=a44_0x554267[_0x1e4895(0x11f)](process[_0x1e4895(0x127)](),_0x3d83ce),_0x200386=a44_0x554267['join'](_0x266937,'lovrabet.config.json');let _0x4819ff={};if(existsSync(_0x200386)){const _0x343b90=await a44_0x5a7c12['readFile'](_0x200386,_0x1e4895(0x129));_0x4819ff=JSON[_0x1e4895(0x130)](_0x343b90);}_0x214428&&(_0x4819ff[_0x1e4895(0x136)]=_0x214428),await a44_0x5a7c12[_0x1e4895(0x12c)](_0x200386,JSON[_0x1e4895(0x13a)](_0x4819ff,null,0x2)+'\x0a');}
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 +1 @@
1
- function a45_0x551f(){var _0x453477=['8SCNkuD','5949108mHsadn','207oBAqcf','3fSwqMn','green','elapsed','913074NZHVbV','423596baOsuU','24630deuVPR','9114448IwSLyj','\x20√\x20','taskName','6265715AEqjKV','864112AJdGdp'];a45_0x551f=function(){return _0x453477;};return a45_0x551f();}(function(_0x29d0ec,_0x5022d3){var _0x32ea49=a45_0x2cc6,_0x1a297b=_0x29d0ec();while(!![]){try{var _0x207549=parseInt(_0x32ea49(0x11e))/0x1+-parseInt(_0x32ea49(0x11d))/0x2+-parseInt(_0x32ea49(0x128))/0x3*(parseInt(_0x32ea49(0x124))/0x4)+-parseInt(_0x32ea49(0x123))/0x5+parseInt(_0x32ea49(0x126))/0x6+parseInt(_0x32ea49(0x120))/0x7*(parseInt(_0x32ea49(0x125))/0x8)+parseInt(_0x32ea49(0x127))/0x9*(-parseInt(_0x32ea49(0x11f))/0xa);if(_0x207549===_0x5022d3)break;else _0x1a297b['push'](_0x1a297b['shift']());}catch(_0x472d6f){_0x1a297b['push'](_0x1a297b['shift']());}}}(a45_0x551f,0xb3665));import{jsx as a45_0x9b276d,jsxs as a45_0x3eb2f1}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';function a45_0x2cc6(_0x45fbfb,_0x56fa24){_0x45fbfb=_0x45fbfb-0x11c;var _0x551fab=a45_0x551f();var _0x2cc67c=_0x551fab[_0x45fbfb];return _0x2cc67c;}export function TaskFinished(_0x1ddc37){var _0x2c99ef=a45_0x2cc6;return a45_0x3eb2f1(Box,{'children':[a45_0x9b276d(Box,{'width':'1'}),a45_0x9b276d(Text,{'color':_0x2c99ef(0x129),'children':_0x2c99ef(0x121)}),a45_0x9b276d(Text,{'children':_0x1ddc37[_0x2c99ef(0x122)]}),a45_0x9b276d(TaskTime,{'elapsed':_0x1ddc37[_0x2c99ef(0x11c)]})]});}
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 +1 @@
1
- (function(_0xabc23b,_0xcc1450){var _0x38a893=a46_0x1ce8,_0xd7c8e6=_0xabc23b();while(!![]){try{var _0x200ea3=parseInt(_0x38a893(0xf7))/0x1*(parseInt(_0x38a893(0xf1))/0x2)+-parseInt(_0x38a893(0xfc))/0x3+parseInt(_0x38a893(0xf9))/0x4*(parseInt(_0x38a893(0xfe))/0x5)+parseInt(_0x38a893(0xf8))/0x6+parseInt(_0x38a893(0xfb))/0x7*(parseInt(_0x38a893(0xf0))/0x8)+-parseInt(_0x38a893(0xf3))/0x9+-parseInt(_0x38a893(0xf4))/0xa;if(_0x200ea3===_0xcc1450)break;else _0xd7c8e6['push'](_0xd7c8e6['shift']());}catch(_0x58cdfd){_0xd7c8e6['push'](_0xd7c8e6['shift']());}}}(a46_0x2292,0x887a8));function a46_0x2292(){var _0x4341ac=['finished','295520ToQbBR','6KOpEOs','loading','1795401rPFWEJ','10764930wIRgjz','\x20√\x20','green','212369IfONou','5894688tZLTAG','480812eoMyIh','\x20\x20\x20','105kLNrDP','1376580gZKhnl','dots','5kbaUoD'];a46_0x2292=function(){return _0x4341ac;};return a46_0x2292();}import{jsx as a46_0x39fb96,jsxs as a46_0xe5c85f}from'react/jsx-runtime';function a46_0x1ce8(_0x24b0c9,_0x51cd93){_0x24b0c9=_0x24b0c9-0xef;var _0x229260=a46_0x2292();var _0x1ce8a3=_0x229260[_0x24b0c9];return _0x1ce8a3;}import{Text}from'ink';import a46_0x29bc2b from'ink-spinner';export function TaskLoading(_0x5718d5){var _0x3bb2eb=a46_0x1ce8;if(_0x5718d5[_0x3bb2eb(0xef)])return a46_0x39fb96(Text,{'color':_0x3bb2eb(0xf6),'children':_0x3bb2eb(0xf5)});if(_0x5718d5[_0x3bb2eb(0xf2)])return a46_0xe5c85f(Text,{'color':'green','children':['\x20',a46_0x39fb96(a46_0x29bc2b,{'type':_0x3bb2eb(0xfd)}),'\x20']});return a46_0x39fb96(Text,{'children':_0x3bb2eb(0xfa)});}
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 +1 @@
1
- (function(_0x34600b,_0x442ab3){var _0x1e9eda=a47_0x538b,_0x1a2066=_0x34600b();while(!![]){try{var _0xfa6535=parseInt(_0x1e9eda(0x1d8))/0x1+-parseInt(_0x1e9eda(0x1d6))/0x2+-parseInt(_0x1e9eda(0x1db))/0x3*(parseInt(_0x1e9eda(0x1e1))/0x4)+-parseInt(_0x1e9eda(0x1df))/0x5*(parseInt(_0x1e9eda(0x1dc))/0x6)+-parseInt(_0x1e9eda(0x1d7))/0x7*(parseInt(_0x1e9eda(0x1da))/0x8)+parseInt(_0x1e9eda(0x1d9))/0x9*(-parseInt(_0x1e9eda(0x1dd))/0xa)+parseInt(_0x1e9eda(0x1e0))/0xb;if(_0xfa6535===_0x442ab3)break;else _0x1a2066['push'](_0x1a2066['shift']());}catch(_0xb8d208){_0x1a2066['push'](_0x1a2066['shift']());}}}(a47_0x598f,0x89c6e));import{jsx as a47_0x3a5a69,jsxs as a47_0x52d776}from'react/jsx-runtime';import{Box,Text}from'ink';function a47_0x538b(_0x5e3a20,_0x322b62){_0x5e3a20=_0x5e3a20-0x1d5;var _0x598fcc=a47_0x598f();var _0x538b69=_0x598fcc[_0x5e3a20];return _0x538b69;}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';function a47_0x598f(){var _0xdd6b3e=['elapsed','134705IQqbyi','27298172SfNBOf','497620PyqvTE','taskName','36312PkAYeI','2359nuBAEz','324960ScEloE','72xtnyNl','8888qibYTi','24xVbkAX','138qhjDCe','293540VMaNHA'];a47_0x598f=function(){return _0xdd6b3e;};return a47_0x598f();}export function TaskRunning(_0x30c28a){var _0x2c4348=a47_0x538b;return a47_0x52d776(Box,{'children':[a47_0x3a5a69(Box,{'width':'1'}),a47_0x3a5a69(TaskLoading,{..._0x30c28a}),a47_0x3a5a69(Text,{'children':_0x30c28a[_0x2c4348(0x1d5)]}),a47_0x3a5a69(TaskTime,{'elapsed':_0x30c28a[_0x2c4348(0x1de)]})]});}
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 +1 @@
1
- (function(_0x2c7340,_0x3cd756){var _0x1703c4=a48_0x26c1,_0x2d5cfb=_0x2c7340();while(!![]){try{var _0x1161ae=-parseInt(_0x1703c4(0x110))/0x1+-parseInt(_0x1703c4(0x11a))/0x2+-parseInt(_0x1703c4(0x111))/0x3*(parseInt(_0x1703c4(0x112))/0x4)+parseInt(_0x1703c4(0x117))/0x5+parseInt(_0x1703c4(0x116))/0x6*(-parseInt(_0x1703c4(0x114))/0x7)+-parseInt(_0x1703c4(0x10e))/0x8*(parseInt(_0x1703c4(0x119))/0x9)+-parseInt(_0x1703c4(0x113))/0xa*(-parseInt(_0x1703c4(0x10f))/0xb);if(_0x1161ae===_0x3cd756)break;else _0x2d5cfb['push'](_0x2d5cfb['shift']());}catch(_0xdbe18a){_0x2d5cfb['push'](_0x2d5cfb['shift']());}}}(a48_0x4c23,0x41394));import{jsx as a48_0x367b0a,Fragment as a48_0x2fa241,jsxs as a48_0x3048bd}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x27cd37){var _0x2ad50e=a48_0x26c1;if(_0x27cd37['elapsed'])return a48_0x3048bd(a48_0x2fa241,{'children':[a48_0x367b0a(Text,{'color':_0x2ad50e(0x118),'children':'\x20['}),a48_0x367b0a(Text,{'color':_0x2ad50e(0x118),'bold':!![],'children':_0x27cd37[_0x2ad50e(0x115)]}),a48_0x367b0a(Text,{'color':_0x2ad50e(0x118),'children':']'})]});return null;}function a48_0x26c1(_0x571403,_0x42113a){_0x571403=_0x571403-0x10e;var _0x4c23a3=a48_0x4c23();var _0x26c1c0=_0x4c23a3[_0x571403];return _0x26c1c0;}function a48_0x4c23(){var _0x441d6e=['gray','23589lSKxJu','498822qlMdHV','1544knQQep','25927LivmQf','30217fEuVqZ','12HxGmtr','436904wniqxB','6810SVdsCn','737429xAJoNj','elapsed','24qWyRlQ','1529060XdTPmJ'];a48_0x4c23=function(){return _0x441d6e;};return a48_0x4c23();}
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 +1 @@
1
- const a49_0x54bf7e=a49_0x219f;(function(_0x50d042,_0x2e2697){const _0x5960b9=a49_0x219f,_0x47b71c=_0x50d042();while(!![]){try{const _0x92064=parseInt(_0x5960b9(0x1cb))/0x1*(parseInt(_0x5960b9(0x1c4))/0x2)+-parseInt(_0x5960b9(0x1cd))/0x3*(parseInt(_0x5960b9(0x1d0))/0x4)+-parseInt(_0x5960b9(0x1be))/0x5*(parseInt(_0x5960b9(0x1c7))/0x6)+parseInt(_0x5960b9(0x1ba))/0x7*(-parseInt(_0x5960b9(0x1b8))/0x8)+parseInt(_0x5960b9(0x1c5))/0x9+parseInt(_0x5960b9(0x1cf))/0xa*(parseInt(_0x5960b9(0x1c1))/0xb)+-parseInt(_0x5960b9(0x1c3))/0xc*(-parseInt(_0x5960b9(0x1ce))/0xd);if(_0x92064===_0x2e2697)break;else _0x47b71c['push'](_0x47b71c['shift']());}catch(_0x4493bc){_0x47b71c['push'](_0x47b71c['shift']());}}}(a49_0x4664,0x288b6));import a49_0x502e5f from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a49_0x4664(){const _0x4cae83=['项目模板复制完成','now','5CvxBfe','项目模板复制失败','cwd','22TbFUXq','复制项目文件','1031508ESmgJe','4064MbaRSL','556650IAuboR','dirname','483144pvJNFF','copy','开始复制项目模板','resolve','1mFGFsm','success','294834azoIsQ','39PVstVB','1287850pbiUKj','12IHxyNi','info','303208OrYPwB','../../templates/projects/sub-app-react-demo','7gVVMTy','message'];a49_0x4664=function(){return _0x4cae83;};return a49_0x4664();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a49_0x219f(_0x4ddbd6,_0x367e81){_0x4ddbd6=_0x4ddbd6-0x1b7;const _0x4664be=a49_0x4664();let _0x219f5f=_0x4664be[_0x4ddbd6];return _0x219f5f;}const __dirname=a49_0x502e5f[a49_0x54bf7e(0x1c6)](fileURLToPath(import.meta.url)),templateDir=a49_0x502e5f['resolve'](__dirname,a49_0x54bf7e(0x1b9));export function useCopyProjectTemplate(){const _0x496059=a49_0x54bf7e,[_0x244c8d,_0x183744]=useState(![]),[_0x229cbf,_0x20877c]=useState(![]),[_0x496fa2,_0x5389ec]=useState(''),_0xc6e0e0=useCallback(async _0x123628=>{const _0x189c67=a49_0x219f,_0x48bc0b=Date[_0x189c67(0x1bd)](),_0x4305b5=a49_0x502e5f[_0x189c67(0x1ca)](process[_0x189c67(0x1c0)](),_0x123628);_0x183744(!![]);try{logger[_0x189c67(0x1b7)](_0x189c67(0x1c8),_0x189c67(0x1c9),{'projectCode':_0x123628,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4305b5);const _0x34e38c=Date['now']()-_0x48bc0b;logger[_0x189c67(0x1cc)]('copy',_0x189c67(0x1bc),_0x34e38c,{'projectCode':_0x123628});}catch(_0x3d94ea){const _0x47416=Date[_0x189c67(0x1bd)]()-_0x48bc0b;logger['error'](_0x189c67(0x1c8),_0x189c67(0x1bf),{'projectCode':_0x123628,'error':_0x3d94ea instanceof Error?_0x3d94ea[_0x189c67(0x1bb)]:String(_0x3d94ea),'duration':_0x47416});throw _0x3d94ea;}finally{_0x183744(![]),_0x20877c(!![]),_0x5389ec(formatElapsed(_0x48bc0b));}},[]);return{'taskName':_0x496059(0x1c2),'finished':_0x229cbf,'loading':_0x244c8d,'elapsed':_0x496fa2,'doTask':_0xc6e0e0};}
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 +1 @@
1
- (function(_0x15d64a,_0x532a97){const _0x33fe76=a50_0x40c7,_0xaa2f6b=_0x15d64a();while(!![]){try{const _0x4997c6=-parseInt(_0x33fe76(0xdc))/0x1*(parseInt(_0x33fe76(0xcc))/0x2)+parseInt(_0x33fe76(0xd6))/0x3*(parseInt(_0x33fe76(0xc8))/0x4)+-parseInt(_0x33fe76(0xcd))/0x5+parseInt(_0x33fe76(0xcf))/0x6*(-parseInt(_0x33fe76(0xce))/0x7)+parseInt(_0x33fe76(0xd8))/0x8+parseInt(_0x33fe76(0xdb))/0x9+parseInt(_0x33fe76(0xc9))/0xa;if(_0x4997c6===_0x532a97)break;else _0xaa2f6b['push'](_0xaa2f6b['shift']());}catch(_0x533c2e){_0xaa2f6b['push'](_0xaa2f6b['shift']());}}}(a50_0x31d6,0x80d9c));function a50_0x40c7(_0xe223f9,_0x3a038a){_0xe223f9=_0xe223f9-0xc7;const _0x31d6b8=a50_0x31d6();let _0x40c71b=_0x31d6b8[_0xe223f9];return _0x40c71b;}import a50_0x1b2ad0 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 useFormatCode(){const _0x54c4e5=a50_0x40c7,[_0x57427a,_0x36f1be]=useState(![]),[_0x4ba0ec,_0x1bf96f]=useState(![]),[_0x3bfae2,_0x15e968]=useState(''),_0x11e245=useCallback(async _0x1cd6ea=>{const _0x1b036c=a50_0x40c7,_0x147710=Date['now'](),_0x58d958=a50_0x1b2ad0[_0x1b036c(0xda)](process[_0x1b036c(0xd9)](),_0x1cd6ea);_0x36f1be(!![]);try{logger[_0x1b036c(0xc7)]('format','开始格式化代码',{'projectCode':_0x1cd6ea}),await execa(_0x1b036c(0xd2),['prettier','--write','.'],{'cwd':_0x58d958});const _0x41a1f8=Date[_0x1b036c(0xd3)]()-_0x147710;logger[_0x1b036c(0xca)](_0x1b036c(0xd4),_0x1b036c(0xcb),_0x41a1f8,{'projectCode':_0x1cd6ea});}catch(_0x5df598){const _0x323151=Date['now']()-_0x147710;logger[_0x1b036c(0xd0)](_0x1b036c(0xd4),_0x1b036c(0xd5),{'projectCode':_0x1cd6ea,'error':_0x5df598 instanceof Error?_0x5df598[_0x1b036c(0xd7)]:String(_0x5df598),'duration':_0x323151});throw _0x5df598;}finally{_0x36f1be(![]),_0x1bf96f(!![]),_0x15e968(formatElapsed(_0x147710));}},[]);return{'taskName':_0x54c4e5(0xd1),'finished':_0x4ba0ec,'loading':_0x57427a,'elapsed':_0x3bfae2,'doTask':_0x11e245};}function a50_0x31d6(){const _0x11238a=['720APxCLP','message','7834024HmzGRt','cwd','resolve','2313297QwLrhW','5666VHXLDi','info','940ItjgzE','2272710hsFZIF','success','代码格式化完成','316GvXyfv','309400GHioVN','35077EgtmHu','42bySBQE','error','格式化代码','npx','now','format','代码格式化失败'];a50_0x31d6=function(){return _0x11238a;};return a50_0x31d6();}
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 +1 @@
1
- function a51_0x23be(){const _0x12b701=['1164462InzuUU','依赖安装完成','https://registry.npmmirror.com','message','install','40XpaSjh','error','cwd','now','info','npm','10QUVNrR','依赖安装失败','28388734yfadvJ','3559779TCiItF','resolve','开始安装依赖','2857320nyhjxn','--registry','7886qLGSTP','127nIlQCR','134841qsarnB','4kdqwqb','success','安装依赖','744968MKUFMy'];a51_0x23be=function(){return _0x12b701;};return a51_0x23be();}(function(_0x2528cb,_0x1fbace){const _0x2830b5=a51_0x4111,_0x159adc=_0x2528cb();while(!![]){try{const _0x2e6d49=parseInt(_0x2830b5(0x141))/0x1*(-parseInt(_0x2830b5(0x140))/0x2)+-parseInt(_0x2830b5(0x142))/0x3*(parseInt(_0x2830b5(0x143))/0x4)+-parseInt(_0x2830b5(0x138))/0x5*(parseInt(_0x2830b5(0x147))/0x6)+-parseInt(_0x2830b5(0x146))/0x7*(parseInt(_0x2830b5(0x14c))/0x8)+-parseInt(_0x2830b5(0x13b))/0x9+-parseInt(_0x2830b5(0x13e))/0xa+parseInt(_0x2830b5(0x13a))/0xb;if(_0x2e6d49===_0x1fbace)break;else _0x159adc['push'](_0x159adc['shift']());}catch(_0x2c5544){_0x159adc['push'](_0x159adc['shift']());}}}(a51_0x23be,0x69d8d));import a51_0x1af0a5 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a51_0x4111(_0x403c67,_0x408bce){_0x403c67=_0x403c67-0x134;const _0x23be34=a51_0x23be();let _0x411130=_0x23be34[_0x403c67];return _0x411130;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x38c7c9=a51_0x4111,[_0x250bac,_0x17546c]=useState(![]),[_0x10246d,_0xe7342f]=useState(![]),[_0x3c8aac,_0x28a572]=useState(''),_0x2f908d=useCallback(async _0x74a913=>{const _0x506301=a51_0x4111,_0xc84078=Date[_0x506301(0x135)](),_0xa47297=a51_0x1af0a5[_0x506301(0x13c)](process[_0x506301(0x134)](),_0x74a913);_0x17546c(!![]),_0xe7342f(![]);const _0x16a2c8=async(_0x18f74,_0x2b1049)=>{await execa(_0x18f74,_0x2b1049,{'cwd':_0xa47297});};try{logger[_0x506301(0x136)](_0x506301(0x14b),_0x506301(0x13d),{'projectCode':_0x74a913,'registry':_0x506301(0x149)}),await _0x16a2c8(_0x506301(0x137),['install',_0x506301(0x13f),'https://registry.npmmirror.com']);const _0x2462c4=Date[_0x506301(0x135)]()-_0xc84078;logger[_0x506301(0x144)]('install',_0x506301(0x148),_0x2462c4,{'projectCode':_0x74a913});}catch(_0x2f3337){const _0x117ce4=Date[_0x506301(0x135)]()-_0xc84078;logger[_0x506301(0x14d)](_0x506301(0x14b),_0x506301(0x139),{'projectCode':_0x74a913,'error':_0x2f3337 instanceof Error?_0x2f3337[_0x506301(0x14a)]:String(_0x2f3337),'duration':_0x117ce4});throw _0x2f3337;}finally{_0x17546c(![]),_0xe7342f(!![]),_0x28a572(formatElapsed(_0xc84078));}},[]);return{'taskName':_0x38c7c9(0x145),'finished':_0x10246d,'loading':_0x250bac,'elapsed':_0x3c8aac,'doTask':_0x2f908d};}
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};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1e4238,_0xace73d){var _0x2daf7e=a52_0x47c1,_0x4c48e9=_0x1e4238();while(!![]){try{var _0x486d76=-parseInt(_0x2daf7e(0x122))/0x1*(-parseInt(_0x2daf7e(0x123))/0x2)+parseInt(_0x2daf7e(0x12c))/0x3+parseInt(_0x2daf7e(0x12e))/0x4+parseInt(_0x2daf7e(0x124))/0x5*(-parseInt(_0x2daf7e(0x128))/0x6)+parseInt(_0x2daf7e(0x129))/0x7+parseInt(_0x2daf7e(0x121))/0x8*(parseInt(_0x2daf7e(0x12a))/0x9)+-parseInt(_0x2daf7e(0x12b))/0xa*(parseInt(_0x2daf7e(0x127))/0xb);if(_0x486d76===_0xace73d)break;else _0x4c48e9['push'](_0x4c48e9['shift']());}catch(_0x4e8047){_0x4c48e9['push'](_0x4c48e9['shift']());}}}(a52_0x1d2e,0x31c3e));function a52_0x47c1(_0x2c617b,_0x4e1a10){_0x2c617b=_0x2c617b-0x121;var _0x1d2e02=a52_0x1d2e();var _0x47c12f=_0x1d2e02[_0x2c617b];return _0x47c12f;}function a52_0x1d2e(){var _0x3da5b4=['954900TDBFzp','305504wSavRE','7341qRudGn','20AFIJdG','209455tJCSON','column','!\x20请指定一个有效的命令。','779647aCnKpM','12fMTsJb','835947rOtWQs','72kVoRNQ','90QfqJwG','565359osupkq','查看可用命令。'];a52_0x1d2e=function(){return _0x3da5b4;};return a52_0x1d2e();}import{jsx as a52_0x23e6c9,jsxs as a52_0x45ea52}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x21dea9=a52_0x47c1;return a52_0x45ea52(Box,{'flexDirection':_0x21dea9(0x125),'marginTop':0x1,'marginBottom':0x1,'children':[a52_0x45ea52(Box,{'children':[a52_0x23e6c9(Box,{'width':'1'}),a52_0x23e6c9(Text,{'children':_0x21dea9(0x126)})]}),a52_0x45ea52(Box,{'marginTop':0x1,'children':[a52_0x23e6c9(Box,{'width':'1'}),a52_0x45ea52(Text,{'children':['\x20\x20','使用']}),a52_0x45ea52(Text,{'bold':!![],'color':'green','children':['\x20','lovrabet\x20--help','\x20']}),a52_0x23e6c9(Text,{'children':_0x21dea9(0x12d)})]})]});}
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)})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4a9734,_0x4a7ca8){const _0x5ec6fc=a53_0x11cc,_0x15bd46=_0x4a9734();while(!![]){try{const _0x382a05=-parseInt(_0x5ec6fc(0xaa))/0x1+parseInt(_0x5ec6fc(0x98))/0x2*(parseInt(_0x5ec6fc(0x84))/0x3)+-parseInt(_0x5ec6fc(0x8f))/0x4+-parseInt(_0x5ec6fc(0x83))/0x5*(-parseInt(_0x5ec6fc(0x8b))/0x6)+-parseInt(_0x5ec6fc(0xa9))/0x7+parseInt(_0x5ec6fc(0x8a))/0x8*(-parseInt(_0x5ec6fc(0x88))/0x9)+parseInt(_0x5ec6fc(0x9f))/0xa;if(_0x382a05===_0x4a7ca8)break;else _0x15bd46['push'](_0x15bd46['shift']());}catch(_0xa1426){_0x15bd46['push'](_0x15bd46['shift']());}}}(a53_0x1fb7,0xaf80e));import{jsxs as a53_0x212ca5,jsx as a53_0x526f9e}from'react/jsx-runtime';import{useState,useEffect}from'react';function a53_0x11cc(_0x9e7865,_0x4703a4){_0x9e7865=_0x9e7865-0x7e;const _0x1fb760=a53_0x1fb7();let _0x11cc49=_0x1fb760[_0x9e7865];return _0x11cc49;}import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';function a53_0x1fb7(){const _0x9eac5c=['7613809zQbTkN','48705OeoEfV','cyan','slice','正在初始化配置文件...','应用代码不合法','toLocaleString','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','352785XiBmeD','2731359TlvYnF','utf8','1.0.0','message','45711USiXCr','应用代码不能为空','1488VkHEDN','102otJRMf','delete','column','length','415392CxAgXT','red','当前目录已存在\x20.lovrabetrc\x20文件','.lovrabetrc','backspace','stringify','init','exit','parse','2NDubjF','green','env','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','error','ctrl','trim','7938740WdwPDZ','setLogPath','应用代码只能包含字母、数字、-\x20和\x20_','gray','version','../..','cwd','\x20←\x20','应用代码长度不能超过\x20100\x20个字符','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_'];a53_0x1fb7=function(){return _0x9eac5c;};return a53_0x1fb7();}import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x3f0fda,env:_0x398563}){const _0x41b5ad=a53_0x11cc,[_0x5f2b3d,_0x4130ec]=useState(null),[_0x3af6c2,_0x335202]=useState(![]),[_0x370424,_0x3be03a]=useState(!_0x3f0fda),[_0x1c91ae,_0x127c82]=useState(''),[_0x3111c4,_0x427846]=useState(''),[_0x12e1af,_0x51565a]=useState(_0x3f0fda||''),[_0x40040e]=useState(_0x398563);function _0x6ce01a(_0x274a42){const _0xebec63=a53_0x11cc;if(_0x274a42[_0xebec63(0x8e)]===0x0)return{'valid':![],'message':''};if(_0x274a42[_0xebec63(0x8e)]>0x64)return{'valid':![],'message':_0xebec63(0xa7)};const _0x5ca1af=/^[A-Za-z0-9_-]+$/;if(!_0x5ca1af['test'](_0x274a42))return{'valid':![],'message':_0xebec63(0xa1)};return{'valid':!![]};}useInput((_0x36474e,_0x1012ac)=>{const _0x18174b=a53_0x11cc;if(!_0x370424)return;if(_0x1012ac['return']){if(_0x3111c4||!_0x1c91ae[_0x18174b(0x9e)]()){_0x427846(_0x18174b(0x89));return;}const _0x514b27=_0x1c91ae[_0x18174b(0x9e)](),{valid:_0x5664c1,message:_0x5da08e}=_0x6ce01a(_0x514b27);if(!_0x5664c1){_0x427846(_0x5da08e||_0x18174b(0x80));return;}_0x51565a(_0x514b27),_0x3be03a(![]);}else{if(_0x1012ac[_0x18174b(0x93)]||_0x1012ac[_0x18174b(0x8c)])_0x127c82(_0x4e87e0=>{const _0x39f144=_0x18174b,_0x506de9=_0x4e87e0[_0x39f144(0x7e)](0x0,-0x1);if(_0x506de9[_0x39f144(0x8e)]===0x0)_0x427846('');else{const {valid:_0x41aeef,message:_0x56ec66}=_0x6ce01a(_0x506de9);_0x427846(_0x41aeef?'':_0x56ec66||_0x39f144(0x80));}return _0x506de9;});else _0x1012ac[_0x18174b(0x9d)]&&_0x36474e==='c'?process[_0x18174b(0x96)](0x0):_0x127c82(_0x4f7f65=>{const _0x2381fc=_0x18174b,_0x2bda1e=_0x4f7f65+_0x36474e,{valid:_0x1e62af,message:_0x3628f5}=_0x6ce01a(_0x2bda1e);return _0x427846(_0x1e62af?'':_0x3628f5||_0x2381fc(0x80)),_0x2bda1e;});}},{'isActive':_0x370424}),useEffect(()=>{const _0x578fd4=a53_0x11cc;if(!_0x12e1af||_0x370424)return;const _0x12e2ba=resolve(process['cwd'](),_0x578fd4(0x92));if(existsSync(_0x12e2ba)){_0x4130ec(_0x578fd4(0x91)),setTimeout(()=>process['exit'](0x1),0x64);return;}try{const _0x542a81=fileURLToPath(import.meta.url),_0x425b66=resolve(dirname(_0x542a81),_0x578fd4(0xa4)),_0x6e04fc=join(_0x425b66,'package.json');let _0xd2bc12=_0x578fd4(0x86);try{const _0x13957a=JSON[_0x578fd4(0x97)](readFileSync(_0x6e04fc,_0x578fd4(0x85)));_0xd2bc12=_0x13957a[_0x578fd4(0xa3)]||'1.0.0';}catch(_0x288eca){}const _0xdf8936=readConfig(),_0x540a6d=typeof _0xdf8936[_0x578fd4(0x9a)]==='string'?_0xdf8936[_0x578fd4(0x9a)]:undefined,{app:_0x28bbb2,appcode:_0x549f79,..._0x1a7bc7}=_0xdf8936,_0x34a953={..._0x1a7bc7,'appcode':_0x12e1af,'env':_0x40040e||_0x540a6d||'online','createdAt':new Date()[_0x578fd4(0x81)](),'version':_0xd2bc12};writeFileSync(_0x12e2ba,JSON[_0x578fd4(0x94)](_0x34a953,null,0x2),{'encoding':_0x578fd4(0x85),'mode':0x180}),logger[_0x578fd4(0xa0)](process[_0x578fd4(0xa5)]()),logger['info'](_0x578fd4(0x95),'初始化项目配置文件成功',{'appcode':_0x12e1af,'env':_0x34a953[_0x578fd4(0x9a)],'version':_0x34a953['version'],'configPath':_0x12e2ba}),_0x335202(!![]),setTimeout(()=>process[_0x578fd4(0x96)](0x0),0x64);}catch(_0x1673bc){logger[_0x578fd4(0x9c)](_0x578fd4(0x95),'创建配置文件失败',{'error':_0x1673bc instanceof Error?_0x1673bc[_0x578fd4(0x87)]:String(_0x1673bc)}),_0x4130ec('创建配置文件失败:\x20'+(_0x1673bc instanceof Error?_0x1673bc[_0x578fd4(0x87)]:String(_0x1673bc))),setTimeout(()=>process[_0x578fd4(0x96)](0x1),0x64);}},[_0x12e1af,_0x370424,_0x40040e]);if(_0x5f2b3d)return a53_0x526f9e(Box,{'flexDirection':_0x41b5ad(0x8d),'children':a53_0x212ca5(Text,{'color':_0x41b5ad(0x90),'children':['✗\x20',_0x5f2b3d]})});if(_0x370424)return a53_0x212ca5(Box,{'flexDirection':_0x41b5ad(0x8d),'children':[a53_0x212ca5(Box,{'children':[a53_0x526f9e(Text,{'color':_0x41b5ad(0xab),'children':'请输入应用代码\x20(AppCode):\x20'}),_0x1c91ae?a53_0x526f9e(Text,{'color':_0x41b5ad(0x99),'children':_0x1c91ae}):a53_0x526f9e(Text,{'color':_0x41b5ad(0xa2),'children':'_'}),_0x3111c4&&a53_0x212ca5(Text,{'color':_0x41b5ad(0x90),'children':[_0x41b5ad(0xa6),_0x3111c4]})]}),!_0x3111c4&&!_0x1c91ae&&a53_0x526f9e(Box,{'children':a53_0x526f9e(Text,{'color':_0x41b5ad(0xa2),'children':_0x41b5ad(0xa8)})})]});if(_0x3af6c2)return a53_0x212ca5(Box,{'flexDirection':_0x41b5ad(0x8d),'children':[a53_0x526f9e(Text,{'color':_0x41b5ad(0x99),'children':_0x41b5ad(0x9b)}),a53_0x212ca5(Text,{'color':'cyan','children':['AppCode:\x20',_0x12e1af]}),a53_0x526f9e(Text,{'children':_0x41b5ad(0x82)})]});return a53_0x526f9e(Box,{'children':a53_0x526f9e(Text,{'children':_0x41b5ad(0x7f)})});}
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 +1 @@
1
- const a54_0x101107=a54_0xe53b;(function(_0x325461,_0x4790d6){const _0x173fb1=a54_0xe53b,_0x17b21d=_0x325461();while(!![]){try{const _0x2e0d23=-parseInt(_0x173fb1(0xa7))/0x1*(-parseInt(_0x173fb1(0xb9))/0x2)+parseInt(_0x173fb1(0x8d))/0x3*(parseInt(_0x173fb1(0xb4))/0x4)+parseInt(_0x173fb1(0xae))/0x5*(-parseInt(_0x173fb1(0xa0))/0x6)+parseInt(_0x173fb1(0x8f))/0x7*(-parseInt(_0x173fb1(0x8c))/0x8)+parseInt(_0x173fb1(0x85))/0x9*(-parseInt(_0x173fb1(0x87))/0xa)+parseInt(_0x173fb1(0xaf))/0xb*(-parseInt(_0x173fb1(0x92))/0xc)+-parseInt(_0x173fb1(0xb5))/0xd*(-parseInt(_0x173fb1(0xa4))/0xe);if(_0x2e0d23===_0x4790d6)break;else _0x17b21d['push'](_0x17b21d['shift']());}catch(_0x5df6e6){_0x17b21d['push'](_0x17b21d['shift']());}}}(a54_0x54d9,0x22d41));import{jsx as a54_0x47dc26,jsxs as a54_0xdff467,Fragment as a54_0x513f74}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 a54_0xe53b(_0xbc3972,_0x5813b0){_0xbc3972=_0xbc3972-0x83;const _0x54d94e=a54_0x54d9();let _0xe53b4f=_0x54d94e[_0xbc3972];return _0xe53b4f;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';function a54_0x54d9(){const _0x4112ad=['selecting','selectedIndexes','1112SybELd','633051QxweNy','white','14315DLcVdG','\x20\x20⚠️','label','12KKJzfw','key','status','cursor','正在配置\x20MCP\x20服务器...','manual','description','yellow','⚠️\x20配置需要手动完成','length','name','map','find','some','18498PoglYA','error','不支持的\x20IDE:\x20','message','3944948nzsKxa','cwd','green','94854wuOgBQ','\x20\x20✗','size','every','handleKeyDown','success','other','85hpbbSX','76318ogXVxN','getSelectedIDEs','configuring','已选择\x20IDE','column','4LwvBYy','13hmvYEE','red','gray','⚠️\x20部分配置需要手动完成','2RMgaqC','push','其他\x20IDE','18KaxAgb','return','506960fCfhpq','needsManualAction','cyan'];a54_0x54d9=function(){return _0x4112ad;};return a54_0x54d9();}const IDE_LIST=[...Array['from'](MCP_IDES)[a54_0x101107(0x9d)](_0x32ff68=>({'key':_0x32ff68,'name':IDE_CONFIGS[_0x32ff68]['name'],'description':IDE_CONFIGS[_0x32ff68][a54_0x101107(0x98)]})),{'key':a54_0x101107(0xad),'name':a54_0x101107(0x84),'description':'其他\x20IDE\x20配置指引'}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x4d7f5b=a54_0x101107,{exit:_0x5e335a}=useApp(),[_0x5dc312,_0x4a34cb]=useState(_0x4d7f5b(0x8a)),[_0x355ccf,_0x1d5c4a]=useState([]),[_0x3ee26d,_0x245d2f]=useState([]),_0x206722=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x4b7c33=_0x4d7f5b;preselectedIDEs[_0x4b7c33(0x9b)]>0x0&&_0x206722[_0x4b7c33(0x8b)][_0x4b7c33(0xa9)]>0x0&&_0x17abb0();},[]),useInput((_0x325a85,_0x3695ac)=>{const _0x692b08=_0x4d7f5b;if(_0x5dc312===_0x692b08(0x8a)){if(_0x325a85==='q'||_0x325a85==='Q'){_0x5e335a();return;}if(_0x3695ac[_0x692b08(0x86)]){if(_0x206722[_0x692b08(0x8b)][_0x692b08(0xa9)]===0x0){_0x206722['setErrorMsg']('请至少选择一个\x20IDE');return;}_0x17abb0();return;}_0x206722[_0x692b08(0xab)](_0x325a85,_0x3695ac);}_0x5dc312==='done'&&_0x5e335a();});async function _0x17abb0(){const _0x2feb08=_0x4d7f5b,_0x5f2acd=_0x206722[_0x2feb08(0xb0)]();_0x1d5c4a([{'label':_0x2feb08(0xb2),'value':_0x206722[_0x2feb08(0x8b)]['size']+'\x20个'}]),_0x4a34cb(_0x2feb08(0xb1));const _0x2af334=[];for(const _0x2f777a of _0x5f2acd){try{const _0x1d57ba=await configureMcp(_0x2f777a);_0x2af334[_0x2feb08(0x83)]({'ide':IDE_LIST[_0x2feb08(0x9e)](_0x52ccde=>_0x52ccde[_0x2feb08(0x93)]===_0x2f777a)?.[_0x2feb08(0x9c)]||_0x2f777a,'status':_0x1d57ba[_0x2feb08(0x88)]?'manual':_0x1d57ba[_0x2feb08(0xac)]?_0x2feb08(0xac):'error','message':_0x1d57ba[_0x2feb08(0xa3)]});}catch(_0x51c24a){_0x2af334['push']({'ide':IDE_LIST[_0x2feb08(0x9e)](_0x2172d1=>_0x2172d1[_0x2feb08(0x93)]===_0x2f777a)?.[_0x2feb08(0x9c)]||_0x2f777a,'status':_0x2feb08(0xa1),'message':_0x51c24a instanceof Error?_0x51c24a[_0x2feb08(0xa3)]:String(_0x51c24a)});}}_0x245d2f(_0x2af334),_0x4a34cb('done'),setTimeout(()=>{_0x5e335a();},0x1388);}return a54_0xdff467(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x5dc312===_0x4d7f5b(0x8a)&&a54_0x47dc26(IDESelector,{'ideList':IDE_LIST,'title':'配置\x20Lovrabet\x20MCP\x20服务器','selection':_0x206722}),_0x5dc312===_0x4d7f5b(0xb1)&&a54_0xdff467(a54_0x513f74,{'children':[_0x355ccf[_0x4d7f5b(0x9d)]((_0x539f20,_0x23133c)=>a54_0xdff467(Box,{'children':[a54_0xdff467(Text,{'color':_0x4d7f5b(0xa6),'children':['√\x20',_0x539f20[_0x4d7f5b(0x91)],':\x20']}),a54_0x47dc26(Text,{'color':_0x4d7f5b(0x89),'children':_0x539f20['value']})]},_0x23133c)),a54_0x47dc26(Box,{'marginTop':0x1,'children':a54_0x47dc26(Text,{'children':_0x4d7f5b(0x96)})})]}),_0x5dc312==='done'&&a54_0x47dc26(DoneStep,{'configResults':_0x3ee26d})]});}function DoneStep({configResults:_0x36592d}){const _0x58803f=a54_0x101107,_0x4d99a4=_0x36592d[_0x58803f(0xaa)](_0x6b4d34=>_0x6b4d34[_0x58803f(0x94)]===_0x58803f(0xac)),_0x51c812=_0x36592d[_0x58803f(0x9f)](_0x45b91a=>_0x45b91a[_0x58803f(0x94)]==='manual'),_0x5deef7=_0x36592d[_0x58803f(0x9f)](_0x16797a=>_0x16797a[_0x58803f(0x94)]===_0x58803f(0xa1));return a54_0xdff467(a54_0x513f74,{'children':[a54_0x47dc26(Box,{'children':_0x4d99a4?a54_0x47dc26(Text,{'color':_0x58803f(0xa6),'children':'✓\x20MCP\x20配置完成!'}):_0x51c812?a54_0x47dc26(Text,{'color':_0x58803f(0x99),'children':_0x58803f(0xb8)}):_0x5deef7?a54_0x47dc26(Text,{'color':_0x58803f(0xb6),'children':'✗\x20配置失败'}):a54_0x47dc26(Text,{'color':'yellow','children':_0x58803f(0x9a)})}),_0x36592d[_0x58803f(0x9d)]((_0x5409f4,_0x4610b3)=>a54_0xdff467(Box,{'flexDirection':_0x58803f(0xb3),'children':[a54_0xdff467(Text,{'color':_0x5409f4[_0x58803f(0x94)]==='success'?_0x58803f(0xa6):_0x5409f4[_0x58803f(0x94)]==='manual'?_0x58803f(0x99):_0x58803f(0xb6),'children':[_0x5409f4[_0x58803f(0x94)]===_0x58803f(0xac)?'\x20\x20✓':_0x5409f4[_0x58803f(0x94)]===_0x58803f(0x97)?_0x58803f(0x90):_0x58803f(0xa8),'\x20',_0x5409f4['ide'],':']}),a54_0x47dc26(Text,{'color':_0x5409f4['status']===_0x58803f(0xac)?_0x58803f(0x8e):_0x5409f4['status']==='manual'?_0x58803f(0x99):_0x58803f(0xb6),'children':_0x5409f4['message']})]},_0x4610b3)),a54_0x47dc26(Box,{'marginTop':0x1,'children':a54_0x47dc26(Text,{'color':_0x58803f(0xb7),'children':'按任意键退出...'})})]});}async function configureMcp(_0x447d4e){const _0x4ff835=a54_0x101107,_0xa6fcd7=process[_0x4ff835(0xa5)]();switch(_0x447d4e){case _0x4ff835(0x95):return configureCursorMcp(_0xa6fcd7);case'claude':return configureClaudeMcp(_0xa6fcd7);case _0x4ff835(0xad):return showOtherMcpGuide(_0xa6fcd7);default:throw new Error(_0x4ff835(0xa2)+_0x447d4e);}}
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);}}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- function a55_0x1a24(){const _0xe08f04=['1388790zJNAQS','log','106796yCoiul','3797710UpGLPc','10KcHFhS','success','4162836SbLMsr','371551ermNLw','error','14112522JvThLu','4289904FVomxC','60NFYqgg','message','2UUHsgv','\x0a错误:\x20配置失败\x20-\x20','exit'];a55_0x1a24=function(){return _0xe08f04;};return a55_0x1a24();}function a55_0x3cd2(_0x42afe8,_0x569f0b){_0x42afe8=_0x42afe8-0x18f;const _0x1a2424=a55_0x1a24();let _0x3cd2b0=_0x1a2424[_0x42afe8];return _0x3cd2b0;}(function(_0x375b87,_0x1903e8){const _0x39cef0=a55_0x3cd2,_0x56ca24=_0x375b87();while(!![]){try{const _0x191539=parseInt(_0x39cef0(0x194))/0x1*(parseInt(_0x39cef0(0x19a))/0x2)+parseInt(_0x39cef0(0x198))/0x3*(parseInt(_0x39cef0(0x18f))/0x4)+-parseInt(_0x39cef0(0x19d))/0x5+-parseInt(_0x39cef0(0x193))/0x6+-parseInt(_0x39cef0(0x190))/0x7+-parseInt(_0x39cef0(0x197))/0x8+parseInt(_0x39cef0(0x196))/0x9*(parseInt(_0x39cef0(0x191))/0xa);if(_0x191539===_0x1903e8)break;else _0x56ca24['push'](_0x56ca24['shift']());}catch(_0x7ee1c6){_0x56ca24['push'](_0x56ca24['shift']());}}}(a55_0x1a24,0x67559));import{configureClaudeMcp as a55_0x42a39a}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x57107d=a55_0x3cd2,_0x283593=process['cwd'](),_0x16e87a=a55_0x42a39a(_0x283593);_0x16e87a[_0x57107d(0x192)]?(console[_0x57107d(0x19e)]('\x0a📋\x20'+_0x16e87a[_0x57107d(0x199)]+'\x0a'),process[_0x57107d(0x19c)](0x0)):(console[_0x57107d(0x195)](_0x57107d(0x19b)+_0x16e87a[_0x57107d(0x199)]+'\x0a'),process[_0x57107d(0x19c)](0x1));}
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();}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4532e6,_0x1bcfcd){const _0x3228a9=a56_0x3c25,_0x164d6e=_0x4532e6();while(!![]){try{const _0xf5e329=-parseInt(_0x3228a9(0x1e0))/0x1*(parseInt(_0x3228a9(0x1ea))/0x2)+parseInt(_0x3228a9(0x1e3))/0x3*(parseInt(_0x3228a9(0x1e4))/0x4)+-parseInt(_0x3228a9(0x1e8))/0x5*(parseInt(_0x3228a9(0x1de))/0x6)+parseInt(_0x3228a9(0x1f0))/0x7+parseInt(_0x3228a9(0x1eb))/0x8+parseInt(_0x3228a9(0x1e6))/0x9+parseInt(_0x3228a9(0x1df))/0xa*(-parseInt(_0x3228a9(0x1e9))/0xb);if(_0xf5e329===_0x1bcfcd)break;else _0x164d6e['push'](_0x164d6e['shift']());}catch(_0x45d1df){_0x164d6e['push'](_0x164d6e['shift']());}}}(a56_0x1278,0x7bebc));function a56_0x1278(){const _0x27c6bc=['请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','267585PAdxqh','22OPAAKU','94JhPfKs','2581640BfcuJB','success','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','error','cwd','4332055flIKFR','exit','42swzClG','855850aheRKE','9983IwOGYk','配置信息:','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','3oHblWR','1042852EJjNnV','log','2882583iNXdLa'];a56_0x1278=function(){return _0x27c6bc;};return a56_0x1278();}function a56_0x3c25(_0x53deee,_0x553682){_0x53deee=_0x53deee-0x1de;const _0x127891=a56_0x1278();let _0x3c254e=_0x127891[_0x53deee];return _0x3c254e;}import{configureCursorMcp as a56_0x25cea8}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x569172=a56_0x3c25,_0x11a9e7=process[_0x569172(0x1ef)](),_0x40e043=await a56_0x25cea8(_0x11a9e7);_0x40e043[_0x569172(0x1ec)]?(console[_0x569172(0x1e5)](_0x569172(0x1ed)),console[_0x569172(0x1e5)](_0x569172(0x1e1)),console[_0x569172(0x1e5)]('\x20\x20'+_0x40e043['message']+'\x0a'),console[_0x569172(0x1e5)](_0x569172(0x1e2)),console['log'](_0x569172(0x1e7)),process[_0x569172(0x1f1)](0x0)):(console[_0x569172(0x1ee)]('\x0a错误:\x20配置失败\x20-\x20'+_0x40e043['message']+'\x0a'),process['exit'](0x1));}
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();}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1b3e94,_0x432ba9){const _0x48cff3=a57_0x2a21,_0x240664=_0x1b3e94();while(!![]){try{const _0x2c28b8=-parseInt(_0x48cff3(0x200))/0x1*(-parseInt(_0x48cff3(0x212))/0x2)+parseInt(_0x48cff3(0x21b))/0x3+-parseInt(_0x48cff3(0x203))/0x4*(-parseInt(_0x48cff3(0x1f0))/0x5)+-parseInt(_0x48cff3(0x201))/0x6+-parseInt(_0x48cff3(0x1ef))/0x7+parseInt(_0x48cff3(0x211))/0x8*(-parseInt(_0x48cff3(0x208))/0x9)+parseInt(_0x48cff3(0x1fc))/0xa;if(_0x2c28b8===_0x432ba9)break;else _0x240664['push'](_0x240664['shift']());}catch(_0x11da32){_0x240664['push'](_0x240664['shift']());}}}(a57_0x2f4b,0x84c80));import{configureCursorMcp}from'./cursor.js';function a57_0x2a21(_0x28ca6b,_0x5602ab){_0x28ca6b=_0x28ca6b-0x1ee;const _0x2f4bdb=a57_0x2f4b();let _0x2a2109=_0x2f4bdb[_0x28ca6b];return _0x2a2109;}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(_0x22331d,_0x4a9c66,_0x4b2f8){const _0x1eb3ce=a57_0x2a21;logger[_0x1eb3ce(0x1f1)](process[_0x1eb3ce(0x207)]());if(_0x4b2f8?.['help']||_0x22331d===_0x1eb3ce(0x202)){showHelp();return;}_0x22331d!=='install'&&(console[_0x1eb3ce(0x21f)]('错误:\x20不支持的命令:\x20'+(_0x22331d||_0x1eb3ce(0x216))),console['log'](_0x1eb3ce(0x1fa)),console[_0x1eb3ce(0x20d)](_0x1eb3ce(0x1f7)),console[_0x1eb3ce(0x20d)](_0x1eb3ce(0x205)),logger[_0x1eb3ce(0x21f)](_0x1eb3ce(0x1f6),_0x1eb3ce(0x206)+_0x22331d),process[_0x1eb3ce(0x1f8)](0x1));let _0x212371;if(_0x4b2f8?.[_0x1eb3ce(0x1f2)])_0x212371=_0x1eb3ce(0x214);else{if(_0x4b2f8?.[_0x1eb3ce(0x1f5)])_0x212371=_0x1eb3ce(0x21c);else{if(_0x4a9c66?.[0x0]){const _0x5c1143=_0x4a9c66[0x0][_0x1eb3ce(0x20a)]();MCP_IDES['has'](_0x5c1143)&&(_0x212371=_0x5c1143);}}}await installMcp(_0x212371);}function a57_0x2f4b(){const _0x8514a9=['mcp','\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP','exit','quit','\x0a可用命令:','description','4337320mrtKBt','stdout','stdin','join','11mwmwdX','4863282ZCktWv','--help','20164vvOohb','\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','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','不支持的命令:\x20','cwd','70317iSaOUj','forEach','toLowerCase','map','\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','\x20-\x20','配置失败','\x0a已取消配置\x0a','632UuLYlu','167282fCfBWr','trim','cursor','length','(空)','请输入编号选择\x20IDE:\x0a','\x0a无效的选择,请输入\x201-','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','from','2707044OxXsvW','claude','close','message','error','\x20\x20q.\x20取消\x0a','mcp-install','\x20之间的数字\x0a','2167830GummuN','25ziRxEb','setLogPath','mcpCursor','name','\x0a错误:\x20配置失败\x20-\x20','mcpClaude'];a57_0x2f4b=function(){return _0x8514a9;};return a57_0x2f4b();}function showHelp(){const _0x3b9ca7=a57_0x2a21;console[_0x3b9ca7(0x20d)](_0x3b9ca7(0x204)+Array[_0x3b9ca7(0x21a)](MCP_IDES)[_0x3b9ca7(0x20b)]((_0x36e191,_0x3d516a)=>'\x20\x20'+(_0x3d516a+0x1)+'.\x20'+IDE_CONFIGS[_0x36e191][_0x3b9ca7(0x1f3)]+_0x3b9ca7(0x20e)+IDE_CONFIGS[_0x36e191]['description'])[_0x3b9ca7(0x1ff)]('\x0a')+_0x3b9ca7(0x20c));}async function selectIDE(){const _0xd1d2c2=a57_0x2a21;console[_0xd1d2c2(0x20d)](_0xd1d2c2(0x219));const _0x32e29a=Array[_0xd1d2c2(0x21a)](MCP_IDES);return _0x32e29a[_0xd1d2c2(0x209)]((_0x4c9084,_0x355d8b)=>{const _0x28fe60=_0xd1d2c2;console['log']('\x20\x20'+(_0x355d8b+0x1)+'.\x20'+IDE_CONFIGS[_0x4c9084][_0x28fe60(0x1f3)]+'\x20-\x20'+IDE_CONFIGS[_0x4c9084][_0x28fe60(0x1fb)]);}),console[_0xd1d2c2(0x20d)](_0xd1d2c2(0x220)),console['log'](_0xd1d2c2(0x217)),new Promise(_0x21ec29=>{const _0xd33c73=_0xd1d2c2,_0x385e33=createInterface({'input':process[_0xd33c73(0x1fe)],'output':process[_0xd33c73(0x1fd)]});_0x385e33['question']('请选择:\x20',_0x2223b0=>{const _0x15e917=_0xd33c73;_0x385e33[_0x15e917(0x21d)]();const _0x648574=_0x2223b0[_0x15e917(0x213)]()[_0x15e917(0x20a)]();(_0x648574==='q'||_0x648574===_0x15e917(0x1f9)||_0x648574===_0x15e917(0x1f8))&&(console['log'](_0x15e917(0x210)),process[_0x15e917(0x1f8)](0x0));const _0xfef43=parseInt(_0x648574,0xa);if(!isNaN(_0xfef43)&&_0xfef43>=0x1&&_0xfef43<=_0x32e29a[_0x15e917(0x215)]){const _0x2ec04f=_0x32e29a[_0xfef43-0x1];_0x2ec04f&&_0x21ec29(_0x2ec04f);return;}console['log'](_0x15e917(0x218)+_0x32e29a['length']+_0x15e917(0x1ee)),process[_0x15e917(0x1f8)](0x1);});});}async function installMcp(_0x35df8d){const _0x2211b0=a57_0x2a21;let _0x4444d5;!_0x35df8d?_0x4444d5=await selectIDE():_0x4444d5=_0x35df8d;try{const _0x25c54e=IDE_CONFIGS[_0x4444d5];console[_0x2211b0(0x20d)]('\x0a📦\x20正在配置\x20'+_0x25c54e[_0x2211b0(0x1f3)]+'\x20MCP...\x0a');switch(_0x4444d5){case _0x2211b0(0x214):await configureCursorMcp();break;case'claude':await configureClaudeMcp();break;}}catch(_0x301405){logger['error'](_0x2211b0(0x221),_0x2211b0(0x20f),{'error':_0x301405 instanceof Error?_0x301405['message']:String(_0x301405)}),console[_0x2211b0(0x21f)](_0x2211b0(0x1f4)+(_0x301405 instanceof Error?_0x301405[_0x2211b0(0x21e)]:String(_0x301405))+'\x0a'),process['exit'](0x1);}}
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 +1 @@
1
- const a58_0x464c38=a58_0x1b92;function a58_0x1b92(_0x2205e2,_0x2b76a4){_0x2205e2=_0x2205e2-0x176;const _0x3604e0=a58_0x3604();let _0x1b92fd=_0x3604e0[_0x2205e2];return _0x1b92fd;}(function(_0x2349b4,_0x48b7b7){const _0xfc7fbc=a58_0x1b92,_0x343cb8=_0x2349b4();while(!![]){try{const _0x1b11c6=parseInt(_0xfc7fbc(0x18d))/0x1*(-parseInt(_0xfc7fbc(0x177))/0x2)+-parseInt(_0xfc7fbc(0x185))/0x3+parseInt(_0xfc7fbc(0x194))/0x4*(-parseInt(_0xfc7fbc(0x179))/0x5)+parseInt(_0xfc7fbc(0x178))/0x6+-parseInt(_0xfc7fbc(0x18f))/0x7+parseInt(_0xfc7fbc(0x17f))/0x8+parseInt(_0xfc7fbc(0x182))/0x9*(parseInt(_0xfc7fbc(0x186))/0xa);if(_0x1b11c6===_0x48b7b7)break;else _0x343cb8['push'](_0x343cb8['shift']());}catch(_0x51d347){_0x343cb8['push'](_0x343cb8['shift']());}}}(a58_0x3604,0xf3921));function a58_0x3604(){const _0x48379c=['1546144zLgxMk','mcp-install-non-interactive','log','\x0a✗\x20','cwd','length','2tqIVyS','102336wuSeqw','10GlZEgg','setLogPath','error','claude','cursor','info','7060872ovkyuf','some','filter','9149463EhmOAw','\x20成功)','success','4864194hVkzFo','30kWCKOn','\x0a✓\x20MCP\x20配置完成\x20(','\x20MCP\x20配置成功','未知的\x20IDE:\x20','Claude\x20Code','Cursor','\x0a注意:部分配置需要手动执行命令,请按照上述说明操作','273596ttPVMg','\x20MCP\x20配置失败:\x20','1986285obdynO','message','开始配置\x20MCP','needsManualAction','其他\x20IDE'];a58_0x3604=function(){return _0x48379c;};return a58_0x3604();}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x41e11a,_0x53fcac=process[a58_0x464c38(0x198)]()){const _0x2632bc=a58_0x464c38;logger[_0x2632bc(0x17a)](_0x53fcac),logger[_0x2632bc(0x17e)](_0x2632bc(0x195),_0x2632bc(0x191),{'ides':_0x41e11a});const _0x5ce9ca=[];for(const _0x58e939 of _0x41e11a){try{let _0x4786aa;switch(_0x58e939){case _0x2632bc(0x17d):_0x4786aa=await configureCursorMcp(_0x53fcac);break;case'claude':_0x4786aa=configureClaudeMcp(_0x53fcac);break;case'other':_0x4786aa=showOtherMcpGuide(_0x53fcac);break;default:_0x4786aa={'success':![],'message':_0x2632bc(0x189)+_0x58e939};}_0x5ce9ca['push'](_0x4786aa);if(_0x4786aa[_0x2632bc(0x184)]){const _0xfffd97=_0x58e939==='cursor'?_0x2632bc(0x18b):_0x58e939===_0x2632bc(0x17c)?_0x2632bc(0x18a):_0x2632bc(0x193);console[_0x2632bc(0x196)]('\x0a✓\x20'+_0xfffd97+_0x2632bc(0x188)),console[_0x2632bc(0x196)]('\x20\x20'+_0x4786aa[_0x2632bc(0x190)]);}else console[_0x2632bc(0x17b)](_0x2632bc(0x197)+_0x58e939+_0x2632bc(0x18e)+_0x4786aa['message']);}catch(_0x3ec9cc){console['error'](_0x2632bc(0x197)+_0x58e939+_0x2632bc(0x18e)+(_0x3ec9cc instanceof Error?_0x3ec9cc[_0x2632bc(0x190)]:String(_0x3ec9cc)));}}const _0x1ca4bc=_0x5ce9ca[_0x2632bc(0x181)](_0x1b9445=>_0x1b9445[_0x2632bc(0x184)])[_0x2632bc(0x176)],_0x3adede=_0x5ce9ca[_0x2632bc(0x176)];console[_0x2632bc(0x196)](_0x2632bc(0x187)+_0x1ca4bc+'/'+_0x3adede+_0x2632bc(0x183));const _0x2ffe69=_0x5ce9ca[_0x2632bc(0x180)](_0x29d9a9=>_0x29d9a9[_0x2632bc(0x192)]);_0x2ffe69&&console[_0x2632bc(0x196)](_0x2632bc(0x18c));}
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 +1 @@
1
- const a59_0x1fe7bd=a59_0x1e02;(function(_0x1190a4,_0x9c464b){const _0xf294ca=a59_0x1e02,_0x159f26=_0x1190a4();while(!![]){try{const _0x1fb5d8=parseInt(_0xf294ca(0x1e1))/0x1+-parseInt(_0xf294ca(0x204))/0x2*(parseInt(_0xf294ca(0x1ef))/0x3)+-parseInt(_0xf294ca(0x1f9))/0x4+-parseInt(_0xf294ca(0x1dd))/0x5+parseInt(_0xf294ca(0x1d1))/0x6*(-parseInt(_0xf294ca(0x200))/0x7)+-parseInt(_0xf294ca(0x1d2))/0x8+parseInt(_0xf294ca(0x1f2))/0x9;if(_0x1fb5d8===_0x9c464b)break;else _0x159f26['push'](_0x159f26['shift']());}catch(_0x57e9bb){_0x159f26['push'](_0x159f26['shift']());}}}(a59_0xeabf,0xa7022));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a59_0x1fe7bd(0x1fd);export const MCP_COMMAND=a59_0x1fe7bd(0x1e4);export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];function a59_0x1e02(_0x38eb65,_0x46b5a9){_0x38eb65=_0x38eb65-0x1cd;const _0xeabfb3=a59_0xeabf();let _0x1e02d1=_0xeabfb3[_0x38eb65];return _0x1e02d1;}export function getAppConfig(){const _0x5b7efc=a59_0x1fe7bd,_0x17a7d2=readConfig(),_0x339ea4=_0x17a7d2[_0x5b7efc(0x1ce)]||_0x17a7d2[_0x5b7efc(0x1f3)],_0x451ba6=_0x17a7d2['env']||_0x5b7efc(0x209);if(!_0x339ea4)throw new Error(_0x5b7efc(0x1cf));return{'appcode':String(_0x339ea4),'env':_0x451ba6};}export function buildMcpEnv(_0x3f5aee,_0x293a01){const _0x548078=a59_0x1fe7bd,_0x19d3fc={'LOVRABET_APP_CODE':_0x3f5aee};return _0x293a01!==_0x548078(0x209)&&(_0x19d3fc[_0x548078(0x1da)]=_0x293a01),_0x19d3fc;}export function buildMcpServerConfig(_0x144453,_0x27922a){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x144453,_0x27922a)};}function a59_0xeabf(){const _0x1dbd80=['5914098IzuaQF','10650848tzmaCT','\x20-e\x20LOVRABET_ENV=','agents.md','info',',\x20env=','配置失败','更新现有\x20mcp.json\x20配置','join','LOVRABET_ENV','utf8','mcp.json','2478570MCHbBE','配置\x20Cursor\x20MCP\x20成功','map','创建\x20Cursor\x20Rules\x20文件','435581XrUhcb','\x20-e\x20LOVRABET_APP_CODE=','\x20\x20\x22mcpServers\x22:\x20{','npx','message','已创建\x20Cursor\x20Rules\x20文件','error','重启\x20Claude\x20Code\x20后生效','配置\x20Cursor\x20MCP\x20失败','.cursor','mcpServers','AppCode:\x20','环境:\x20','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','12yVeCqo','claude\x20mcp\x20add\x20','push','38385765ZNliRF','app','utf-8','创建\x20agents.md\x20文件','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','mcp-install','复制\x20agents.md\x20文件失败','4554124uXMYGA','\x22LOVRABET_APP_CODE\x22:\x20\x22','mcp-claude','重启\x20Cursor\x20后生效','lovrabet-dataset','\x20\x20\x20\x20\x20\x20}','生成配置命令','7sosKOx','\x20\x20\x20\x20}','\x0a\x20\x20','stringify','32658aFQSTC','创建新的\x20mcp.json\x20配置','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','mcp-cursor','已写入\x20.cursor/mcp.json','online','rules','agents.md\x20文件已存在,跳过','appcode','未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','\x22LOVRABET_ENV\x22:\x20\x22'];a59_0xeabf=function(){return _0x1dbd80;};return a59_0xeabf();}export function buildClaudeMcpCommand(_0xe73919,_0x1414f2){const _0x3112fe=a59_0x1fe7bd,_0x33df8f=_0x3112fe(0x1f0)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x3112fe(0x1d9)]('\x20')+_0x3112fe(0x1e2)+_0xe73919,_0x311855=_0x1414f2!==_0x3112fe(0x209)?_0x3112fe(0x1d3)+_0x1414f2:'';return''+_0x33df8f+_0x311855;}export async function copyCursorRules(_0x1d783d){const _0x8118db=a59_0x1fe7bd,_0x5b1226=join(_0x1d783d,_0x8118db(0x1ea)),_0x471d58=join(_0x5b1226,_0x8118db(0x20a)),_0x11a539=join(_0x471d58,'lovrabet_rules.mdc');if(existsSync(_0x11a539))return logger[_0x8118db(0x1d5)](_0x8118db(0x1f7),'Cursor\x20Rules\x20文件已存在,跳过',{'path':_0x11a539}),![];try{ensureDir(_0x471d58);const _0x1643e1=await getRulesContent();return writeFileSync(_0x11a539,_0x1643e1,_0x8118db(0x1f4)),logger[_0x8118db(0x1d5)](_0x8118db(0x1f7),_0x8118db(0x1e0),{'to':_0x11a539}),!![];}catch(_0x578785){return logger[_0x8118db(0x1e7)](_0x8118db(0x1f7),'复制\x20Cursor\x20Rules\x20文件失败',{'error':_0x578785 instanceof Error?_0x578785[_0x8118db(0x1e5)]:String(_0x578785)}),![];}}export async function copyAgentsMd(_0x5b9343){const _0x3c14ba=a59_0x1fe7bd,_0x37ccfd=join(_0x5b9343,_0x3c14ba(0x1d4));if(existsSync(_0x37ccfd))return logger['info'](_0x3c14ba(0x1f7),_0x3c14ba(0x1cd),{'path':_0x37ccfd}),![];try{const _0x26c69b=await getRulesContent();return writeFileSync(_0x37ccfd,_0x26c69b,_0x3c14ba(0x1f4)),logger[_0x3c14ba(0x1d5)]('mcp-install',_0x3c14ba(0x1f5),{'to':_0x37ccfd}),!![];}catch(_0x587354){return logger['error'](_0x3c14ba(0x1f7),_0x3c14ba(0x1f8),{'error':_0x587354 instanceof Error?_0x587354[_0x3c14ba(0x1e5)]:String(_0x587354)}),![];}}export async function configureCursorMcp(_0x2fb8ed){const _0x588569=a59_0x1fe7bd;try{const {appcode:_0x13a356,env:_0x27c4cc}=getAppConfig(),_0x5312e6=join(_0x2fb8ed,_0x588569(0x1ea)),_0x38b252=join(_0x5312e6,_0x588569(0x1dc));ensureDir(_0x5312e6);const _0x3ebe60=buildMcpServerConfig(_0x13a356,_0x27c4cc);let _0x63c2b3;if(existsSync(_0x38b252)){const _0x17d7e9=readFileSync(_0x38b252,_0x588569(0x1db));_0x63c2b3=JSON['parse'](_0x17d7e9),!_0x63c2b3[_0x588569(0x1eb)]&&(_0x63c2b3['mcpServers']={}),logger[_0x588569(0x1d5)](_0x588569(0x207),_0x588569(0x1d8),{'path':_0x38b252,'appcode':_0x13a356,'env':_0x27c4cc});}else _0x63c2b3={'mcpServers':{}},logger['info'](_0x588569(0x207),_0x588569(0x205),{'path':_0x38b252,'appcode':_0x13a356,'env':_0x27c4cc});_0x63c2b3[_0x588569(0x1eb)][MCP_SERVER_NAME]=_0x3ebe60,writeFileSync(_0x38b252,JSON[_0x588569(0x203)](_0x63c2b3,null,0x2),{'encoding':'utf8'});const _0x383c07=await copyCursorRules(_0x2fb8ed),_0x236aae=[_0x588569(0x208),_0x588569(0x1ec)+_0x13a356];return _0x27c4cc!==_0x588569(0x209)&&_0x236aae[_0x588569(0x1f1)](_0x588569(0x1ed)+_0x27c4cc),_0x236aae[_0x588569(0x1f1)](_0x588569(0x1fc)),_0x383c07&&_0x236aae[_0x588569(0x1f1)](_0x588569(0x1e6)),logger[_0x588569(0x1d5)](_0x588569(0x207),_0x588569(0x1de),{'appcode':_0x13a356,'env':_0x27c4cc,'configPath':_0x38b252}),{'success':!![],'message':_0x236aae[_0x588569(0x1d9)](_0x588569(0x202))};}catch(_0x35bbe5){return logger[_0x588569(0x1e7)]('mcp-cursor',_0x588569(0x1e9),{'error':_0x35bbe5 instanceof Error?_0x35bbe5[_0x588569(0x1e5)]:String(_0x35bbe5)}),{'success':![],'message':_0x35bbe5 instanceof Error?_0x35bbe5[_0x588569(0x1e5)]:String(_0x35bbe5)};}}export function configureClaudeMcp(_0x36894a){const _0xf7f9b0=a59_0x1fe7bd;try{const {appcode:_0x38e5c9,env:_0xed20f2}=getAppConfig();copyAgentsMd(_0x36894a);const _0x76c41=buildClaudeMcpCommand(_0x38e5c9,_0xed20f2),_0x764734=['请执行以下命令配置\x20Claude\x20Code\x20MCP:',''+_0x76c41,'配置信息:','AppCode:\x20'+_0x38e5c9];return _0xed20f2!==_0xf7f9b0(0x209)&&_0x764734[_0xf7f9b0(0x1f1)](_0xf7f9b0(0x1ed)+_0xed20f2),_0x764734[_0xf7f9b0(0x1f1)](_0xf7f9b0(0x1e8)),logger[_0xf7f9b0(0x1d5)]('mcp-claude',_0xf7f9b0(0x1ff),{'appcode':_0x38e5c9,'env':_0xed20f2,'command':_0x76c41}),{'success':!![],'message':_0x764734[_0xf7f9b0(0x1d9)](_0xf7f9b0(0x202)),'needsManualAction':!![]};}catch(_0x58c412){return logger['error'](_0xf7f9b0(0x1fb),_0xf7f9b0(0x1d7),{'error':_0x58c412 instanceof Error?_0x58c412[_0xf7f9b0(0x1e5)]:String(_0x58c412)}),{'success':![],'message':_0x58c412 instanceof Error?_0x58c412[_0xf7f9b0(0x1e5)]:String(_0x58c412)};}}export function showOtherMcpGuide(_0x433e91){const _0x5e7037=a59_0x1fe7bd;try{const {appcode:_0x58b1dc,env:_0x1966f7}=getAppConfig(),_0x25031f=buildMcpServerConfig(_0x58b1dc,_0x1966f7),_0x49627b=[_0x5e7037(0x1fa)+_0x58b1dc+'\x22'];_0x1966f7!==_0x5e7037(0x209)&&_0x49627b[_0x5e7037(0x1f1)](_0x5e7037(0x1d0)+_0x1966f7+'\x22');const _0x40c5bd=['配置信息:\x20appcode='+_0x58b1dc+_0x5e7037(0x1d6)+_0x1966f7,'{',_0x5e7037(0x1e3),_0x5e7037(0x1f6),_0x5e7037(0x1ee),'\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],',_0x5e7037(0x206),..._0x49627b[_0x5e7037(0x1df)](_0x5806c9=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5806c9+','),_0x5e7037(0x1fe),_0x5e7037(0x201),'\x20\x20}','}','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide'];return logger['info']('mcp-install','其他\x20IDE\x20配置指引已显示',{'appcode':_0x58b1dc,'env':_0x1966f7}),{'success':!![],'message':_0x40c5bd[_0x5e7037(0x1d9)]('\x0a'),'needsManualAction':!![]};}catch(_0x58a57f){return{'success':![],'message':_0x58a57f instanceof Error?_0x58a57f[_0x5e7037(0x1e5)]:String(_0x58a57f)};}}function ensureDir(_0x51ff1e){!existsSync(_0x51ff1e)&&mkdirSync(_0x51ff1e,{'recursive':!![]});}
1
+ const a60_0x50cfbc=a60_0x2052;(function(_0x5d08c4,_0xac7570){const _0x29ab09=a60_0x2052,_0x248424=_0x5d08c4();while(!![]){try{const _0x59137d=-parseInt(_0x29ab09(0x141))/0x1+parseInt(_0x29ab09(0x15c))/0x2+parseInt(_0x29ab09(0x154))/0x3*(parseInt(_0x29ab09(0x158))/0x4)+parseInt(_0x29ab09(0x135))/0x5*(-parseInt(_0x29ab09(0x134))/0x6)+parseInt(_0x29ab09(0x12a))/0x7+parseInt(_0x29ab09(0x162))/0x8*(-parseInt(_0x29ab09(0x12e))/0x9)+parseInt(_0x29ab09(0x152))/0xa;if(_0x59137d===_0xac7570)break;else _0x248424['push'](_0x248424['shift']());}catch(_0x7ec85c){_0x248424['push'](_0x248424['shift']());}}}(a60_0x5202,0xafeb8));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a60_0x50cfbc(0x128);function a60_0x2052(_0x29c05a,_0xa199b8){_0x29c05a=_0x29c05a-0x128;const _0x520240=a60_0x5202();let _0x20524e=_0x520240[_0x29c05a];return _0x20524e;}export const MCP_COMMAND=a60_0x50cfbc(0x157);export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x54fd14=a60_0x50cfbc,_0x1ba315=readConfig(),_0x59d207=_0x1ba315[_0x54fd14(0x142)]||_0x1ba315[_0x54fd14(0x160)],_0x21561d=_0x1ba315[_0x54fd14(0x15f)]||'online';if(!_0x59d207)throw new Error(_0x54fd14(0x143));return{'appcode':String(_0x59d207),'env':_0x21561d};}export function buildMcpEnv(_0x1cf738,_0x3c950a){const _0x3980da=a60_0x50cfbc,_0xfae599={'LOVRABET_APP_CODE':_0x1cf738};return _0x3c950a!==_0x3980da(0x148)&&(_0xfae599[_0x3980da(0x165)]=_0x3c950a),_0xfae599;}function a60_0x5202(){const _0x1a2fcc=['AppCode:\x20',',\x20env=','7848qbgbel','\x22LOVRABET_APP_CODE\x22:\x20\x22','配置失败','配置信息:','环境:\x20','claude\x20mcp\x20add\x20','2748858nQNWvq','5WHuJwJ','创建新的\x20mcp.json\x20配置','mcp-cursor','创建\x20Cursor\x20Rules\x20文件','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','push','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','\x20-e\x20LOVRABET_ENV=','\x22LOVRABET_ENV\x22:\x20\x22','\x0a\x20\x20','lovrabet_rules.mdc','utf8','592712KEBMCJ','appcode','未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','复制\x20agents.md\x20文件失败','message','重启\x20Cursor\x20后生效','online','join','\x20\x20}','Cursor\x20Rules\x20文件已存在,跳过','stringify','mcpServers','.cursor','parse','\x20\x20\x20\x20\x20\x20}','创建\x20agents.md\x20文件','11545330IaIvjj','info','9ttYzgG','复制\x20Cursor\x20Rules\x20文件失败','error','npx','1177716eyVkVW','重启\x20Claude\x20Code\x20后生效','mcp-install','utf-8','874092Hqnkeh','配置\x20Cursor\x20MCP\x20失败','mcp.json','env','app','map','12896LShWDx','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','agents.md','LOVRABET_ENV','更新现有\x20mcp.json\x20配置','mcp-claude','配置信息:\x20appcode=','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide','agents.md\x20文件已存在,跳过','lovrabet-dataset','\x20\x20\x20\x20}','4915547TbzyLG','配置\x20Cursor\x20MCP\x20成功'];a60_0x5202=function(){return _0x1a2fcc;};return a60_0x5202();}export function buildMcpServerConfig(_0x6d09e0,_0x670345){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x6d09e0,_0x670345)};}export function buildClaudeMcpCommand(_0x587f5f,_0xf8a6b0){const _0x20dcfa=a60_0x50cfbc,_0x2d4827=_0x20dcfa(0x133)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS['join']('\x20')+'\x20-e\x20LOVRABET_APP_CODE='+_0x587f5f,_0xa50d26=_0xf8a6b0!=='online'?_0x20dcfa(0x13c)+_0xf8a6b0:'';return''+_0x2d4827+_0xa50d26;}export async function copyCursorRules(_0x258746){const _0x521657=a60_0x50cfbc,_0x42f07e=join(_0x258746,_0x521657(0x14e)),_0x4ae98f=join(_0x42f07e,'rules'),_0x2d6b06=join(_0x4ae98f,_0x521657(0x13f));if(existsSync(_0x2d6b06))return logger[_0x521657(0x153)](_0x521657(0x15a),_0x521657(0x14b),{'path':_0x2d6b06}),![];try{ensureDir(_0x4ae98f);const _0x4bc750=await getRulesContent();return writeFileSync(_0x2d6b06,_0x4bc750,_0x521657(0x15b)),logger['info'](_0x521657(0x15a),_0x521657(0x138),{'to':_0x2d6b06}),!![];}catch(_0x3e65d9){return logger[_0x521657(0x156)]('mcp-install',_0x521657(0x155),{'error':_0x3e65d9 instanceof Error?_0x3e65d9[_0x521657(0x146)]:String(_0x3e65d9)}),![];}}export async function copyAgentsMd(_0xba27ab){const _0x1ae9e0=a60_0x50cfbc,_0x4f800b=join(_0xba27ab,_0x1ae9e0(0x164));if(existsSync(_0x4f800b))return logger[_0x1ae9e0(0x153)](_0x1ae9e0(0x15a),_0x1ae9e0(0x16a),{'path':_0x4f800b}),![];try{const _0x4111dc=await getRulesContent();return writeFileSync(_0x4f800b,_0x4111dc,_0x1ae9e0(0x15b)),logger[_0x1ae9e0(0x153)](_0x1ae9e0(0x15a),_0x1ae9e0(0x151),{'to':_0x4f800b}),!![];}catch(_0x3c3fee){return logger[_0x1ae9e0(0x156)]('mcp-install',_0x1ae9e0(0x145),{'error':_0x3c3fee instanceof Error?_0x3c3fee[_0x1ae9e0(0x146)]:String(_0x3c3fee)}),![];}}export async function configureCursorMcp(_0x17f844){const _0x3b13d6=a60_0x50cfbc;try{const {appcode:_0x2db09d,env:_0x5607b0}=getAppConfig(),_0x4fe846=join(_0x17f844,'.cursor'),_0xa18f93=join(_0x4fe846,_0x3b13d6(0x15e));ensureDir(_0x4fe846);const _0x4bdf17=buildMcpServerConfig(_0x2db09d,_0x5607b0);let _0x45693f;if(existsSync(_0xa18f93)){const _0x554ad4=readFileSync(_0xa18f93,_0x3b13d6(0x140));_0x45693f=JSON[_0x3b13d6(0x14f)](_0x554ad4),!_0x45693f[_0x3b13d6(0x14d)]&&(_0x45693f[_0x3b13d6(0x14d)]={}),logger[_0x3b13d6(0x153)](_0x3b13d6(0x137),_0x3b13d6(0x166),{'path':_0xa18f93,'appcode':_0x2db09d,'env':_0x5607b0});}else _0x45693f={'mcpServers':{}},logger[_0x3b13d6(0x153)](_0x3b13d6(0x137),_0x3b13d6(0x136),{'path':_0xa18f93,'appcode':_0x2db09d,'env':_0x5607b0});_0x45693f[_0x3b13d6(0x14d)][MCP_SERVER_NAME]=_0x4bdf17,writeFileSync(_0xa18f93,JSON[_0x3b13d6(0x14c)](_0x45693f,null,0x2),{'encoding':_0x3b13d6(0x140)});const _0x195d30=await copyCursorRules(_0x17f844),_0x40c7b3=['已写入\x20.cursor/mcp.json',_0x3b13d6(0x12c)+_0x2db09d];return _0x5607b0!==_0x3b13d6(0x148)&&_0x40c7b3[_0x3b13d6(0x13a)](_0x3b13d6(0x132)+_0x5607b0),_0x40c7b3['push'](_0x3b13d6(0x147)),_0x195d30&&_0x40c7b3[_0x3b13d6(0x13a)]('已创建\x20Cursor\x20Rules\x20文件'),logger[_0x3b13d6(0x153)](_0x3b13d6(0x137),_0x3b13d6(0x12b),{'appcode':_0x2db09d,'env':_0x5607b0,'configPath':_0xa18f93}),{'success':!![],'message':_0x40c7b3['join'](_0x3b13d6(0x13e))};}catch(_0x413fa7){return logger[_0x3b13d6(0x156)]('mcp-cursor',_0x3b13d6(0x15d),{'error':_0x413fa7 instanceof Error?_0x413fa7['message']:String(_0x413fa7)}),{'success':![],'message':_0x413fa7 instanceof Error?_0x413fa7[_0x3b13d6(0x146)]:String(_0x413fa7)};}}export function configureClaudeMcp(_0x483b32){const _0x3dbb2e=a60_0x50cfbc;try{const {appcode:_0x3f4b72,env:_0xc16ba7}=getAppConfig();copyAgentsMd(_0x483b32);const _0x1caeb0=buildClaudeMcpCommand(_0x3f4b72,_0xc16ba7),_0x110dab=['请执行以下命令配置\x20Claude\x20Code\x20MCP:',''+_0x1caeb0,_0x3dbb2e(0x131),_0x3dbb2e(0x12c)+_0x3f4b72];return _0xc16ba7!==_0x3dbb2e(0x148)&&_0x110dab['push'](_0x3dbb2e(0x132)+_0xc16ba7),_0x110dab[_0x3dbb2e(0x13a)](_0x3dbb2e(0x159)),logger[_0x3dbb2e(0x153)](_0x3dbb2e(0x167),'生成配置命令',{'appcode':_0x3f4b72,'env':_0xc16ba7,'command':_0x1caeb0}),{'success':!![],'message':_0x110dab['join']('\x0a\x20\x20'),'needsManualAction':!![]};}catch(_0x415a70){return logger[_0x3dbb2e(0x156)](_0x3dbb2e(0x167),_0x3dbb2e(0x130),{'error':_0x415a70 instanceof Error?_0x415a70[_0x3dbb2e(0x146)]:String(_0x415a70)}),{'success':![],'message':_0x415a70 instanceof Error?_0x415a70[_0x3dbb2e(0x146)]:String(_0x415a70)};}}export function showOtherMcpGuide(_0x54d6c3){const _0x37bbf2=a60_0x50cfbc;try{const {appcode:_0x3d597b,env:_0x27af48}=getAppConfig(),_0x2bc280=buildMcpServerConfig(_0x3d597b,_0x27af48),_0xe117ec=[_0x37bbf2(0x12f)+_0x3d597b+'\x22'];_0x27af48!==_0x37bbf2(0x148)&&_0xe117ec[_0x37bbf2(0x13a)](_0x37bbf2(0x13d)+_0x27af48+'\x22');const _0x10238f=[_0x37bbf2(0x168)+_0x3d597b+_0x37bbf2(0x12d)+_0x27af48,'{','\x20\x20\x22mcpServers\x22:\x20{',_0x37bbf2(0x139),_0x37bbf2(0x144),_0x37bbf2(0x13b),_0x37bbf2(0x163),..._0xe117ec[_0x37bbf2(0x161)](_0x4dd2fd=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4dd2fd+','),_0x37bbf2(0x150),_0x37bbf2(0x129),_0x37bbf2(0x14a),'}',_0x37bbf2(0x169)];return logger['info'](_0x37bbf2(0x15a),'其他\x20IDE\x20配置指引已显示',{'appcode':_0x3d597b,'env':_0x27af48}),{'success':!![],'message':_0x10238f[_0x37bbf2(0x149)]('\x0a'),'needsManualAction':!![]};}catch(_0x28342c){return{'success':![],'message':_0x28342c instanceof Error?_0x28342c[_0x37bbf2(0x146)]:String(_0x28342c)};}}function ensureDir(_0x23f6b8){!existsSync(_0x23f6b8)&&mkdirSync(_0x23f6b8,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a60_0x285dec=a60_0x18ae;function a60_0x5d9c(){const _0x41ca4a=['.lovrabet/skill-manifest.json','getSelectedIDEs','../../cdn-source/skills','748500cCZmok','1167525LUxNXp','\x20\x20✓\x20','正在从\x20CDN\x20拉取开发者指南...','setLogPath','gray','installing','4dRelII','toISOString','\x20个开发者指南','name','正在安装技能包...','keys','✓\x20拉取\x20','setErrorMsg','1491288KGrFhn','selecting','cyan','size','安装成功','2998mLjNWf','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','6wSSAtK','2.0.0','已安装\x20','1089368cdizFw','997809ugGXkK','log','✓\x20技能包安装成功!共安装\x20','column','error','stringify','done','请至少选择一个\x20IDE','已选择\x20IDE','utf-8','10iubFMM','安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','message','selectedIndexes','9227306kErEuL','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','skill-install','handleKeyDown','3NNPsdf','map','\x20个目录','按任意键退出...','length','warn','info','green','guides'];a60_0x5d9c=function(){return _0x41ca4a;};return a60_0x5d9c();}(function(_0x2866ca,_0x19b186){const _0x43db30=a60_0x18ae,_0xbc27c=_0x2866ca();while(!![]){try{const _0x5dab9a=-parseInt(_0x43db30(0x197))/0x1*(parseInt(_0x43db30(0x17f))/0x2)+-parseInt(_0x43db30(0x185))/0x3*(parseInt(_0x43db30(0x1aa))/0x4)+-parseInt(_0x43db30(0x1a3))/0x5*(parseInt(_0x43db30(0x181))/0x6)+parseInt(_0x43db30(0x184))/0x7+-parseInt(_0x43db30(0x17a))/0x8+-parseInt(_0x43db30(0x1a4))/0x9+-parseInt(_0x43db30(0x18f))/0xa*(-parseInt(_0x43db30(0x193))/0xb);if(_0x5dab9a===_0x19b186)break;else _0xbc27c['push'](_0xbc27c['shift']());}catch(_0x6f6e4d){_0xbc27c['push'](_0xbc27c['shift']());}}}(a60_0x5d9c,0x2ec2e));import{jsx as a60_0x36be4f,jsxs as a60_0x3c75dd,Fragment as a60_0x398a95}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST['map'](_0x397ff0=>({'key':_0x397ff0,'name':IDE_CONFIGS[_0x397ff0][a60_0x285dec(0x175)],'description':IDE_CONFIGS[_0x397ff0]['description']}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x4170fb=a60_0x285dec,{exit:_0x3a506b}=useApp(),[_0x2fd79f,_0x2e498b]=useState('selecting'),[_0x2319d8,_0x5bbefb]=useState([]),[_0x35cf92,_0x56e951]=useState([]),[_0x108e00,_0x54fdbf]=useState(0x0),_0x1f29b9=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x345c73=a60_0x18ae;preselectedIDEs[_0x345c73(0x19b)]>0x0&&_0x1f29b9[_0x345c73(0x192)][_0x345c73(0x17d)]>0x0&&_0x12f2eb();},[]),useInput((_0x3db721,_0x3bd8bc)=>{const _0x5ae23b=a60_0x18ae;if(_0x2fd79f===_0x5ae23b(0x17b)){if(_0x3db721==='q'||_0x3db721==='Q'){_0x3a506b();return;}if(_0x3bd8bc['return']){if(_0x1f29b9['selectedIndexes']['size']===0x0){_0x1f29b9[_0x5ae23b(0x179)](_0x5ae23b(0x18c));return;}_0x12f2eb();return;}_0x1f29b9[_0x5ae23b(0x196)](_0x3db721,_0x3bd8bc);}_0x2fd79f===_0x5ae23b(0x18b)&&_0x3a506b();});async function _0x12f2eb(){const _0x3084a6=a60_0x18ae,_0x51c1fc=_0x1f29b9[_0x3084a6(0x1a1)]();_0x56e951(_0x51c1fc),_0x5bbefb([{'label':_0x3084a6(0x18d),'value':_0x1f29b9[_0x3084a6(0x192)]['size']+'\x20个'}]),_0x2e498b(_0x3084a6(0x1a9)),await _0x4446f1(_0x51c1fc);}async function _0x4446f1(_0x838f47){const _0x4e4b1b=a60_0x18ae,_0x418b13=process['cwd'](),_0x273839=resolve(__dirname,_0x4e4b1b(0x1a2));logger[_0x4e4b1b(0x1a7)](_0x418b13),console[_0x4e4b1b(0x186)](_0x4e4b1b(0x1a6));let _0x3b1d78;try{_0x3b1d78=await fetchGuidesFromCDN(),console[_0x4e4b1b(0x186)](_0x4e4b1b(0x178)+Object[_0x4e4b1b(0x177)](_0x3b1d78[_0x4e4b1b(0x19f)])['length']+_0x4e4b1b(0x174));}catch(_0x10d73d){console[_0x4e4b1b(0x19c)](_0x4e4b1b(0x194)+(_0x10d73d instanceof Error?_0x10d73d['message']:String(_0x10d73d)));}let _0x1727e2=0x0;for(const _0x29b5ed of _0x838f47){try{const _0xc07847=IDE_CONFIGS[_0x29b5ed],_0x2b28b5=await installSingleIDE(_0x29b5ed,_0xc07847,_0x418b13,_0x273839,_0x3b1d78);_0x1727e2+=_0x2b28b5,_0x54fdbf(_0x1727e2);}catch(_0x336900){console[_0x4e4b1b(0x189)]('\x20\x20✗\x20安装\x20'+_0x29b5ed+'\x20失败:\x20'+(_0x336900 instanceof Error?_0x336900[_0x4e4b1b(0x191)]:String(_0x336900)));}}_0x3b1d78&&writeGuidesToProject(_0x3b1d78,_0x418b13);const _0x1072f4={'version':_0x4e4b1b(0x182),'installedAt':new Date()[_0x4e4b1b(0x1ab)](),'platforms':_0x838f47},_0x3da56f=join(_0x418b13,_0x4e4b1b(0x1a0)),_0x4214a7=join(_0x418b13,'.lovrabet');await copyDir(_0x4214a7,_0x4214a7),writeFileSync(_0x3da56f,JSON[_0x4e4b1b(0x18a)](_0x1072f4,null,0x2),_0x4e4b1b(0x18e)),logger[_0x4e4b1b(0x19d)](_0x4e4b1b(0x195),_0x4e4b1b(0x17e),{'projectRoot':_0x418b13,'ides':_0x838f47,'foldersCount':_0x1727e2}),_0x2e498b(_0x4e4b1b(0x18b)),setTimeout(()=>{_0x3a506b();},0x3e8);}return a60_0x3c75dd(Box,{'flexDirection':_0x4170fb(0x188),'marginTop':0x1,'children':[_0x2fd79f===_0x4170fb(0x17b)&&a60_0x36be4f(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x4170fb(0x190),'selection':_0x1f29b9}),_0x2fd79f==='installing'&&a60_0x36be4f(InstallingStep,{'completedSteps':_0x2319d8,'installingIDEs':_0x35cf92,'installedCount':_0x108e00}),_0x2fd79f===_0x4170fb(0x18b)&&a60_0x36be4f(DoneStep,{'installedCount':_0x108e00})]});}function a60_0x18ae(_0x102d9e,_0x4d360c){_0x102d9e=_0x102d9e-0x174;const _0x5d9c39=a60_0x5d9c();let _0x18aee0=_0x5d9c39[_0x102d9e];return _0x18aee0;}function InstallingStep({completedSteps:_0x4dcb8e,installingIDEs:_0x9218,installedCount:_0xb16bbe}){const _0xc25ac=a60_0x285dec;return a60_0x3c75dd(a60_0x398a95,{'children':[_0x4dcb8e['map']((_0x2fe3df,_0x3b3f37)=>a60_0x3c75dd(Box,{'children':[a60_0x3c75dd(Text,{'color':_0xc25ac(0x19e),'children':['√\x20',_0x2fe3df['label'],':\x20']}),a60_0x36be4f(Text,{'color':_0xc25ac(0x17c),'children':_0x2fe3df['value']})]},_0x3b3f37)),a60_0x36be4f(Box,{'marginTop':0x1,'children':a60_0x36be4f(Text,{'children':_0xc25ac(0x176)})}),_0x9218[_0xc25ac(0x198)](_0x5c7f12=>a60_0x3c75dd(Box,{'children':[a60_0x36be4f(Text,{'color':'green','children':_0xc25ac(0x1a5)}),a60_0x36be4f(Text,{'children':IDE_CONFIGS[_0x5c7f12]?.['name']||_0x5c7f12})]},_0x5c7f12)),a60_0x36be4f(Box,{'marginTop':0x1,'children':a60_0x3c75dd(Text,{'color':_0xc25ac(0x1a8),'children':[_0xc25ac(0x183),_0xb16bbe,_0xc25ac(0x199)]})})]});}function DoneStep({installedCount:_0x2e8d2b}){const _0x5a76a3=a60_0x285dec;return a60_0x3c75dd(a60_0x398a95,{'children':[a60_0x36be4f(Box,{'children':a60_0x3c75dd(Text,{'color':_0x5a76a3(0x19e),'children':[_0x5a76a3(0x187),_0x2e8d2b,_0x5a76a3(0x199)]})}),a60_0x36be4f(Box,{'marginTop':0x1,'children':a60_0x36be4f(Text,{'color':_0x5a76a3(0x1a8),'children':_0x5a76a3(0x180)})}),a60_0x36be4f(Box,{'marginTop':0x1,'children':a60_0x36be4f(Text,{'color':_0x5a76a3(0x1a8),'children':_0x5a76a3(0x19a)})})]});}async function copyDirIfNeeded(_0x369d6f,_0x4466e8){try{return await copyDir(_0x369d6f,_0x4466e8),!![];}catch{return![];}}
1
+ const a61_0x5a5309=a61_0x2af6;(function(_0x18d5fe,_0x116973){const _0x4f9cb0=a61_0x2af6,_0x3047bc=_0x18d5fe();while(!![]){try{const _0x261058=-parseInt(_0x4f9cb0(0xd0))/0x1*(-parseInt(_0x4f9cb0(0xc8))/0x2)+parseInt(_0x4f9cb0(0xa4))/0x3+-parseInt(_0x4f9cb0(0xbc))/0x4+parseInt(_0x4f9cb0(0xc7))/0x5+-parseInt(_0x4f9cb0(0xb5))/0x6+-parseInt(_0x4f9cb0(0xbb))/0x7*(parseInt(_0x4f9cb0(0xa9))/0x8)+-parseInt(_0x4f9cb0(0xbf))/0x9*(parseInt(_0x4f9cb0(0xb8))/0xa);if(_0x261058===_0x116973)break;else _0x3047bc['push'](_0x3047bc['shift']());}catch(_0x5f5acf){_0x3047bc['push'](_0x3047bc['shift']());}}}(a61_0x512f,0x80727));import{jsx as a61_0x3c92e8,jsxs as a61_0x43864a,Fragment as a61_0x3bb50e}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';function a61_0x512f(){const _0x1c95e2=['column','已安装\x20','2332290vHAdCA','安装成功','done','20hrpoZU','按任意键退出...','length','7eHqpKX','68940EEBqeo','skill-install','selecting','1123749qaWQaJ','keys','error','\x20个目录','utf-8','正在安装技能包...','cwd','selectedIndexes','5036815cEdScz','14pNwbLD','log','description','return','.lovrabet','正在从\x20CDN\x20拉取开发者指南','cyan','.lovrabet/skill-manifest.json','52007MUEbOG','green','setErrorMsg','\x20失败:\x20','请至少选择一个\x20IDE','\x20\x20✗\x20安装\x20','✓\x20技能包安装成功!共安装\x20','.lovrabet/skill/.shared/guides','...','262098tvmipT','installing','message','size','✓\x20拉取\x20','2215896hLHkRf','value','\x20个开发者指南','gray','name','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','info','已选择\x20IDE','2.0.0','map'];a61_0x512f=function(){return _0x1c95e2;};return a61_0x512f();}import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a61_0x5a5309(0xb2)](_0x3e5bbe=>({'key':_0x3e5bbe,'name':IDE_CONFIGS[_0x3e5bbe][a61_0x5a5309(0xad)],'description':IDE_CONFIGS[_0x3e5bbe][a61_0x5a5309(0xca)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x72ae11}){const _0x2a09c4=a61_0x5a5309,{exit:_0x11ef2d}=useApp(),[_0x538b5c,_0x1151ff]=useState(_0x2a09c4(0xbe)),[_0xe9747b,_0x2066e7]=useState([]),[_0x4045f4,_0x58d699]=useState([]),[_0x48c59b,_0x110e3a]=useState(0x0),_0x24e5bf=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x41e1b0=_0x2a09c4;preselectedIDEs[_0x41e1b0(0xba)]>0x0&&_0x24e5bf['selectedIndexes'][_0x41e1b0(0xa7)]>0x0&&_0x25d85e();},[]),useInput((_0x17f914,_0x4c1ac2)=>{const _0x334aac=_0x2a09c4;if(_0x538b5c===_0x334aac(0xbe)){if(_0x17f914==='q'||_0x17f914==='Q'){_0x11ef2d();return;}if(_0x4c1ac2[_0x334aac(0xcb)]){if(_0x24e5bf['selectedIndexes'][_0x334aac(0xa7)]===0x0){_0x24e5bf[_0x334aac(0x9d)](_0x334aac(0x9f));return;}_0x25d85e();return;}_0x24e5bf['handleKeyDown'](_0x17f914,_0x4c1ac2);}_0x538b5c==='done'&&_0x11ef2d();});async function _0x25d85e(){const _0x2e77eb=_0x2a09c4,_0x520159=_0x24e5bf['getSelectedIDEs']();_0x58d699(_0x520159),_0x2066e7([{'label':_0x2e77eb(0xb0),'value':_0x24e5bf[_0x2e77eb(0xc6)]['size']+'\x20个'}]),_0x1151ff(_0x2e77eb(0xa5)),await _0x26a691(_0x520159);}async function _0x26a691(_0x8f00ed){const _0x572278=_0x2a09c4,_0x3a15fc=process[_0x572278(0xc5)](),_0x5b151c=resolve(__dirname,'../../cdn-source/skills');logger['setLogPath'](_0x3a15fc);const _0x34e2c5=_0x72ae11&&_0x72ae11[_0x572278(0xba)]>0x0;console[_0x572278(0xc9)](_0x572278(0xcd)+(_0x34e2c5?'(含扩展)':'')+_0x572278(0xa3));let _0x493a2b;try{_0x493a2b=await fetchGuidesFromCDN(_0x34e2c5),console[_0x572278(0xc9)](_0x572278(0xa8)+Object[_0x572278(0xc0)](_0x493a2b['guides'])[_0x572278(0xba)]+_0x572278(0xab));}catch(_0x477704){console['warn']('\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20'+(_0x477704 instanceof Error?_0x477704[_0x572278(0xa6)]:String(_0x477704)));}let _0x1de9e8=0x0;for(const _0x1db772 of _0x8f00ed){try{const _0x20181d=IDE_CONFIGS[_0x1db772],_0x45bd06=await installSingleIDE(_0x1db772,_0x20181d,_0x3a15fc,_0x5b151c,_0x493a2b,_0x72ae11);_0x1de9e8+=_0x45bd06,_0x110e3a(_0x1de9e8);}catch(_0x2d9957){console[_0x572278(0xc1)](_0x572278(0xa0)+_0x1db772+_0x572278(0x9e)+(_0x2d9957 instanceof Error?_0x2d9957[_0x572278(0xa6)]:String(_0x2d9957)));}}_0x493a2b&&writeGuidesToProject(_0x493a2b,_0x3a15fc,_0x572278(0xa2),_0x72ae11);const _0xb17d14={'version':_0x572278(0xb1),'installedAt':new Date()['toISOString'](),'platforms':_0x8f00ed},_0x56eb4a=join(_0x3a15fc,_0x572278(0xcf)),_0x590832=join(_0x3a15fc,_0x572278(0xcc));await copyDir(_0x590832,_0x590832),writeFileSync(_0x56eb4a,JSON['stringify'](_0xb17d14,null,0x2),_0x572278(0xc3)),logger[_0x572278(0xaf)](_0x572278(0xbd),_0x572278(0xb6),{'projectRoot':_0x3a15fc,'ides':_0x8f00ed,'foldersCount':_0x1de9e8}),_0x1151ff(_0x572278(0xb7)),setTimeout(()=>{_0x11ef2d();},0x3e8);}return a61_0x43864a(Box,{'flexDirection':_0x2a09c4(0xb3),'marginTop':0x1,'children':[_0x538b5c===_0x2a09c4(0xbe)&&a61_0x3c92e8(IDESelector,{'ideList':UI_IDE_LIST,'title':'安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','selection':_0x24e5bf}),_0x538b5c==='installing'&&a61_0x3c92e8(InstallingStep,{'completedSteps':_0xe9747b,'installingIDEs':_0x4045f4,'installedCount':_0x48c59b}),_0x538b5c===_0x2a09c4(0xb7)&&a61_0x3c92e8(DoneStep,{'installedCount':_0x48c59b})]});}function InstallingStep({completedSteps:_0x461329,installingIDEs:_0x568e25,installedCount:_0xe08016}){const _0x4fa097=a61_0x5a5309;return a61_0x43864a(a61_0x3bb50e,{'children':[_0x461329[_0x4fa097(0xb2)]((_0x3dd9f2,_0x2161d0)=>a61_0x43864a(Box,{'children':[a61_0x43864a(Text,{'color':_0x4fa097(0x9c),'children':['√\x20',_0x3dd9f2['label'],':\x20']}),a61_0x3c92e8(Text,{'color':_0x4fa097(0xce),'children':_0x3dd9f2[_0x4fa097(0xaa)]})]},_0x2161d0)),a61_0x3c92e8(Box,{'marginTop':0x1,'children':a61_0x3c92e8(Text,{'children':_0x4fa097(0xc4)})}),_0x568e25[_0x4fa097(0xb2)](_0x38d615=>a61_0x43864a(Box,{'children':[a61_0x3c92e8(Text,{'color':'green','children':'\x20\x20✓\x20'}),a61_0x3c92e8(Text,{'children':IDE_CONFIGS[_0x38d615]?.[_0x4fa097(0xad)]||_0x38d615})]},_0x38d615)),a61_0x3c92e8(Box,{'marginTop':0x1,'children':a61_0x43864a(Text,{'color':_0x4fa097(0xac),'children':[_0x4fa097(0xb4),_0xe08016,'\x20个目录']})})]});}function a61_0x2af6(_0x31e929,_0x59704c){_0x31e929=_0x31e929-0x9c;const _0x512ff7=a61_0x512f();let _0x2af6d7=_0x512ff7[_0x31e929];return _0x2af6d7;}function DoneStep({installedCount:_0x372e9e}){const _0x3e8715=a61_0x5a5309;return a61_0x43864a(a61_0x3bb50e,{'children':[a61_0x3c92e8(Box,{'children':a61_0x43864a(Text,{'color':_0x3e8715(0x9c),'children':[_0x3e8715(0xa1),_0x372e9e,_0x3e8715(0xc2)]})}),a61_0x3c92e8(Box,{'marginTop':0x1,'children':a61_0x3c92e8(Text,{'color':_0x3e8715(0xac),'children':_0x3e8715(0xae)})}),a61_0x3c92e8(Box,{'marginTop':0x1,'children':a61_0x3c92e8(Text,{'color':_0x3e8715(0xac),'children':_0x3e8715(0xb9)})})]});}async function copyDirIfNeeded(_0x5d7265,_0x7198f6){try{return await copyDir(_0x5d7265,_0x7198f6),!![];}catch{return![];}}