@lovrabet/cli 1.3.1 → 1.3.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -0
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x3bd6fd,_0x21402e){const _0x5ece0b=a44_0x4a59,_0x52d5fd=_0x3bd6fd();while(!![]){try{const _0x3c9b62=parseInt(_0x5ece0b(0x116))/0x1*(-parseInt(_0x5ece0b(0x11c))/0x2)+parseInt(_0x5ece0b(0x126))/0x3+-parseInt(_0x5ece0b(0x148))/0x4+parseInt(_0x5ece0b(0x135))/0x5+parseInt(_0x5ece0b(0x149))/0x6+parseInt(_0x5ece0b(0x11b))/0x7*(-parseInt(_0x5ece0b(0x118))/0x8)+-parseInt(_0x5ece0b(0x13a))/0x9*(-parseInt(_0x5ece0b(0x138))/0xa);if(_0x3c9b62===_0x21402e)break;else _0x52d5fd['push'](_0x52d5fd['shift']());}catch(_0x2a03a9){_0x52d5fd['push'](_0x52d5fd['shift']());}}}(a44_0x421a,0x4afa5));import a44_0x15adab from'path';import{fileURLToPath}from'url';import a44_0x119bd6 from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x5ae791=a44_0x4a59,_0x115c0f=fileURLToPath(import.meta.url),_0x499cfd=a44_0x15adab[_0x5ae791(0x122)](_0x115c0f);return a44_0x15adab[_0x5ae791(0x11d)](_0x499cfd,_0x5ae791(0x12b));}export async function createProjectNonInteractive(_0x3068a9,_0x339cbd){const _0xc16dba=a44_0x4a59,_0x389b0c=await checkCliVersion();_0x389b0c[_0xc16dba(0x129)]&&printCliUpgradeWarning(_0x389b0c);(!_0x3068a9||_0x3068a9[_0xc16dba(0x119)]()==='')&&(console['error']('×\x20项目名不能为空'),process[_0xc16dba(0x11e)](0x1));const _0x28f60c=/[<>:"|?*\x00-\x1f\x7f]/;_0x28f60c[_0xc16dba(0x139)](_0x3068a9)&&(console[_0xc16dba(0x13f)]('×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符'),process['exit'](0x1));_0x3068a9[_0xc16dba(0x120)]>0x64&&(console[_0xc16dba(0x13f)]('×\x20项目名过长,最多支持\x20100\x20个字符'),process['exit'](0x1));const _0x4b9b9a=a44_0x15adab[_0xc16dba(0x11d)](process[_0xc16dba(0x137)](),_0x3068a9);existsSync(_0x4b9b9a)&&(console[_0xc16dba(0x13f)](_0xc16dba(0x142)+_0x3068a9+'\x20已存在,请使用其他项目名'),process[_0xc16dba(0x11e)](0x1));try{const _0x287faa=a44_0x15adab[_0xc16dba(0x122)](_0x4b9b9a);await a44_0x119bd6[_0xc16dba(0x117)](_0x287faa,a44_0x119bd6[_0xc16dba(0x12d)][_0xc16dba(0x131)]);}catch(_0x248f33){console[_0xc16dba(0x13f)](_0xc16dba(0x144)),process[_0xc16dba(0x11e)](0x1);}try{console[_0xc16dba(0x136)](_0xc16dba(0x123)+_0x3068a9+'...');const _0x13da2a=getTemplateDir();await copyDirectory(_0x13da2a,_0x4b9b9a),console[_0xc16dba(0x136)](_0xc16dba(0x130)),await updatePackageJsonName(_0x3068a9),console['log'](_0xc16dba(0x124)),console[_0xc16dba(0x136)](_0xc16dba(0x143)),console[_0xc16dba(0x136)](_0xc16dba(0x12e)),await formatCode(_0x4b9b9a),console[_0xc16dba(0x136)]('\x20\x20√\x20代码已格式化'),await configureAppEnv(_0x3068a9,_0x339cbd),console['log'](_0xc16dba(0x11f)),console['log'](_0xc16dba(0x125)+_0x3068a9+_0xc16dba(0x145)),console[_0xc16dba(0x136)](_0xc16dba(0x12c)+_0x3068a9),console[_0xc16dba(0x136)](_0xc16dba(0x12a));}catch(_0x378c40){const _0xb53266=_0x378c40 instanceof Error?_0x378c40['message']:String(_0x378c40);try{existsSync(_0x4b9b9a)&&await a44_0x119bd6['rm'](_0x4b9b9a,{'recursive':!![],'force':!![]});}catch{}console['error']('×\x20项目创建失败:\x20'+_0xb53266),process['exit'](0x1);}}async function updatePackageJsonName(_0x31bd97){const _0x2223b9=a44_0x4a59,_0x11e98c=a44_0x15adab[_0x2223b9(0x11d)](process[_0x2223b9(0x137)](),_0x31bd97),_0x17cf37=a44_0x15adab[_0x2223b9(0x127)](_0x11e98c,_0x2223b9(0x146)),_0x363c39=await a44_0x119bd6['readFile'](_0x17cf37,_0x2223b9(0x13e)),_0x1c77a0=JSON[_0x2223b9(0x11a)](_0x363c39);_0x1c77a0[_0x2223b9(0x14a)]=_0x31bd97,_0x1c77a0[_0x2223b9(0x147)]=_0x2223b9(0x13c),await a44_0x119bd6[_0x2223b9(0x133)](_0x17cf37,JSON[_0x2223b9(0x121)](_0x1c77a0,null,0x2)+'\x0a');}async function installDependencies(_0x13f03e){const _0x4df779=a44_0x4a59,_0x2e3874=detectPackageManager(),_0x4af8e7=_0x2e3874+_0x4df779(0x132);try{await execAsync(_0x4af8e7,{'cwd':_0x13f03e});}catch(_0x4e23e0){throw new Error(_0x4df779(0x13d)+_0x4e23e0);}}function detectPackageManager(){const _0x6facf8=a44_0x4a59;try{return execAsync(_0x6facf8(0x134),{}),_0x6facf8(0x140);}catch{return _0x6facf8(0x128);}}function a44_0x4a59(_0x54dd1e,_0x5203de){_0x54dd1e=_0x54dd1e-0x116;const _0x421ae7=a44_0x421a();let _0x4a5921=_0x421ae7[_0x54dd1e];return _0x4a5921;}async function formatCode(_0x53bbc0){const _0x5c8a44=a44_0x4a59;try{await execAsync(_0x5c8a44(0x13b),{'cwd':_0x53bbc0});}catch{}}function a44_0x421a(){const _0x42ba96=['bun\x20--version','1360395RUIQdL','log','cwd','10EvSTli','test','5600763otdubm','bun\x20run\x20format','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','依赖安装失败:\x20','utf-8','error','bun','env','×\x20项目目录\x20','\x20\x20正在安装依赖...','×\x20无法在当前目录创建项目,请检查目录权限','\x20创建成功!','package.json','description','2429108YaxJKR','601524ssytlE','name','15ldrxYs','access','37672lhrifS','trim','parse','875UjPeaL','10674oYrYOM','resolve','exit','\x20\x20√\x20环境配置完成','length','stringify','dirname','*\x20正在创建项目\x20','\x20\x20√\x20package.json\x20已更新','\x0a√\x20项目\x20','1765278ACbwCM','join','npm','needsUpgrade','\x20\x20lovrabet\x20start\x0a','../../templates/projects/sub-app-react-demo','\x0a\x20\x20cd\x20','constants','\x20\x20√\x20依赖安装跳过(非交互模式)','readFile','\x20\x20√\x20项目模板已创建','W_OK','\x20install','writeFile'];a44_0x421a=function(){return _0x42ba96;};return a44_0x421a();}async function configureAppEnv(_0x4b76ed,_0x504505){const _0x43e762=a44_0x4a59,_0x23538c=a44_0x15adab[_0x43e762(0x11d)](process[_0x43e762(0x137)](),_0x4b76ed),_0x5f350a=a44_0x15adab[_0x43e762(0x127)](_0x23538c,'lovrabet.config.json');let _0x1c37d3={};if(existsSync(_0x5f350a)){const _0x124249=await a44_0x119bd6[_0x43e762(0x12f)](_0x5f350a,'utf-8');_0x1c37d3=JSON[_0x43e762(0x11a)](_0x124249);}_0x504505&&(_0x1c37d3[_0x43e762(0x141)]=_0x504505),await a44_0x119bd6[_0x43e762(0x133)](_0x5f350a,JSON[_0x43e762(0x121)](_0x1c37d3,null,0x2)+'\x0a');}
1
+ (function(_0x8f78d7,_0x15889a){const _0x2a2716=a45_0x8891,_0x591491=_0x8f78d7();while(!![]){try{const _0x4f404e=parseInt(_0x2a2716(0x1f6))/0x1*(-parseInt(_0x2a2716(0x21f))/0x2)+parseInt(_0x2a2716(0x1f7))/0x3*(parseInt(_0x2a2716(0x208))/0x4)+parseInt(_0x2a2716(0x213))/0x5+parseInt(_0x2a2716(0x227))/0x6*(parseInt(_0x2a2716(0x21c))/0x7)+parseInt(_0x2a2716(0x20e))/0x8+parseInt(_0x2a2716(0x222))/0x9+-parseInt(_0x2a2716(0x203))/0xa*(parseInt(_0x2a2716(0x20a))/0xb);if(_0x4f404e===_0x15889a)break;else _0x591491['push'](_0x591491['shift']());}catch(_0x8c4470){_0x591491['push'](_0x591491['shift']());}}}(a45_0x5ac0,0x63783));import a45_0x4c24c8 from'path';import{fileURLToPath}from'url';function a45_0x8891(_0x368f4f,_0x3989fc){_0x368f4f=_0x368f4f-0x1f4;const _0x5ac0f7=a45_0x5ac0();let _0x88916d=_0x5ac0f7[_0x368f4f];return _0x88916d;}import a45_0x442cc1 from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x598461=a45_0x8891,_0x1eecb4=fileURLToPath(import.meta.url),_0x13d011=a45_0x4c24c8[_0x598461(0x1f9)](_0x1eecb4);return a45_0x4c24c8[_0x598461(0x20f)](_0x13d011,_0x598461(0x214));}export async function createProjectNonInteractive(_0x960992,_0x22766e){const _0x5e1854=a45_0x8891,_0x337ea7=await checkCliVersion();_0x337ea7['needsUpgrade']&&printCliUpgradeWarning(_0x337ea7);(!_0x960992||_0x960992[_0x5e1854(0x216)]()==='')&&(console[_0x5e1854(0x229)](_0x5e1854(0x226)),process['exit'](0x1));const _0x40f837=/[<>:"|?*\x00-\x1f\x7f]/;_0x40f837[_0x5e1854(0x20b)](_0x960992)&&(console[_0x5e1854(0x229)](_0x5e1854(0x221)),process[_0x5e1854(0x211)](0x1));_0x960992[_0x5e1854(0x215)]>0x64&&(console['error'](_0x5e1854(0x219)),process[_0x5e1854(0x211)](0x1));const _0x30cc6d=a45_0x4c24c8[_0x5e1854(0x20f)](process['cwd'](),_0x960992);existsSync(_0x30cc6d)&&(console['error'](_0x5e1854(0x220)+_0x960992+_0x5e1854(0x206)),process[_0x5e1854(0x211)](0x1));try{const _0x3df689=a45_0x4c24c8[_0x5e1854(0x1f9)](_0x30cc6d);await a45_0x442cc1[_0x5e1854(0x1fc)](_0x3df689,a45_0x442cc1[_0x5e1854(0x1fe)][_0x5e1854(0x1ff)]);}catch(_0x326b0e){console['error'](_0x5e1854(0x21a)),process[_0x5e1854(0x211)](0x1);}try{console[_0x5e1854(0x21d)](_0x5e1854(0x201)+_0x960992+_0x5e1854(0x20c));const _0x10913d=getTemplateDir();await copyDirectory(_0x10913d,_0x30cc6d),console['log'](_0x5e1854(0x21b)),await updatePackageJsonName(_0x960992),console[_0x5e1854(0x21d)]('\x20\x20√\x20package.json\x20已更新'),console[_0x5e1854(0x21d)](_0x5e1854(0x202)),console[_0x5e1854(0x21d)](_0x5e1854(0x1fa)),await formatCode(_0x30cc6d),console['log'](_0x5e1854(0x224)),await configureAppEnv(_0x960992,_0x22766e),console[_0x5e1854(0x21d)](_0x5e1854(0x223)),console[_0x5e1854(0x21d)](_0x5e1854(0x200)+_0x960992+_0x5e1854(0x205)),console[_0x5e1854(0x21d)](_0x5e1854(0x20d)+_0x960992),console[_0x5e1854(0x21d)]('\x20\x20lovrabet\x20start\x0a');}catch(_0x3cfd5d){const _0x2c728d=_0x3cfd5d instanceof Error?_0x3cfd5d['message']:String(_0x3cfd5d);try{existsSync(_0x30cc6d)&&await a45_0x442cc1['rm'](_0x30cc6d,{'recursive':!![],'force':!![]});}catch{}console[_0x5e1854(0x229)]('×\x20项目创建失败:\x20'+_0x2c728d),process[_0x5e1854(0x211)](0x1);}}async function updatePackageJsonName(_0x53c714){const _0x338863=a45_0x8891,_0x1b3f17=a45_0x4c24c8[_0x338863(0x20f)](process[_0x338863(0x210)](),_0x53c714),_0x50cc09=a45_0x4c24c8[_0x338863(0x204)](_0x1b3f17,'package.json'),_0x43eb9f=await a45_0x442cc1[_0x338863(0x212)](_0x50cc09,'utf-8'),_0x5d1d00=JSON[_0x338863(0x207)](_0x43eb9f);_0x5d1d00[_0x338863(0x1f4)]=_0x53c714,_0x5d1d00[_0x338863(0x21e)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a45_0x442cc1[_0x338863(0x1fd)](_0x50cc09,JSON['stringify'](_0x5d1d00,null,0x2)+'\x0a');}function a45_0x5ac0(){const _0x4766e7=['W_OK','\x0a√\x20项目\x20','*\x20正在创建项目\x20','\x20\x20正在安装依赖...','20lqmEJc','join','\x20创建成功!','\x20已存在,请使用其他项目名','parse','524924qIHFYV','bun','5117607dljpaP','test','...','\x0a\x20\x20cd\x20','2925232nzsUVa','resolve','cwd','exit','readFile','2177590NBjyBy','../../templates/projects/sub-app-react-demo','length','trim','lovrabet.config.json','stringify','×\x20项目名过长,最多支持\x20100\x20个字符','×\x20无法在当前目录创建项目,请检查目录权限','\x20\x20√\x20项目模板已创建','3116561Ciupuq','log','description','214994sPRpyQ','×\x20项目目录\x20','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','396342nJMOad','\x20\x20√\x20环境配置完成','\x20\x20√\x20代码已格式化','env','×\x20项目名不能为空','6ZTcNgP','bun\x20run\x20format','error','utf-8','name','\x20install','2mWtjeO','6sPiosd','npm','dirname','\x20\x20√\x20依赖安装跳过(非交互模式)','依赖安装失败:\x20','access','writeFile','constants'];a45_0x5ac0=function(){return _0x4766e7;};return a45_0x5ac0();}async function installDependencies(_0xd2e888){const _0x113eea=a45_0x8891,_0x2b70af=detectPackageManager(),_0x539181=_0x2b70af+_0x113eea(0x1f5);try{await execAsync(_0x539181,{'cwd':_0xd2e888});}catch(_0x1ee1be){throw new Error(_0x113eea(0x1fb)+_0x1ee1be);}}function detectPackageManager(){const _0x5038c1=a45_0x8891;try{return execAsync('bun\x20--version',{}),_0x5038c1(0x209);}catch{return _0x5038c1(0x1f8);}}async function formatCode(_0x114fa6){const _0x14bc30=a45_0x8891;try{await execAsync(_0x14bc30(0x228),{'cwd':_0x114fa6});}catch{}}async function configureAppEnv(_0xcd1295,_0x363721){const _0x1da7f1=a45_0x8891,_0x271cba=a45_0x4c24c8[_0x1da7f1(0x20f)](process[_0x1da7f1(0x210)](),_0xcd1295),_0x9e08fa=a45_0x4c24c8[_0x1da7f1(0x204)](_0x271cba,_0x1da7f1(0x217));let _0x147698={};if(existsSync(_0x9e08fa)){const _0x16222d=await a45_0x442cc1[_0x1da7f1(0x212)](_0x9e08fa,_0x1da7f1(0x22a));_0x147698=JSON[_0x1da7f1(0x207)](_0x16222d);}_0x363721&&(_0x147698[_0x1da7f1(0x225)]=_0x363721),await a45_0x442cc1[_0x1da7f1(0x1fd)](_0x9e08fa,JSON[_0x1da7f1(0x218)](_0x147698,null,0x2)+'\x0a');}
@@ -1 +1 @@
1
- (function(_0x25dace,_0x573034){var _0x4dc9df=a45_0x2cfc,_0x458ad7=_0x25dace();while(!![]){try{var _0x5734ec=parseInt(_0x4dc9df(0x126))/0x1+parseInt(_0x4dc9df(0x12d))/0x2+-parseInt(_0x4dc9df(0x128))/0x3*(parseInt(_0x4dc9df(0x12b))/0x4)+-parseInt(_0x4dc9df(0x12f))/0x5+parseInt(_0x4dc9df(0x12a))/0x6+parseInt(_0x4dc9df(0x127))/0x7+parseInt(_0x4dc9df(0x125))/0x8*(parseInt(_0x4dc9df(0x130))/0x9);if(_0x5734ec===_0x573034)break;else _0x458ad7['push'](_0x458ad7['shift']());}catch(_0x47c6d8){_0x458ad7['push'](_0x458ad7['shift']());}}}(a45_0x13e3,0xecb51));function a45_0x2cfc(_0x25945a,_0x61b83f){_0x25945a=_0x25945a-0x125;var _0x13e320=a45_0x13e3();var _0x2cfce3=_0x13e320[_0x25945a];return _0x2cfce3;}import{jsx as a45_0xd44b13,jsxs as a45_0x21918a}from'react/jsx-runtime';import{Box,Text}from'ink';function a45_0x13e3(){var _0x5870c2=['9107775dZEDiO','6316146RgFdmX','8VpVRON','504316FKzIes','9368527IPQvmN','381zMawJZ','elapsed','1402530UtgUci','11724UjHXRO','green','770238ZTiNbx','\x20√\x20'];a45_0x13e3=function(){return _0x5870c2;};return a45_0x13e3();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x12eac8){var _0x183a10=a45_0x2cfc;return a45_0x21918a(Box,{'children':[a45_0xd44b13(Box,{'width':'1'}),a45_0xd44b13(Text,{'color':_0x183a10(0x12c),'children':_0x183a10(0x12e)}),a45_0xd44b13(Text,{'children':_0x12eac8['taskName']}),a45_0xd44b13(TaskTime,{'elapsed':_0x12eac8[_0x183a10(0x129)]})]});}
1
+ (function(_0x860842,_0x1d25ef){var _0x1b1d0c=a46_0x605f,_0x3bd34b=_0x860842();while(!![]){try{var _0x12731e=-parseInt(_0x1b1d0c(0xc4))/0x1+-parseInt(_0x1b1d0c(0xc6))/0x2*(parseInt(_0x1b1d0c(0xbc))/0x3)+-parseInt(_0x1b1d0c(0xbf))/0x4+parseInt(_0x1b1d0c(0xc9))/0x5*(-parseInt(_0x1b1d0c(0xbb))/0x6)+-parseInt(_0x1b1d0c(0xc7))/0x7*(parseInt(_0x1b1d0c(0xc0))/0x8)+-parseInt(_0x1b1d0c(0xc1))/0x9*(-parseInt(_0x1b1d0c(0xc5))/0xa)+-parseInt(_0x1b1d0c(0xbd))/0xb*(-parseInt(_0x1b1d0c(0xbe))/0xc);if(_0x12731e===_0x1d25ef)break;else _0x3bd34b['push'](_0x3bd34b['shift']());}catch(_0x55ebcb){_0x3bd34b['push'](_0x3bd34b['shift']());}}}(a46_0x1f3b,0xdccc3));import{jsx as a46_0x5bf40f,jsxs as a46_0x4d0cd8}from'react/jsx-runtime';function a46_0x605f(_0xdbbc4e,_0x4540ef){_0xdbbc4e=_0xdbbc4e-0xbb;var _0x1f3be7=a46_0x1f3b();var _0x605fdd=_0x1f3be7[_0xdbbc4e];return _0x605fdd;}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';function a46_0x1f3b(){var _0x348b56=['62tCXjdp','7nQyJqs','\x20√\x20','5718095glgpVM','6XagAAd','128028ZHzWrn','407CTFzYf','2013348HjiryU','5816580IThTHK','10847608vwqeBz','1010673ybVjHg','elapsed','taskName','139062uSXWxg','10Jzdjfy'];a46_0x1f3b=function(){return _0x348b56;};return a46_0x1f3b();}export function TaskFinished(_0x545920){var _0x3a0423=a46_0x605f;return a46_0x4d0cd8(Box,{'children':[a46_0x5bf40f(Box,{'width':'1'}),a46_0x5bf40f(Text,{'color':'green','children':_0x3a0423(0xc8)}),a46_0x5bf40f(Text,{'children':_0x545920[_0x3a0423(0xc3)]}),a46_0x5bf40f(TaskTime,{'elapsed':_0x545920[_0x3a0423(0xc2)]})]});}
@@ -1 +1 @@
1
- (function(_0x5608bb,_0x47696e){var _0x7469aa=a46_0x4140,_0x49f086=_0x5608bb();while(!![]){try{var _0x54ebc6=-parseInt(_0x7469aa(0x6f))/0x1+parseInt(_0x7469aa(0x69))/0x2+-parseInt(_0x7469aa(0x6c))/0x3+parseInt(_0x7469aa(0x71))/0x4*(-parseInt(_0x7469aa(0x6d))/0x5)+-parseInt(_0x7469aa(0x6a))/0x6+parseInt(_0x7469aa(0x75))/0x7*(parseInt(_0x7469aa(0x70))/0x8)+-parseInt(_0x7469aa(0x73))/0x9*(-parseInt(_0x7469aa(0x6b))/0xa);if(_0x54ebc6===_0x47696e)break;else _0x49f086['push'](_0x49f086['shift']());}catch(_0x599f32){_0x49f086['push'](_0x49f086['shift']());}}}(a46_0x1d0b,0x266a5));import{jsx as a46_0x93b85c,jsxs as a46_0x345889}from'react/jsx-runtime';import{Text}from'ink';function a46_0x4140(_0x18e144,_0x232030){_0x18e144=_0x18e144-0x66;var _0x1d0b4f=a46_0x1d0b();var _0x414051=_0x1d0b4f[_0x18e144];return _0x414051;}import a46_0x221660 from'ink-spinner';function a46_0x1d0b(){var _0x426925=['15xuUGYD','\x20√\x20','13442IxdIgm','162768sqJLHH','133284BftMYC','\x20\x20\x20','954POIRfs','finished','49RvlEoh','loading','dots','green','166568IbcBdv','1513314OtetoW','29910wiIKDm','59337pecrPb'];a46_0x1d0b=function(){return _0x426925;};return a46_0x1d0b();}export function TaskLoading(_0x40fb7f){var _0x53c8e5=a46_0x4140;if(_0x40fb7f[_0x53c8e5(0x74)])return a46_0x93b85c(Text,{'color':_0x53c8e5(0x68),'children':_0x53c8e5(0x6e)});if(_0x40fb7f[_0x53c8e5(0x66)])return a46_0x345889(Text,{'color':_0x53c8e5(0x68),'children':['\x20',a46_0x93b85c(a46_0x221660,{'type':_0x53c8e5(0x67)}),'\x20']});return a46_0x93b85c(Text,{'children':_0x53c8e5(0x72)});}
1
+ function a47_0x492f(_0x55c792,_0x209480){_0x55c792=_0x55c792-0x189;var _0x3b6b7b=a47_0x3b6b();var _0x492f7c=_0x3b6b7b[_0x55c792];return _0x492f7c;}(function(_0x4d5e86,_0x779026){var _0x4fd53b=a47_0x492f,_0x3063b5=_0x4d5e86();while(!![]){try{var _0x2d6051=parseInt(_0x4fd53b(0x189))/0x1*(-parseInt(_0x4fd53b(0x193))/0x2)+-parseInt(_0x4fd53b(0x191))/0x3+-parseInt(_0x4fd53b(0x18b))/0x4+parseInt(_0x4fd53b(0x18c))/0x5+-parseInt(_0x4fd53b(0x190))/0x6*(-parseInt(_0x4fd53b(0x194))/0x7)+-parseInt(_0x4fd53b(0x195))/0x8*(-parseInt(_0x4fd53b(0x18d))/0x9)+parseInt(_0x4fd53b(0x196))/0xa*(parseInt(_0x4fd53b(0x197))/0xb);if(_0x2d6051===_0x779026)break;else _0x3063b5['push'](_0x3063b5['shift']());}catch(_0x2f91a){_0x3063b5['push'](_0x3063b5['shift']());}}}(a47_0x3b6b,0x79317));import{jsx as a47_0x49b963,jsxs as a47_0x38dc88}from'react/jsx-runtime';function a47_0x3b6b(){var _0x3d1dfc=['161UsQnyJ','800RKylbi','7970OaEdPE','2959uyzBTW','finished','3823RTskzM','dots','2954504gMAlqg','3633910lhEbFM','22149xYzdJW','loading','\x20√\x20','122508WFXWKt','198951YCQjiR','green','186UAnmWB'];a47_0x3b6b=function(){return _0x3d1dfc;};return a47_0x3b6b();}import{Text}from'ink';import a47_0x2ddb22 from'ink-spinner';export function TaskLoading(_0x18e85c){var _0x3be250=a47_0x492f;if(_0x18e85c[_0x3be250(0x198)])return a47_0x49b963(Text,{'color':_0x3be250(0x192),'children':_0x3be250(0x18f)});if(_0x18e85c[_0x3be250(0x18e)])return a47_0x38dc88(Text,{'color':_0x3be250(0x192),'children':['\x20',a47_0x49b963(a47_0x2ddb22,{'type':_0x3be250(0x18a)}),'\x20']});return a47_0x49b963(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- (function(_0x57ce57,_0x26b19b){var _0x20a4c8=a47_0x54d1,_0x47aa97=_0x57ce57();while(!![]){try{var _0x4e71ac=-parseInt(_0x20a4c8(0x74))/0x1+-parseInt(_0x20a4c8(0x77))/0x2+-parseInt(_0x20a4c8(0x7a))/0x3+-parseInt(_0x20a4c8(0x76))/0x4+parseInt(_0x20a4c8(0x73))/0x5*(parseInt(_0x20a4c8(0x72))/0x6)+-parseInt(_0x20a4c8(0x71))/0x7+parseInt(_0x20a4c8(0x75))/0x8;if(_0x4e71ac===_0x26b19b)break;else _0x47aa97['push'](_0x47aa97['shift']());}catch(_0x4784ad){_0x47aa97['push'](_0x47aa97['shift']());}}}(a47_0x31ff,0x5ef79));function a47_0x54d1(_0x3ceb1c,_0xc37498){_0x3ceb1c=_0x3ceb1c-0x71;var _0x31ff26=a47_0x31ff();var _0x54d184=_0x31ff26[_0x3ceb1c];return _0x54d184;}import{jsx as a47_0x45f612,jsxs as a47_0xf24bc2}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a47_0x31ff(){var _0x4884c7=['642jwasvQ','31580WywACY','292027UbdtGa','17991176onrmAD','2468920vdaOew','551814KpmlGR','elapsed','taskName','2230569rsauEJ','4249259VrTuFt'];a47_0x31ff=function(){return _0x4884c7;};return a47_0x31ff();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x1d0a52){var _0x2ec348=a47_0x54d1;return a47_0xf24bc2(Box,{'children':[a47_0x45f612(Box,{'width':'1'}),a47_0x45f612(TaskLoading,{..._0x1d0a52}),a47_0x45f612(Text,{'children':_0x1d0a52[_0x2ec348(0x79)]}),a47_0x45f612(TaskTime,{'elapsed':_0x1d0a52[_0x2ec348(0x78)]})]});}
1
+ function a48_0xb69a(_0x129313,_0x4cb35e){_0x129313=_0x129313-0x74;var _0x1848da=a48_0x1848();var _0xb69a4f=_0x1848da[_0x129313];return _0xb69a4f;}(function(_0x3cd8f5,_0x357a9d){var _0x5ae416=a48_0xb69a,_0x3ee615=_0x3cd8f5();while(!![]){try{var _0x18b117=parseInt(_0x5ae416(0x74))/0x1+-parseInt(_0x5ae416(0x79))/0x2+parseInt(_0x5ae416(0x78))/0x3+-parseInt(_0x5ae416(0x7d))/0x4+parseInt(_0x5ae416(0x77))/0x5+parseInt(_0x5ae416(0x75))/0x6+parseInt(_0x5ae416(0x7c))/0x7*(parseInt(_0x5ae416(0x7a))/0x8);if(_0x18b117===_0x357a9d)break;else _0x3ee615['push'](_0x3ee615['shift']());}catch(_0x58c866){_0x3ee615['push'](_0x3ee615['shift']());}}}(a48_0x1848,0x3748d));import{jsx as a48_0x3895fb,jsxs as a48_0x223b8e}from'react/jsx-runtime';function a48_0x1848(){var _0x19481f=['taskName','14VYGdOY','1481440NQVbtF','243301bInHCL','790566HoLnyF','elapsed','1386995XTYTog','84534gjXxLd','417644cJJvJN','499952FQMtPr'];a48_0x1848=function(){return _0x19481f;};return a48_0x1848();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x26d3d3){var _0x53ceee=a48_0xb69a;return a48_0x223b8e(Box,{'children':[a48_0x3895fb(Box,{'width':'1'}),a48_0x3895fb(TaskLoading,{..._0x26d3d3}),a48_0x3895fb(Text,{'children':_0x26d3d3[_0x53ceee(0x7b)]}),a48_0x3895fb(TaskTime,{'elapsed':_0x26d3d3[_0x53ceee(0x76)]})]});}
@@ -1 +1 @@
1
- function a48_0x3730(_0x3efd39,_0x9a09ff){_0x3efd39=_0x3efd39-0x1b3;var _0x371431=a48_0x3714();var _0x3730e0=_0x371431[_0x3efd39];return _0x3730e0;}function a48_0x3714(){var _0x402acd=['624029JqoMqB','3448002lXuGeC','10822dscvZt','120qyVkIK','744624MUodDv','4ydbPDt','210QAHVGx','270399FrgmFR','4380470BkfBoy','22116792BgbBlu','22cffvuZ','gray','5IwXJsp','elapsed'];a48_0x3714=function(){return _0x402acd;};return a48_0x3714();}(function(_0x55c4c7,_0x5949b5){var _0x43dc51=a48_0x3730,_0x58f7a8=_0x55c4c7();while(!![]){try{var _0x137743=-parseInt(_0x43dc51(0x1b7))/0x1*(parseInt(_0x43dc51(0x1bb))/0x2)+-parseInt(_0x43dc51(0x1bc))/0x3*(-parseInt(_0x43dc51(0x1ba))/0x4)+parseInt(_0x43dc51(0x1b3))/0x5*(parseInt(_0x43dc51(0x1b6))/0x6)+parseInt(_0x43dc51(0x1b5))/0x7*(-parseInt(_0x43dc51(0x1b8))/0x8)+parseInt(_0x43dc51(0x1b9))/0x9+-parseInt(_0x43dc51(0x1bd))/0xa*(-parseInt(_0x43dc51(0x1bf))/0xb)+parseInt(_0x43dc51(0x1be))/0xc;if(_0x137743===_0x5949b5)break;else _0x58f7a8['push'](_0x58f7a8['shift']());}catch(_0x1fefb6){_0x58f7a8['push'](_0x58f7a8['shift']());}}}(a48_0x3714,0xf279d));import{jsx as a48_0xb6ee3a,Fragment as a48_0x4003ae,jsxs as a48_0x3dc7e8}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x6894c0){var _0x80b174=a48_0x3730;if(_0x6894c0[_0x80b174(0x1b4)])return a48_0x3dc7e8(a48_0x4003ae,{'children':[a48_0xb6ee3a(Text,{'color':'gray','children':'\x20['}),a48_0xb6ee3a(Text,{'color':_0x80b174(0x1c0),'bold':!![],'children':_0x6894c0[_0x80b174(0x1b4)]}),a48_0xb6ee3a(Text,{'color':_0x80b174(0x1c0),'children':']'})]});return null;}
1
+ function a49_0x2a7f(){var _0x504384=['16GbZvOO','1303449nXONjX','260JkOpAc','11721mAczmR','gray','114460yuGLKp','elapsed','490370ARmLcA','434486wQJYar','890fngnmx','3037698Mjivbu','748mAibDy','2584620AFlaAt'];a49_0x2a7f=function(){return _0x504384;};return a49_0x2a7f();}(function(_0x1f5b23,_0x4c29db){var _0x366a32=a49_0x1fb3,_0x1a1354=_0x1f5b23();while(!![]){try{var _0x424c99=-parseInt(_0x366a32(0x120))/0x1+-parseInt(_0x366a32(0x121))/0x2*(parseInt(_0x366a32(0x128))/0x3)+-parseInt(_0x366a32(0x12a))/0x4*(parseInt(_0x366a32(0x127))/0x5)+parseInt(_0x366a32(0x124))/0x6+parseInt(_0x366a32(0x126))/0x7+-parseInt(_0x366a32(0x125))/0x8*(-parseInt(_0x366a32(0x122))/0x9)+parseInt(_0x366a32(0x11f))/0xa*(parseInt(_0x366a32(0x123))/0xb);if(_0x424c99===_0x4c29db)break;else _0x1a1354['push'](_0x1a1354['shift']());}catch(_0x2258e7){_0x1a1354['push'](_0x1a1354['shift']());}}}(a49_0x2a7f,0xebb50));import{jsx as a49_0x576ce4,Fragment as a49_0xa2eb19,jsxs as a49_0x22d59e}from'react/jsx-runtime';function a49_0x1fb3(_0x374e87,_0x216c75){_0x374e87=_0x374e87-0x11e;var _0x2a7f98=a49_0x2a7f();var _0x1fb399=_0x2a7f98[_0x374e87];return _0x1fb399;}import{Text}from'ink';export function TaskTime(_0x2ba0f3){var _0x16f2f3=a49_0x1fb3;if(_0x2ba0f3[_0x16f2f3(0x11e)])return a49_0x22d59e(a49_0xa2eb19,{'children':[a49_0x576ce4(Text,{'color':'gray','children':'\x20['}),a49_0x576ce4(Text,{'color':_0x16f2f3(0x129),'bold':!![],'children':_0x2ba0f3[_0x16f2f3(0x11e)]}),a49_0x576ce4(Text,{'color':_0x16f2f3(0x129),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a49_0x3132f4=a49_0x3cfb;(function(_0x516353,_0x2fe601){const _0x26ae29=a49_0x3cfb,_0x2e9a89=_0x516353();while(!![]){try{const _0x19fc66=-parseInt(_0x26ae29(0x1c6))/0x1+parseInt(_0x26ae29(0x1ce))/0x2*(-parseInt(_0x26ae29(0x1d1))/0x3)+parseInt(_0x26ae29(0x1d2))/0x4+-parseInt(_0x26ae29(0x1cc))/0x5+-parseInt(_0x26ae29(0x1d3))/0x6+-parseInt(_0x26ae29(0x1c0))/0x7*(-parseInt(_0x26ae29(0x1cf))/0x8)+-parseInt(_0x26ae29(0x1c4))/0x9*(-parseInt(_0x26ae29(0x1c8))/0xa);if(_0x19fc66===_0x2fe601)break;else _0x2e9a89['push'](_0x2e9a89['shift']());}catch(_0x21ae96){_0x2e9a89['push'](_0x2e9a89['shift']());}}}(a49_0x486f,0x9e860));import a49_0x415e3b from'node:path';function a49_0x3cfb(_0x4da9fd,_0x35d5e3){_0x4da9fd=_0x4da9fd-0x1c0;const _0x486f46=a49_0x486f();let _0x3cfb69=_0x486f46[_0x4da9fd];return _0x3cfb69;}import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a49_0x486f(){const _0x5813c5=['../../templates/projects/sub-app-react-demo','223581hAIZrU','5078564XYxHLg','7468932lHCBTP','复制项目文件','info','2547881EuPxyP','now','项目模板复制失败','开始复制项目模板','1657566YYaAzb','copy','274637MTaUiV','error','120CKHCho','cwd','resolve','dirname','3530450qwFWfP','message','26MZPLjK','8TtykJw'];a49_0x486f=function(){return _0x5813c5;};return a49_0x486f();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a49_0x415e3b[a49_0x3132f4(0x1cb)](fileURLToPath(import.meta.url)),templateDir=a49_0x415e3b[a49_0x3132f4(0x1ca)](__dirname,a49_0x3132f4(0x1d0));export function useCopyProjectTemplate(){const _0x1ca0fd=a49_0x3132f4,[_0x2e5756,_0x1b1b29]=useState(![]),[_0x125733,_0x3bb2e3]=useState(![]),[_0x225eaf,_0x6e0d77]=useState(''),_0x457281=useCallback(async _0x5baa04=>{const _0x174940=a49_0x3cfb,_0x472c97=Date[_0x174940(0x1c1)](),_0x43d02a=a49_0x415e3b[_0x174940(0x1ca)](process[_0x174940(0x1c9)](),_0x5baa04);_0x1b1b29(!![]);try{logger[_0x174940(0x1d5)]('copy',_0x174940(0x1c3),{'projectCode':_0x5baa04,'templateDir':templateDir}),await copyDirectory(templateDir,_0x43d02a);const _0x5bd273=Date[_0x174940(0x1c1)]()-_0x472c97;logger['success'](_0x174940(0x1c5),'项目模板复制完成',_0x5bd273,{'projectCode':_0x5baa04});}catch(_0x4ac684){const _0x13eb5b=Date[_0x174940(0x1c1)]()-_0x472c97;logger[_0x174940(0x1c7)](_0x174940(0x1c5),_0x174940(0x1c2),{'projectCode':_0x5baa04,'error':_0x4ac684 instanceof Error?_0x4ac684[_0x174940(0x1cd)]:String(_0x4ac684),'duration':_0x13eb5b});throw _0x4ac684;}finally{_0x1b1b29(![]),_0x3bb2e3(!![]),_0x6e0d77(formatElapsed(_0x472c97));}},[]);return{'taskName':_0x1ca0fd(0x1d4),'finished':_0x125733,'loading':_0x2e5756,'elapsed':_0x225eaf,'doTask':_0x457281};}
1
+ function a50_0x1b88(){const _0x8e6b29=['11466TnSwVk','3969pxLRmG','项目模板复制完成','333016Mugaag','276DqgyjP','37048HeLKTV','50ztepRO','1130iSfHeE','copy','../../templates/projects/sub-app-react-demo','resolve','3732588QPfpPt','now','70fQyojh','228468kyqaOm','2803725gWoMvZ','message','项目模板复制失败','36zfInqN','dirname'];a50_0x1b88=function(){return _0x8e6b29;};return a50_0x1b88();}const a50_0x4411a3=a50_0x3f02;(function(_0x528004,_0x5eafb4){const _0x4969c4=a50_0x3f02,_0x55cb5a=_0x528004();while(!![]){try{const _0x125c91=-parseInt(_0x4969c4(0x99))/0x1*(-parseInt(_0x4969c4(0x96))/0x2)+-parseInt(_0x4969c4(0x98))/0x3*(parseInt(_0x4969c4(0x9c))/0x4)+parseInt(_0x4969c4(0x9e))/0x5*(-parseInt(_0x4969c4(0xa6))/0x6)+-parseInt(_0x4969c4(0xa5))/0x7*(-parseInt(_0x4969c4(0x9b))/0x8)+parseInt(_0x4969c4(0xa7))/0x9+-parseInt(_0x4969c4(0x9f))/0xa*(-parseInt(_0x4969c4(0x9d))/0xb)+-parseInt(_0x4969c4(0xa3))/0xc;if(_0x125c91===_0x5eafb4)break;else _0x55cb5a['push'](_0x55cb5a['shift']());}catch(_0x581e1b){_0x55cb5a['push'](_0x55cb5a['shift']());}}}(a50_0x1b88,0x36c12));import a50_0xd9796f from'node:path';import{fileURLToPath}from'node:url';function a50_0x3f02(_0xbfb189,_0xbbab78){_0xbfb189=_0xbfb189-0x94;const _0x1b8853=a50_0x1b88();let _0x3f0279=_0x1b8853[_0xbfb189];return _0x3f0279;}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_0xd9796f[a50_0x4411a3(0x97)](fileURLToPath(import.meta.url)),templateDir=a50_0xd9796f[a50_0x4411a3(0xa2)](__dirname,a50_0x4411a3(0xa1));export function useCopyProjectTemplate(){const [_0x5eeb75,_0x5e4fc1]=useState(![]),[_0x42d0fc,_0x15266d]=useState(![]),[_0x41ea6a,_0x5b420e]=useState(''),_0x5789ef=useCallback(async _0x978f9f=>{const _0x1f974c=a50_0x3f02,_0x19183f=Date[_0x1f974c(0xa4)](),_0x19a918=a50_0xd9796f[_0x1f974c(0xa2)](process['cwd'](),_0x978f9f);_0x5e4fc1(!![]);try{logger['info']('copy','开始复制项目模板',{'projectCode':_0x978f9f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x19a918);const _0x22550c=Date[_0x1f974c(0xa4)]()-_0x19183f;logger['success'](_0x1f974c(0xa0),_0x1f974c(0x9a),_0x22550c,{'projectCode':_0x978f9f});}catch(_0x5f0c16){const _0x43a422=Date[_0x1f974c(0xa4)]()-_0x19183f;logger['error'](_0x1f974c(0xa0),_0x1f974c(0x95),{'projectCode':_0x978f9f,'error':_0x5f0c16 instanceof Error?_0x5f0c16[_0x1f974c(0x94)]:String(_0x5f0c16),'duration':_0x43a422});throw _0x5f0c16;}finally{_0x5e4fc1(![]),_0x15266d(!![]),_0x5b420e(formatElapsed(_0x19183f));}},[]);return{'taskName':'复制项目文件','finished':_0x42d0fc,'loading':_0x5eeb75,'elapsed':_0x41ea6a,'doTask':_0x5789ef};}
@@ -1 +1 @@
1
- (function(_0x2e1be7,_0x277947){const _0xca3c5d=a50_0x1cb4,_0x501580=_0x2e1be7();while(!![]){try{const _0x3fb7cd=parseInt(_0xca3c5d(0xa7))/0x1*(-parseInt(_0xca3c5d(0xa4))/0x2)+-parseInt(_0xca3c5d(0xa5))/0x3*(parseInt(_0xca3c5d(0x97))/0x4)+-parseInt(_0xca3c5d(0xa6))/0x5+-parseInt(_0xca3c5d(0x9b))/0x6*(parseInt(_0xca3c5d(0x96))/0x7)+parseInt(_0xca3c5d(0x95))/0x8*(parseInt(_0xca3c5d(0x99))/0x9)+-parseInt(_0xca3c5d(0xa0))/0xa+-parseInt(_0xca3c5d(0xa2))/0xb*(-parseInt(_0xca3c5d(0xa9))/0xc);if(_0x3fb7cd===_0x277947)break;else _0x501580['push'](_0x501580['shift']());}catch(_0x5a8200){_0x501580['push'](_0x501580['shift']());}}}(a50_0x3553,0x500c9));import a50_0x2a6dde from'node:path';function a50_0x3553(){const _0x17f380=['error','402968XvAARo','21gbmSJz','28sfcjbT','npx','9klGiGS','format','855756EuEGdY','now','success','cwd','info','5954920xXdTsj','代码格式化完成','5753xkQTjj','message','1526rUYiaH','6081eXgPhC','2626975zZflTq','281awgZCF','格式化代码','47148GGZkhw','prettier','resolve'];a50_0x3553=function(){return _0x17f380;};return a50_0x3553();}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a50_0x1cb4(_0x2885fa,_0x511060){_0x2885fa=_0x2885fa-0x92;const _0x3553c1=a50_0x3553();let _0x1cb477=_0x3553c1[_0x2885fa];return _0x1cb477;}import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x5cc9a9=a50_0x1cb4,[_0x19b29c,_0x3ea099]=useState(![]),[_0x46cb74,_0x266b9f]=useState(![]),[_0x58c692,_0x343a89]=useState(''),_0x562456=useCallback(async _0x25cb52=>{const _0x658b96=a50_0x1cb4,_0x3d5f07=Date['now'](),_0x3c946c=a50_0x2a6dde[_0x658b96(0x93)](process[_0x658b96(0x9e)](),_0x25cb52);_0x3ea099(!![]);try{logger[_0x658b96(0x9f)]('format','开始格式化代码',{'projectCode':_0x25cb52}),await execa(_0x658b96(0x98),[_0x658b96(0x92),'--write','.'],{'cwd':_0x3c946c});const _0x23a6a0=Date[_0x658b96(0x9c)]()-_0x3d5f07;logger[_0x658b96(0x9d)]('format',_0x658b96(0xa1),_0x23a6a0,{'projectCode':_0x25cb52});}catch(_0x115a94){const _0x359b2c=Date[_0x658b96(0x9c)]()-_0x3d5f07;logger[_0x658b96(0x94)](_0x658b96(0x9a),'代码格式化失败',{'projectCode':_0x25cb52,'error':_0x115a94 instanceof Error?_0x115a94[_0x658b96(0xa3)]:String(_0x115a94),'duration':_0x359b2c});throw _0x115a94;}finally{_0x3ea099(![]),_0x266b9f(!![]),_0x343a89(formatElapsed(_0x3d5f07));}},[]);return{'taskName':_0x5cc9a9(0xa8),'finished':_0x46cb74,'loading':_0x19b29c,'elapsed':_0x58c692,'doTask':_0x562456};}
1
+ function a51_0x46dd(){const _0x396268=['853176ZetToL','success','prettier','51774lryzIl','resolve','1187760StYZsv','info','206248pdqAyM','cwd','273clCPoP','格式化代码','format','开始格式化代码','message','npx','2523162DgkGwz','919472dmcHLr','now','4360392xXIzBT','56qerSTF','代码格式化完成','代码格式化失败'];a51_0x46dd=function(){return _0x396268;};return a51_0x46dd();}function a51_0x3146(_0x113072,_0x31cb4d){_0x113072=_0x113072-0xf7;const _0x46dd72=a51_0x46dd();let _0x314618=_0x46dd72[_0x113072];return _0x314618;}(function(_0x25261d,_0x528bdb){const _0x2e9e16=a51_0x3146,_0x508726=_0x25261d();while(!![]){try{const _0x419ba9=-parseInt(_0x2e9e16(0x106))/0x1+-parseInt(_0x2e9e16(0x103))/0x2*(parseInt(_0x2e9e16(0x109))/0x3)+-parseInt(_0x2e9e16(0x100))/0x4+parseInt(_0x2e9e16(0x10b))/0x5+parseInt(_0x2e9e16(0xff))/0x6+parseInt(_0x2e9e16(0xf9))/0x7*(parseInt(_0x2e9e16(0xf7))/0x8)+parseInt(_0x2e9e16(0x102))/0x9;if(_0x419ba9===_0x528bdb)break;else _0x508726['push'](_0x508726['shift']());}catch(_0x1fd799){_0x508726['push'](_0x508726['shift']());}}}(a51_0x46dd,0x8e07e));import a51_0x22192f 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 _0x5e56bd=a51_0x3146,[_0x7cf8b,_0x5361fe]=useState(![]),[_0x4200b9,_0x5c55e0]=useState(![]),[_0x5cb38b,_0x1ef9be]=useState(''),_0x488097=useCallback(async _0x15566f=>{const _0x3a74e5=a51_0x3146,_0x20c9e1=Date[_0x3a74e5(0x101)](),_0x2b233a=a51_0x22192f[_0x3a74e5(0x10a)](process[_0x3a74e5(0xf8)](),_0x15566f);_0x5361fe(!![]);try{logger[_0x3a74e5(0x10c)](_0x3a74e5(0xfb),_0x3a74e5(0xfc),{'projectCode':_0x15566f}),await execa(_0x3a74e5(0xfe),[_0x3a74e5(0x108),'--write','.'],{'cwd':_0x2b233a});const _0x2d72b9=Date[_0x3a74e5(0x101)]()-_0x20c9e1;logger[_0x3a74e5(0x107)]('format',_0x3a74e5(0x104),_0x2d72b9,{'projectCode':_0x15566f});}catch(_0x24f4fe){const _0x4c5dca=Date[_0x3a74e5(0x101)]()-_0x20c9e1;logger['error'](_0x3a74e5(0xfb),_0x3a74e5(0x105),{'projectCode':_0x15566f,'error':_0x24f4fe instanceof Error?_0x24f4fe[_0x3a74e5(0xfd)]:String(_0x24f4fe),'duration':_0x4c5dca});throw _0x24f4fe;}finally{_0x5361fe(![]),_0x5c55e0(!![]),_0x1ef9be(formatElapsed(_0x20c9e1));}},[]);return{'taskName':_0x5e56bd(0xfa),'finished':_0x4200b9,'loading':_0x7cf8b,'elapsed':_0x5cb38b,'doTask':_0x488097};}
@@ -1 +1 @@
1
- (function(_0x4eb3cd,_0x2f5900){const _0x2866e5=a51_0xfa17,_0x206951=_0x4eb3cd();while(!![]){try{const _0xd8a245=parseInt(_0x2866e5(0x1da))/0x1+-parseInt(_0x2866e5(0x1d4))/0x2*(parseInt(_0x2866e5(0x1e0))/0x3)+-parseInt(_0x2866e5(0x1e2))/0x4*(parseInt(_0x2866e5(0x1e8))/0x5)+-parseInt(_0x2866e5(0x1ea))/0x6+-parseInt(_0x2866e5(0x1e3))/0x7+-parseInt(_0x2866e5(0x1db))/0x8*(-parseInt(_0x2866e5(0x1e1))/0x9)+parseInt(_0x2866e5(0x1e4))/0xa;if(_0xd8a245===_0x2f5900)break;else _0x206951['push'](_0x206951['shift']());}catch(_0x4b4e4b){_0x206951['push'](_0x206951['shift']());}}}(a51_0x1687,0x72a02));import a51_0x10d5c6 from'node:path';function a51_0x1687(){const _0x4e3cdf=['error','4097184FpGIAp','npm','75878llSqMQ','info','now','开始安装依赖','依赖安装失败','message','552341DkjKQt','1584PskIPv','success','依赖安装完成','resolve','https://registry.npmmirror.com','51TKFcCB','17334PTidxa','865416OAcoOX','1010835EGYlKE','12244030NFRCIp','install','cwd','--registry','5ufmMow'];a51_0x1687=function(){return _0x4e3cdf;};return a51_0x1687();}function a51_0xfa17(_0x2dafef,_0x3fa1cb){_0x2dafef=_0x2dafef-0x1d4;const _0x168724=a51_0x1687();let _0xfa17ce=_0x168724[_0x2dafef];return _0xfa17ce;}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 [_0x516cd3,_0x230bff]=useState(![]),[_0x230672,_0x296345]=useState(![]),[_0x2989bd,_0x2cbe89]=useState(''),_0x5a2b1f=useCallback(async _0x3b6dcc=>{const _0x2afd61=a51_0xfa17,_0x428ae7=Date[_0x2afd61(0x1d6)](),_0x531ca6=a51_0x10d5c6[_0x2afd61(0x1de)](process[_0x2afd61(0x1e6)](),_0x3b6dcc);_0x230bff(!![]),_0x296345(![]);const _0x3a9ec6=async(_0x5cd6f7,_0x3181b5)=>{await execa(_0x5cd6f7,_0x3181b5,{'cwd':_0x531ca6});};try{logger[_0x2afd61(0x1d5)](_0x2afd61(0x1e5),_0x2afd61(0x1d7),{'projectCode':_0x3b6dcc,'registry':_0x2afd61(0x1df)}),await _0x3a9ec6(_0x2afd61(0x1eb),[_0x2afd61(0x1e5),_0x2afd61(0x1e7),_0x2afd61(0x1df)]);const _0x3383b6=Date[_0x2afd61(0x1d6)]()-_0x428ae7;logger[_0x2afd61(0x1dc)](_0x2afd61(0x1e5),_0x2afd61(0x1dd),_0x3383b6,{'projectCode':_0x3b6dcc});}catch(_0x24ac41){const _0x181eca=Date[_0x2afd61(0x1d6)]()-_0x428ae7;logger[_0x2afd61(0x1e9)](_0x2afd61(0x1e5),_0x2afd61(0x1d8),{'projectCode':_0x3b6dcc,'error':_0x24ac41 instanceof Error?_0x24ac41[_0x2afd61(0x1d9)]:String(_0x24ac41),'duration':_0x181eca});throw _0x24ac41;}finally{_0x230bff(![]),_0x296345(!![]),_0x2cbe89(formatElapsed(_0x428ae7));}},[]);return{'taskName':'安装依赖','finished':_0x230672,'loading':_0x516cd3,'elapsed':_0x2989bd,'doTask':_0x5a2b1f};}
1
+ (function(_0xdeb836,_0x5bf354){const _0x57d699=a52_0x2171,_0x442fcd=_0xdeb836();while(!![]){try{const _0x85d92d=-parseInt(_0x57d699(0xcc))/0x1*(-parseInt(_0x57d699(0xd9))/0x2)+parseInt(_0x57d699(0xde))/0x3*(parseInt(_0x57d699(0xce))/0x4)+-parseInt(_0x57d699(0xd0))/0x5+parseInt(_0x57d699(0xd1))/0x6+-parseInt(_0x57d699(0xe0))/0x7+parseInt(_0x57d699(0xd5))/0x8*(parseInt(_0x57d699(0xdc))/0x9)+-parseInt(_0x57d699(0xd3))/0xa;if(_0x85d92d===_0x5bf354)break;else _0x442fcd['push'](_0x442fcd['shift']());}catch(_0x3f177a){_0x442fcd['push'](_0x442fcd['shift']());}}}(a52_0xe120,0x84af2));import a52_0x3fcc10 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a52_0xe120(){const _0x36c556=['resolve','5850256CjaMzs','info','npm','cwd','468782pDORsm','message','now','9gRrNnV','error','287895uMODik','--registry','5789679llWSQf','2jeNuVS','https://registry.npmmirror.com','36dwTgOk','安装依赖','830385nqGlVQ','5840748XQWeKp','install','15005590WGEXIY'];a52_0xe120=function(){return _0x36c556;};return a52_0xe120();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a52_0x2171(_0x1de484,_0x4e4578){_0x1de484=_0x1de484-0xcc;const _0xe120ed=a52_0xe120();let _0x21715a=_0xe120ed[_0x1de484];return _0x21715a;}export function useInstallDependencies(){const _0x4baeb2=a52_0x2171,[_0x12b725,_0x226e15]=useState(![]),[_0x4811dd,_0x43c2b3]=useState(![]),[_0x4a9a08,_0x3df849]=useState(''),_0x3c5463=useCallback(async _0x4e1dd7=>{const _0x171cd5=a52_0x2171,_0x1d6a82=Date[_0x171cd5(0xdb)](),_0x1f8c14=a52_0x3fcc10[_0x171cd5(0xd4)](process[_0x171cd5(0xd8)](),_0x4e1dd7);_0x226e15(!![]),_0x43c2b3(![]);const _0xd36f24=async(_0x150e93,_0x33642e)=>{await execa(_0x150e93,_0x33642e,{'cwd':_0x1f8c14});};try{logger[_0x171cd5(0xd6)]('install','开始安装依赖',{'projectCode':_0x4e1dd7,'registry':_0x171cd5(0xcd)}),await _0xd36f24(_0x171cd5(0xd7),['install',_0x171cd5(0xdf),_0x171cd5(0xcd)]);const _0x41a6a1=Date[_0x171cd5(0xdb)]()-_0x1d6a82;logger['success'](_0x171cd5(0xd2),'依赖安装完成',_0x41a6a1,{'projectCode':_0x4e1dd7});}catch(_0x289486){const _0x426684=Date['now']()-_0x1d6a82;logger[_0x171cd5(0xdd)](_0x171cd5(0xd2),'依赖安装失败',{'projectCode':_0x4e1dd7,'error':_0x289486 instanceof Error?_0x289486[_0x171cd5(0xda)]:String(_0x289486),'duration':_0x426684});throw _0x289486;}finally{_0x226e15(![]),_0x43c2b3(!![]),_0x3df849(formatElapsed(_0x1d6a82));}},[]);return{'taskName':_0x4baeb2(0xcf),'finished':_0x4811dd,'loading':_0x12b725,'elapsed':_0x4a9a08,'doTask':_0x3c5463};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x23a406,_0x10e679){var _0x2217a4=a52_0x1e49,_0x5e3212=_0x23a406();while(!![]){try{var _0xe4a9f3=parseInt(_0x2217a4(0xb6))/0x1*(parseInt(_0x2217a4(0xb1))/0x2)+-parseInt(_0x2217a4(0xb4))/0x3+-parseInt(_0x2217a4(0xb3))/0x4+-parseInt(_0x2217a4(0xbd))/0x5+parseInt(_0x2217a4(0xb2))/0x6*(-parseInt(_0x2217a4(0xb7))/0x7)+-parseInt(_0x2217a4(0xb8))/0x8*(-parseInt(_0x2217a4(0xbb))/0x9)+-parseInt(_0x2217a4(0xbc))/0xa*(-parseInt(_0x2217a4(0xba))/0xb);if(_0xe4a9f3===_0x10e679)break;else _0x5e3212['push'](_0x5e3212['shift']());}catch(_0x2e9183){_0x5e3212['push'](_0x5e3212['shift']());}}}(a52_0xf808,0x74184));import{jsx as a52_0x511062,jsxs as a52_0x246ba6}from'react/jsx-runtime';function a52_0x1e49(_0x272b4f,_0x198331){_0x272b4f=_0x272b4f-0xb1;var _0xf808e8=a52_0xf808();var _0x1e4966=_0xf808e8[_0x272b4f];return _0x1e4966;}import{Box,Text}from'ink';function a52_0xf808(){var _0x337877=['!\x20请指定一个有效的命令。','13574KwUkzF','126lsjuqZ','1370nvSIVP','609085lzeeyT','column','green','2ZqLPUl','2526vsaWQL','729672sRayMb','1139253MEYtPm','查看可用命令。','815953XDZOBM','3017fRShIT','203400JJzxEt'];a52_0xf808=function(){return _0x337877;};return a52_0xf808();}export function Help(){var _0x241ecb=a52_0x1e49;return a52_0x246ba6(Box,{'flexDirection':_0x241ecb(0xbe),'marginTop':0x1,'marginBottom':0x1,'children':[a52_0x246ba6(Box,{'children':[a52_0x511062(Box,{'width':'1'}),a52_0x511062(Text,{'children':_0x241ecb(0xb9)})]}),a52_0x246ba6(Box,{'marginTop':0x1,'children':[a52_0x511062(Box,{'width':'1'}),a52_0x246ba6(Text,{'children':['\x20\x20','使用']}),a52_0x246ba6(Text,{'bold':!![],'color':_0x241ecb(0xbf),'children':['\x20','lovrabet\x20--help','\x20']}),a52_0x511062(Text,{'children':_0x241ecb(0xb5)})]})]});}
1
+ function a53_0x3350(){var _0x2ab3ac=['!\x20请指定一个有效的命令。','1422712VRCHov','1164524waWhIz','6LkLqgf','22470mJKRsk','582NtjOGK','2802114tiZspk','16897275ITrIEC','2822784RiCrmi','green','查看可用命令。','288128ZeDAzP'];a53_0x3350=function(){return _0x2ab3ac;};return a53_0x3350();}(function(_0x4d27a6,_0x2a372b){var _0x3df04f=a53_0x2ad9,_0x472b37=_0x4d27a6();while(!![]){try{var _0x440f87=-parseInt(_0x3df04f(0x1b1))/0x1+-parseInt(_0x3df04f(0x1b4))/0x2+parseInt(_0x3df04f(0x1b5))/0x3*(parseInt(_0x3df04f(0x1b3))/0x4)+-parseInt(_0x3df04f(0x1b6))/0x5*(parseInt(_0x3df04f(0x1b7))/0x6)+-parseInt(_0x3df04f(0x1b8))/0x7+-parseInt(_0x3df04f(0x1ae))/0x8+parseInt(_0x3df04f(0x1b9))/0x9;if(_0x440f87===_0x2a372b)break;else _0x472b37['push'](_0x472b37['shift']());}catch(_0xdec56d){_0x472b37['push'](_0x472b37['shift']());}}}(a53_0x3350,0x813dd));import{jsx as a53_0x33e45b,jsxs as a53_0x2ad0cc}from'react/jsx-runtime';import{Box,Text}from'ink';function a53_0x2ad9(_0x1d5c22,_0x427279){_0x1d5c22=_0x1d5c22-0x1ae;var _0x335012=a53_0x3350();var _0x2ad92f=_0x335012[_0x1d5c22];return _0x2ad92f;}export function Help(){var _0x550ee9=a53_0x2ad9;return a53_0x2ad0cc(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a53_0x2ad0cc(Box,{'children':[a53_0x33e45b(Box,{'width':'1'}),a53_0x33e45b(Text,{'children':_0x550ee9(0x1b2)})]}),a53_0x2ad0cc(Box,{'marginTop':0x1,'children':[a53_0x33e45b(Box,{'width':'1'}),a53_0x2ad0cc(Text,{'children':['\x20\x20','使用']}),a53_0x2ad0cc(Text,{'bold':!![],'color':_0x550ee9(0x1af),'children':['\x20','lovrabet\x20--help','\x20']}),a53_0x33e45b(Text,{'children':_0x550ee9(0x1b0)})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3b1793,_0x1e65f3){const _0xf22e93=a53_0x5811,_0x2c5542=_0x3b1793();while(!![]){try{const _0x36697b=-parseInt(_0xf22e93(0xb0))/0x1*(-parseInt(_0xf22e93(0x9e))/0x2)+-parseInt(_0xf22e93(0xc0))/0x3+-parseInt(_0xf22e93(0x96))/0x4+parseInt(_0xf22e93(0xc4))/0x5+-parseInt(_0xf22e93(0xc1))/0x6+parseInt(_0xf22e93(0xbe))/0x7+parseInt(_0xf22e93(0xa7))/0x8*(-parseInt(_0xf22e93(0xbb))/0x9);if(_0x36697b===_0x1e65f3)break;else _0x2c5542['push'](_0x2c5542['shift']());}catch(_0x25868d){_0x2c5542['push'](_0x2c5542['shift']());}}}(a53_0x3dc1,0x58eba));function a53_0x5811(_0x40f52d,_0x536c56){_0x40f52d=_0x40f52d-0x93;const _0x3dc1c6=a53_0x3dc1();let _0x5811b0=_0x3dc1c6[_0x40f52d];return _0x5811b0;}import{jsxs as a53_0x33fc24,jsx as a53_0x4fbd40}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a53_0x3dc1(){const _0x2cc9fc=['ctrl','8fgrIQA','utf8','length','red','gray','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','\x20←\x20','slice','AppCode:\x20','818WjHYmu','创建配置文件失败:\x20','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','正在初始化配置文件...','backspace','return','exit','column','初始化项目配置文件成功','error','cwd','1872954WNPiyV','init','test','4786670CdaFzW','package.json','691239GyCwiW','631878lmHTeQ','stringify','toLocaleString','3028180sMmYXR','version','string','1.0.0','2242152DLAzfp','delete','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','message','当前目录已存在\x20.lovrabetrc\x20文件','info','trim','online','438BPQVPD','env','应用代码不能为空','parse','cyan','创建配置文件失败','green','应用代码不合法'];a53_0x3dc1=function(){return _0x2cc9fc;};return a53_0x3dc1();}import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x3a1414,env:_0x471eb5}){const _0x2df584=a53_0x5811,[_0x5ed8e9,_0x5902a6]=useState(null),[_0x568706,_0x25846c]=useState(![]),[_0x23109a,_0x4ca0dc]=useState(!_0x3a1414),[_0x34965,_0x1688a2]=useState(''),[_0x19f8f5,_0x171df9]=useState(''),[_0x6a5fc5,_0x3f4b07]=useState(_0x3a1414||''),[_0x316993]=useState(_0x471eb5);function _0x534306(_0xdcdc38){const _0x4a231f=a53_0x5811;if(_0xdcdc38[_0x4a231f(0xa9)]===0x0)return{'valid':![],'message':''};if(_0xdcdc38['length']>0x64)return{'valid':![],'message':'应用代码长度不能超过\x20100\x20个字符'};const _0x1d9493=/^[A-Za-z0-9_-]+$/;if(!_0x1d9493[_0x4a231f(0xbd)](_0xdcdc38))return{'valid':![],'message':'应用代码只能包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}useInput((_0x34ecbd,_0x3498cc)=>{const _0x1eb940=a53_0x5811;if(!_0x23109a)return;if(_0x3498cc[_0x1eb940(0xb5)]){if(_0x19f8f5||!_0x34965[_0x1eb940(0x9c)]()){_0x171df9(_0x1eb940(0xa0));return;}const _0x112ff2=_0x34965[_0x1eb940(0x9c)](),{valid:_0x39b0c7,message:_0x339a8c}=_0x534306(_0x112ff2);if(!_0x39b0c7){_0x171df9(_0x339a8c||_0x1eb940(0xa5));return;}_0x3f4b07(_0x112ff2),_0x4ca0dc(![]);}else{if(_0x3498cc[_0x1eb940(0xb4)]||_0x3498cc[_0x1eb940(0x97)])_0x1688a2(_0xd44a37=>{const _0x2d86e8=_0x1eb940,_0x90c53b=_0xd44a37[_0x2d86e8(0xae)](0x0,-0x1);if(_0x90c53b['length']===0x0)_0x171df9('');else{const {valid:_0x1553ca,message:_0x2ef688}=_0x534306(_0x90c53b);_0x171df9(_0x1553ca?'':_0x2ef688||'应用代码不合法');}return _0x90c53b;});else _0x3498cc[_0x1eb940(0xa6)]&&_0x34ecbd==='c'?process[_0x1eb940(0xb6)](0x0):_0x1688a2(_0x36f54d=>{const _0x5e9abd=_0x36f54d+_0x34ecbd,{valid:_0x5999fa,message:_0x494033}=_0x534306(_0x5e9abd);return _0x171df9(_0x5999fa?'':_0x494033||'应用代码不合法'),_0x5e9abd;});}},{'isActive':_0x23109a}),useEffect(()=>{const _0x3a718f=a53_0x5811;if(!_0x6a5fc5||_0x23109a)return;const _0x40a85d=resolve(process[_0x3a718f(0xba)](),'.lovrabetrc');if(existsSync(_0x40a85d)){_0x5902a6(_0x3a718f(0x9a)),setTimeout(()=>process[_0x3a718f(0xb6)](0x1),0x64);return;}try{const _0x5f0dc=fileURLToPath(import.meta.url),_0x18032a=resolve(dirname(_0x5f0dc),'../..'),_0x39a83e=join(_0x18032a,_0x3a718f(0xbf));let _0x34613b=_0x3a718f(0x95);try{const _0x39a3cc=JSON[_0x3a718f(0xa1)](readFileSync(_0x39a83e,_0x3a718f(0xa8)));_0x34613b=_0x39a3cc[_0x3a718f(0x93)]||_0x3a718f(0x95);}catch(_0x34f510){}const _0x53015d=readConfig(),_0x34ed65=typeof _0x53015d['env']===_0x3a718f(0x94)?_0x53015d[_0x3a718f(0x9f)]:undefined,{app:_0x42ca41,appcode:_0x22b3b7,..._0x3b8d18}=_0x53015d,_0x36acd5={..._0x3b8d18,'appcode':_0x6a5fc5,'env':_0x316993||_0x34ed65||_0x3a718f(0x9d),'createdAt':new Date()[_0x3a718f(0xc3)](),'version':_0x34613b};writeFileSync(_0x40a85d,JSON[_0x3a718f(0xc2)](_0x36acd5,null,0x2),{'encoding':_0x3a718f(0xa8),'mode':0x180}),logger['setLogPath'](process[_0x3a718f(0xba)]()),logger[_0x3a718f(0x9b)]('init',_0x3a718f(0xb8),{'appcode':_0x6a5fc5,'env':_0x36acd5[_0x3a718f(0x9f)],'version':_0x36acd5[_0x3a718f(0x93)],'configPath':_0x40a85d}),_0x25846c(!![]),setTimeout(()=>process[_0x3a718f(0xb6)](0x0),0x64);}catch(_0x123927){logger[_0x3a718f(0xb9)](_0x3a718f(0xbc),_0x3a718f(0xa3),{'error':_0x123927 instanceof Error?_0x123927[_0x3a718f(0x99)]:String(_0x123927)}),_0x5902a6(_0x3a718f(0xb1)+(_0x123927 instanceof Error?_0x123927[_0x3a718f(0x99)]:String(_0x123927))),setTimeout(()=>process[_0x3a718f(0xb6)](0x1),0x64);}},[_0x6a5fc5,_0x23109a,_0x316993]);if(_0x5ed8e9)return a53_0x4fbd40(Box,{'flexDirection':_0x2df584(0xb7),'children':a53_0x33fc24(Text,{'color':_0x2df584(0xaa),'children':['✗\x20',_0x5ed8e9]})});if(_0x23109a)return a53_0x33fc24(Box,{'flexDirection':_0x2df584(0xb7),'children':[a53_0x33fc24(Box,{'children':[a53_0x4fbd40(Text,{'color':_0x2df584(0xa2),'children':'请输入应用代码\x20(AppCode):\x20'}),_0x34965?a53_0x4fbd40(Text,{'color':_0x2df584(0xa4),'children':_0x34965}):a53_0x4fbd40(Text,{'color':'gray','children':'_'}),_0x19f8f5&&a53_0x33fc24(Text,{'color':_0x2df584(0xaa),'children':[_0x2df584(0xad),_0x19f8f5]})]}),!_0x19f8f5&&!_0x34965&&a53_0x4fbd40(Box,{'children':a53_0x4fbd40(Text,{'color':_0x2df584(0xab),'children':_0x2df584(0xb2)})})]});if(_0x568706)return a53_0x33fc24(Box,{'flexDirection':'column','children':[a53_0x4fbd40(Text,{'color':'green','children':_0x2df584(0x98)}),a53_0x33fc24(Text,{'color':_0x2df584(0xa2),'children':[_0x2df584(0xaf),_0x6a5fc5]}),a53_0x4fbd40(Text,{'children':_0x2df584(0xac)})]});return a53_0x4fbd40(Box,{'children':a53_0x4fbd40(Text,{'children':_0x2df584(0xb3)})});}
1
+ function a54_0x4417(){const _0x39999b=['应用代码不合法','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','cwd','初始化项目配置文件成功','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','应用代码不能为空','.lovrabetrc','backspace','正在初始化配置文件...','1.0.0','column','parse','stringify','1232579dcvqGC','env','init','当前目录已存在\x20.lovrabetrc\x20文件','请输入应用代码\x20(AppCode):\x20','red','../..','应用代码长度不能超过\x20100\x20个字符','\x20←\x20','gray','online','984DeebMX','3895842dFcJVe','cyan','创建配置文件失败','4DJXHPf','trim','message','应用代码只能包含字母、数字、-\x20和\x20_','2616648qSxIFS','exit','setLogPath','AppCode:\x20','toLocaleString','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','utf8','green','return','string','length','26098520rxQHwn','创建配置文件失败:\x20','slice','test','delete','4219855xKjxKm','6nAZfIi','version','80235sbDWwo','5698987XCZEJK','ctrl'];a54_0x4417=function(){return _0x39999b;};return a54_0x4417();}(function(_0x455e5f,_0x4a249e){const _0x483ee0=a54_0x54c8,_0x2f2cb8=_0x455e5f();while(!![]){try{const _0x3ca725=parseInt(_0x483ee0(0x199))/0x1+-parseInt(_0x483ee0(0x1ac))/0x2+-parseInt(_0x483ee0(0x1a5))/0x3+parseInt(_0x483ee0(0x1a8))/0x4*(-parseInt(_0x483ee0(0x186))/0x5)+-parseInt(_0x483ee0(0x187))/0x6*(parseInt(_0x483ee0(0x18a))/0x7)+-parseInt(_0x483ee0(0x1a4))/0x8*(-parseInt(_0x483ee0(0x189))/0x9)+parseInt(_0x483ee0(0x1b7))/0xa;if(_0x3ca725===_0x4a249e)break;else _0x2f2cb8['push'](_0x2f2cb8['shift']());}catch(_0x105f63){_0x2f2cb8['push'](_0x2f2cb8['shift']());}}}(a54_0x4417,0xa4886));import{jsxs as a54_0x37505d,jsx as a54_0x2e658b}from'react/jsx-runtime';import{useState,useEffect}from'react';function a54_0x54c8(_0x26f068,_0x11197e){_0x26f068=_0x26f068-0x184;const _0x44172b=a54_0x4417();let _0x54c8c4=_0x44172b[_0x26f068];return _0x54c8c4;}import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x204469,env:_0x12d19e}){const _0x201d51=a54_0x54c8,[_0x56c07a,_0x5186d8]=useState(null),[_0x4e282f,_0x69dcf1]=useState(![]),[_0x3afa64,_0x59b48d]=useState(!_0x204469),[_0x4b5368,_0x14946c]=useState(''),[_0x4e79d4,_0x2f3ecf]=useState(''),[_0xa85b17,_0x1151b9]=useState(_0x204469||''),[_0xc0b3c2]=useState(_0x12d19e);function _0x13be2e(_0x7d74fe){const _0x1c22d0=a54_0x54c8;if(_0x7d74fe['length']===0x0)return{'valid':![],'message':''};if(_0x7d74fe[_0x1c22d0(0x1b6)]>0x64)return{'valid':![],'message':_0x1c22d0(0x1a0)};const _0x3a48dc=/^[A-Za-z0-9_-]+$/;if(!_0x3a48dc[_0x1c22d0(0x184)](_0x7d74fe))return{'valid':![],'message':_0x1c22d0(0x1ab)};return{'valid':!![]};}useInput((_0x713d99,_0x4b05c0)=>{const _0x305991=a54_0x54c8;if(!_0x3afa64)return;if(_0x4b05c0[_0x305991(0x1b4)]){if(_0x4e79d4||!_0x4b5368[_0x305991(0x1a9)]()){_0x2f3ecf(_0x305991(0x191));return;}const _0x4f0994=_0x4b5368[_0x305991(0x1a9)](),{valid:_0x10d1df,message:_0x4eb2a5}=_0x13be2e(_0x4f0994);if(!_0x10d1df){_0x2f3ecf(_0x4eb2a5||'应用代码不合法');return;}_0x1151b9(_0x4f0994),_0x59b48d(![]);}else{if(_0x4b05c0[_0x305991(0x193)]||_0x4b05c0[_0x305991(0x185)])_0x14946c(_0x149196=>{const _0x580c4d=_0x305991,_0x2bf315=_0x149196[_0x580c4d(0x1b9)](0x0,-0x1);if(_0x2bf315[_0x580c4d(0x1b6)]===0x0)_0x2f3ecf('');else{const {valid:_0x500556,message:_0x305320}=_0x13be2e(_0x2bf315);_0x2f3ecf(_0x500556?'':_0x305320||_0x580c4d(0x18c));}return _0x2bf315;});else _0x4b05c0[_0x305991(0x18b)]&&_0x713d99==='c'?process['exit'](0x0):_0x14946c(_0x2e3458=>{const _0x21e9d3=_0x305991,_0x567373=_0x2e3458+_0x713d99,{valid:_0x27d5e7,message:_0x427969}=_0x13be2e(_0x567373);return _0x2f3ecf(_0x27d5e7?'':_0x427969||_0x21e9d3(0x18c)),_0x567373;});}},{'isActive':_0x3afa64}),useEffect(()=>{const _0x4d081e=a54_0x54c8;if(!_0xa85b17||_0x3afa64)return;const _0xd03989=resolve(process['cwd'](),_0x4d081e(0x192));if(existsSync(_0xd03989)){_0x5186d8(_0x4d081e(0x19c)),setTimeout(()=>process[_0x4d081e(0x1ad)](0x1),0x64);return;}try{const _0x47bd42=fileURLToPath(import.meta.url),_0x279c2a=resolve(dirname(_0x47bd42),_0x4d081e(0x19f)),_0x3ac51e=join(_0x279c2a,'package.json');let _0x35bccb=_0x4d081e(0x195);try{const _0x460f4f=JSON[_0x4d081e(0x197)](readFileSync(_0x3ac51e,_0x4d081e(0x1b2)));_0x35bccb=_0x460f4f[_0x4d081e(0x188)]||'1.0.0';}catch(_0x1b0d08){}const _0xeacbd6=readConfig(),_0x1fd92f=typeof _0xeacbd6['env']===_0x4d081e(0x1b5)?_0xeacbd6['env']:undefined,{app:_0x21ada2,appcode:_0x5e365c,..._0x15d87e}=_0xeacbd6,_0x54bc29={..._0x15d87e,'appcode':_0xa85b17,'env':_0xc0b3c2||_0x1fd92f||_0x4d081e(0x1a3),'createdAt':new Date()[_0x4d081e(0x1b0)](),'version':_0x35bccb};writeFileSync(_0xd03989,JSON[_0x4d081e(0x198)](_0x54bc29,null,0x2),{'encoding':'utf8','mode':0x180}),logger[_0x4d081e(0x1ae)](process[_0x4d081e(0x18e)]()),logger['info'](_0x4d081e(0x19b),_0x4d081e(0x18f),{'appcode':_0xa85b17,'env':_0x54bc29[_0x4d081e(0x19a)],'version':_0x54bc29[_0x4d081e(0x188)],'configPath':_0xd03989}),_0x69dcf1(!![]),setTimeout(()=>process[_0x4d081e(0x1ad)](0x0),0x64);}catch(_0x47a872){logger['error'](_0x4d081e(0x19b),_0x4d081e(0x1a7),{'error':_0x47a872 instanceof Error?_0x47a872[_0x4d081e(0x1aa)]:String(_0x47a872)}),_0x5186d8(_0x4d081e(0x1b8)+(_0x47a872 instanceof Error?_0x47a872[_0x4d081e(0x1aa)]:String(_0x47a872))),setTimeout(()=>process[_0x4d081e(0x1ad)](0x1),0x64);}},[_0xa85b17,_0x3afa64,_0xc0b3c2]);if(_0x56c07a)return a54_0x2e658b(Box,{'flexDirection':_0x201d51(0x196),'children':a54_0x37505d(Text,{'color':_0x201d51(0x19e),'children':['✗\x20',_0x56c07a]})});if(_0x3afa64)return a54_0x37505d(Box,{'flexDirection':'column','children':[a54_0x37505d(Box,{'children':[a54_0x2e658b(Text,{'color':'cyan','children':_0x201d51(0x19d)}),_0x4b5368?a54_0x2e658b(Text,{'color':_0x201d51(0x1b3),'children':_0x4b5368}):a54_0x2e658b(Text,{'color':_0x201d51(0x1a2),'children':'_'}),_0x4e79d4&&a54_0x37505d(Text,{'color':'red','children':[_0x201d51(0x1a1),_0x4e79d4]})]}),!_0x4e79d4&&!_0x4b5368&&a54_0x2e658b(Box,{'children':a54_0x2e658b(Text,{'color':_0x201d51(0x1a2),'children':_0x201d51(0x190)})})]});if(_0x4e282f)return a54_0x37505d(Box,{'flexDirection':_0x201d51(0x196),'children':[a54_0x2e658b(Text,{'color':'green','children':_0x201d51(0x1b1)}),a54_0x37505d(Text,{'color':_0x201d51(0x1a6),'children':[_0x201d51(0x1af),_0xa85b17]}),a54_0x2e658b(Text,{'children':_0x201d51(0x18d)})]});return a54_0x2e658b(Box,{'children':a54_0x2e658b(Text,{'children':_0x201d51(0x194)})});}
@@ -1 +1 @@
1
- const a54_0x334bce=a54_0x259b;(function(_0x1e73a2,_0x38a284){const _0x1c9842=a54_0x259b,_0x102d7c=_0x1e73a2();while(!![]){try{const _0x5c5798=parseInt(_0x1c9842(0x213))/0x1+-parseInt(_0x1c9842(0x1ef))/0x2*(parseInt(_0x1c9842(0x204))/0x3)+-parseInt(_0x1c9842(0x1f6))/0x4*(-parseInt(_0x1c9842(0x1eb))/0x5)+-parseInt(_0x1c9842(0x220))/0x6*(-parseInt(_0x1c9842(0x20b))/0x7)+-parseInt(_0x1c9842(0x1f9))/0x8*(-parseInt(_0x1c9842(0x1fc))/0x9)+parseInt(_0x1c9842(0x21c))/0xa+parseInt(_0x1c9842(0x20c))/0xb*(-parseInt(_0x1c9842(0x211))/0xc);if(_0x5c5798===_0x38a284)break;else _0x102d7c['push'](_0x102d7c['shift']());}catch(_0x52588d){_0x102d7c['push'](_0x102d7c['shift']());}}}(a54_0x2cd9,0x2b58f));import{jsx as a54_0x5b5cdf,jsxs as a54_0x15f5bc,Fragment as a54_0x427c2d}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_0x2cd9(){const _0x168005=['label','3000YDPAXM','manual','status','red','34334VESjrj','claude','其他\x20IDE\x20配置指引','✓\x20MCP\x20配置完成!','yellow','find','error','1088OoevQM','push','size','8TKjTqz','handleKeyDown','length','874971wAcslG','column','description','name','some','message','map','cursor','45vuKQun','setErrorMsg','white','every','configuring','其他\x20IDE','cyan','21GmjXeh','2779843yFOyOP','已选择\x20IDE','cwd','success','⚠️\x20部分配置需要手动完成','24dsgCih','按任意键退出...','140471nGNnAJ','selecting','done','selectedIndexes','正在配置\x20MCP\x20服务器...','getSelectedIDEs','⚠️\x20配置需要手动完成','不支持的\x20IDE:\x20','green','2056530hrpTkg','配置\x20Lovrabet\x20MCP\x20服务器','gray','other','667878gYKZxL'];a54_0x2cd9=function(){return _0x168005;};return a54_0x2cd9();}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array['from'](MCP_IDES)['map'](_0x2aaed5=>({'key':_0x2aaed5,'name':IDE_CONFIGS[_0x2aaed5][a54_0x334bce(0x1ff)],'description':IDE_CONFIGS[_0x2aaed5][a54_0x334bce(0x1fe)]})),{'key':a54_0x334bce(0x21f),'name':a54_0x334bce(0x209),'description':a54_0x334bce(0x1f1)}];function a54_0x259b(_0x3c606f,_0xaeaaed){_0x3c606f=_0x3c606f-0x1ea;const _0x2cd908=a54_0x2cd9();let _0x259b7d=_0x2cd908[_0x3c606f];return _0x259b7d;}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x516efa=a54_0x334bce,{exit:_0x369cf9}=useApp(),[_0x54d559,_0x4aff92]=useState(_0x516efa(0x214)),[_0x46743c,_0x29fdd2]=useState([]),[_0x26f831,_0x180ff3]=useState([]),_0xa0ad5f=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x1c7706=_0x516efa;preselectedIDEs[_0x1c7706(0x1fb)]>0x0&&_0xa0ad5f[_0x1c7706(0x216)]['size']>0x0&&_0x3e7177();},[]),useInput((_0x26aefb,_0x382ab7)=>{const _0x11bea5=_0x516efa;if(_0x54d559==='selecting'){if(_0x26aefb==='q'||_0x26aefb==='Q'){_0x369cf9();return;}if(_0x382ab7['return']){if(_0xa0ad5f[_0x11bea5(0x216)][_0x11bea5(0x1f8)]===0x0){_0xa0ad5f[_0x11bea5(0x205)]('请至少选择一个\x20IDE');return;}_0x3e7177();return;}_0xa0ad5f[_0x11bea5(0x1fa)](_0x26aefb,_0x382ab7);}_0x54d559===_0x11bea5(0x215)&&_0x369cf9();});async function _0x3e7177(){const _0x76b109=_0x516efa,_0x1d4051=_0xa0ad5f[_0x76b109(0x218)]();_0x29fdd2([{'label':_0x76b109(0x20d),'value':_0xa0ad5f['selectedIndexes']['size']+'\x20个'}]),_0x4aff92(_0x76b109(0x208));const _0x16e6c5=[];for(const _0x1505e8 of _0x1d4051){try{const _0x2e9b29=await configureMcp(_0x1505e8);_0x16e6c5[_0x76b109(0x1f7)]({'ide':IDE_LIST[_0x76b109(0x1f4)](_0x42d818=>_0x42d818['key']===_0x1505e8)?.[_0x76b109(0x1ff)]||_0x1505e8,'status':_0x2e9b29['needsManualAction']?'manual':_0x2e9b29[_0x76b109(0x20f)]?_0x76b109(0x20f):_0x76b109(0x1f5),'message':_0x2e9b29['message']});}catch(_0x223ba5){_0x16e6c5['push']({'ide':IDE_LIST['find'](_0x377153=>_0x377153['key']===_0x1505e8)?.[_0x76b109(0x1ff)]||_0x1505e8,'status':_0x76b109(0x1f5),'message':_0x223ba5 instanceof Error?_0x223ba5['message']:String(_0x223ba5)});}}_0x180ff3(_0x16e6c5),_0x4aff92(_0x76b109(0x215)),setTimeout(()=>{_0x369cf9();},0x1388);}return a54_0x15f5bc(Box,{'flexDirection':_0x516efa(0x1fd),'marginTop':0x1,'children':[_0x54d559===_0x516efa(0x214)&&a54_0x5b5cdf(IDESelector,{'ideList':IDE_LIST,'title':_0x516efa(0x21d),'selection':_0xa0ad5f}),_0x54d559===_0x516efa(0x208)&&a54_0x15f5bc(a54_0x427c2d,{'children':[_0x46743c[_0x516efa(0x202)]((_0x347dcb,_0x5e4e5c)=>a54_0x15f5bc(Box,{'children':[a54_0x15f5bc(Text,{'color':'green','children':['√\x20',_0x347dcb[_0x516efa(0x1ea)],':\x20']}),a54_0x5b5cdf(Text,{'color':_0x516efa(0x20a),'children':_0x347dcb['value']})]},_0x5e4e5c)),a54_0x5b5cdf(Box,{'marginTop':0x1,'children':a54_0x5b5cdf(Text,{'children':_0x516efa(0x217)})})]}),_0x54d559===_0x516efa(0x215)&&a54_0x5b5cdf(DoneStep,{'configResults':_0x26f831})]});}function DoneStep({configResults:_0x1bd617}){const _0x265248=a54_0x334bce,_0x1ee804=_0x1bd617[_0x265248(0x207)](_0x322a9b=>_0x322a9b['status']===_0x265248(0x20f)),_0x12a82d=_0x1bd617[_0x265248(0x200)](_0xe0a73e=>_0xe0a73e[_0x265248(0x1ed)]===_0x265248(0x1ec)),_0x54c9c6=_0x1bd617[_0x265248(0x200)](_0x5f22dc=>_0x5f22dc[_0x265248(0x1ed)]==='error');return a54_0x15f5bc(a54_0x427c2d,{'children':[a54_0x5b5cdf(Box,{'children':_0x1ee804?a54_0x5b5cdf(Text,{'color':_0x265248(0x21b),'children':_0x265248(0x1f2)}):_0x12a82d?a54_0x5b5cdf(Text,{'color':'yellow','children':_0x265248(0x210)}):_0x54c9c6?a54_0x5b5cdf(Text,{'color':_0x265248(0x1ee),'children':'✗\x20配置失败'}):a54_0x5b5cdf(Text,{'color':_0x265248(0x1f3),'children':_0x265248(0x219)})}),_0x1bd617['map']((_0xbab703,_0x5b321e)=>a54_0x15f5bc(Box,{'flexDirection':_0x265248(0x1fd),'children':[a54_0x15f5bc(Text,{'color':_0xbab703[_0x265248(0x1ed)]===_0x265248(0x20f)?_0x265248(0x21b):_0xbab703[_0x265248(0x1ed)]===_0x265248(0x1ec)?'yellow':_0x265248(0x1ee),'children':[_0xbab703[_0x265248(0x1ed)]===_0x265248(0x20f)?'\x20\x20✓':_0xbab703[_0x265248(0x1ed)]==='manual'?'\x20\x20⚠️':'\x20\x20✗','\x20',_0xbab703['ide'],':']}),a54_0x5b5cdf(Text,{'color':_0xbab703[_0x265248(0x1ed)]===_0x265248(0x20f)?_0x265248(0x206):_0xbab703[_0x265248(0x1ed)]===_0x265248(0x1ec)?'yellow':_0x265248(0x1ee),'children':_0xbab703[_0x265248(0x201)]})]},_0x5b321e)),a54_0x5b5cdf(Box,{'marginTop':0x1,'children':a54_0x5b5cdf(Text,{'color':_0x265248(0x21e),'children':_0x265248(0x212)})})]});}async function configureMcp(_0x3b42c1){const _0xc50f2f=a54_0x334bce,_0x432162=process[_0xc50f2f(0x20e)]();switch(_0x3b42c1){case _0xc50f2f(0x203):return configureCursorMcp(_0x432162);case _0xc50f2f(0x1f0):return configureClaudeMcp(_0x432162);case'other':return showOtherMcpGuide(_0x432162);default:throw new Error(_0xc50f2f(0x21a)+_0x3b42c1);}}
1
+ const a55_0x262c49=a55_0x48bf;(function(_0x3f8334,_0x4238bb){const _0x75b6a5=a55_0x48bf,_0x1fa058=_0x3f8334();while(!![]){try{const _0x3a04e1=parseInt(_0x75b6a5(0xa0))/0x1*(parseInt(_0x75b6a5(0xb0))/0x2)+-parseInt(_0x75b6a5(0xb7))/0x3*(parseInt(_0x75b6a5(0xb4))/0x4)+parseInt(_0x75b6a5(0xae))/0x5+parseInt(_0x75b6a5(0xc4))/0x6*(-parseInt(_0x75b6a5(0xa2))/0x7)+-parseInt(_0x75b6a5(0x9f))/0x8*(parseInt(_0x75b6a5(0xc1))/0x9)+parseInt(_0x75b6a5(0xa6))/0xa*(-parseInt(_0x75b6a5(0xbb))/0xb)+parseInt(_0x75b6a5(0xb5))/0xc*(parseInt(_0x75b6a5(0x9c))/0xd);if(_0x3a04e1===_0x4238bb)break;else _0x1fa058['push'](_0x1fa058['shift']());}catch(_0x3b9317){_0x1fa058['push'](_0x1fa058['shift']());}}}(a55_0x5691,0x6de16));import{jsx as a55_0x3e6686,jsxs as a55_0x32c42b,Fragment as a55_0x37996e}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';function a55_0x48bf(_0x384985,_0x1e84d9){_0x384985=_0x384985-0x97;const _0x56914c=a55_0x5691();let _0x48bf85=_0x56914c[_0x384985];return _0x48bf85;}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array[a55_0x262c49(0x9a)](MCP_IDES)[a55_0x262c49(0xa8)](_0x420793=>({'key':_0x420793,'name':IDE_CONFIGS[_0x420793][a55_0x262c49(0xcc)],'description':IDE_CONFIGS[_0x420793][a55_0x262c49(0x9d)]})),{'key':a55_0x262c49(0xba),'name':a55_0x262c49(0xc9),'description':a55_0x262c49(0xb9)}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x30848e=a55_0x262c49,{exit:_0x45db0c}=useApp(),[_0x173f58,_0x1f53e3]=useState('selecting'),[_0x282d65,_0x7cd36f]=useState([]),[_0x39e05b,_0x2f08b7]=useState([]),_0x1ca392=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x19d8e4=a55_0x48bf;preselectedIDEs['length']>0x0&&_0x1ca392[_0x19d8e4(0xa5)][_0x19d8e4(0xa9)]>0x0&&_0x5a6620();},[]),useInput((_0x245890,_0x1cd1f1)=>{const _0x3975d9=a55_0x48bf;if(_0x173f58===_0x3975d9(0xb3)){if(_0x245890==='q'||_0x245890==='Q'){_0x45db0c();return;}if(_0x1cd1f1['return']){if(_0x1ca392[_0x3975d9(0xa5)]['size']===0x0){_0x1ca392[_0x3975d9(0xc8)]('请至少选择一个\x20IDE');return;}_0x5a6620();return;}_0x1ca392[_0x3975d9(0xc5)](_0x245890,_0x1cd1f1);}_0x173f58==='done'&&_0x45db0c();});async function _0x5a6620(){const _0x320050=a55_0x48bf,_0x393916=_0x1ca392[_0x320050(0x9e)]();_0x7cd36f([{'label':_0x320050(0x97),'value':_0x1ca392[_0x320050(0xa5)][_0x320050(0xa9)]+'\x20个'}]),_0x1f53e3('configuring');const _0x305d67=[];for(const _0x3cb729 of _0x393916){try{const _0x55d618=await configureMcp(_0x3cb729);_0x305d67['push']({'ide':IDE_LIST['find'](_0x5096f3=>_0x5096f3[_0x320050(0xcd)]===_0x3cb729)?.['name']||_0x3cb729,'status':_0x55d618[_0x320050(0xb1)]?'manual':_0x55d618[_0x320050(0xcb)]?_0x320050(0xcb):_0x320050(0xbd),'message':_0x55d618['message']});}catch(_0x4b89c5){_0x305d67[_0x320050(0xb2)]({'ide':IDE_LIST[_0x320050(0xa3)](_0x528278=>_0x528278[_0x320050(0xcd)]===_0x3cb729)?.[_0x320050(0xcc)]||_0x3cb729,'status':_0x320050(0xbd),'message':_0x4b89c5 instanceof Error?_0x4b89c5[_0x320050(0xc6)]:String(_0x4b89c5)});}}_0x2f08b7(_0x305d67),_0x1f53e3(_0x320050(0xc2)),setTimeout(()=>{_0x45db0c();},0x1388);}return a55_0x32c42b(Box,{'flexDirection':_0x30848e(0xa4),'marginTop':0x1,'children':[_0x173f58===_0x30848e(0xb3)&&a55_0x3e6686(IDESelector,{'ideList':IDE_LIST,'title':'配置\x20Lovrabet\x20MCP\x20服务器','selection':_0x1ca392}),_0x173f58==='configuring'&&a55_0x32c42b(a55_0x37996e,{'children':[_0x282d65[_0x30848e(0xa8)]((_0x5680c5,_0x30729d)=>a55_0x32c42b(Box,{'children':[a55_0x32c42b(Text,{'color':'green','children':['√\x20',_0x5680c5[_0x30848e(0xca)],':\x20']}),a55_0x3e6686(Text,{'color':_0x30848e(0xb6),'children':_0x5680c5[_0x30848e(0xbf)]})]},_0x30729d)),a55_0x3e6686(Box,{'marginTop':0x1,'children':a55_0x3e6686(Text,{'children':_0x30848e(0xa1)})})]}),_0x173f58==='done'&&a55_0x3e6686(DoneStep,{'configResults':_0x39e05b})]});}function DoneStep({configResults:_0xcaed2f}){const _0x298c3f=a55_0x262c49,_0x5351eb=_0xcaed2f[_0x298c3f(0xbc)](_0x19d00f=>_0x19d00f[_0x298c3f(0xb8)]===_0x298c3f(0xcb)),_0x1899eb=_0xcaed2f[_0x298c3f(0xaf)](_0x417d0f=>_0x417d0f[_0x298c3f(0xb8)]===_0x298c3f(0xce)),_0xa58212=_0xcaed2f[_0x298c3f(0xaf)](_0x5c84ac=>_0x5c84ac[_0x298c3f(0xb8)]===_0x298c3f(0xbd));return a55_0x32c42b(a55_0x37996e,{'children':[a55_0x3e6686(Box,{'children':_0x5351eb?a55_0x3e6686(Text,{'color':'green','children':'✓\x20MCP\x20配置完成!'}):_0x1899eb?a55_0x3e6686(Text,{'color':_0x298c3f(0xa7),'children':'⚠️\x20部分配置需要手动完成'}):_0xa58212?a55_0x3e6686(Text,{'color':'red','children':_0x298c3f(0xc3)}):a55_0x3e6686(Text,{'color':_0x298c3f(0xa7),'children':_0x298c3f(0xc0)})}),_0xcaed2f[_0x298c3f(0xa8)]((_0x3969a9,_0xb808a2)=>a55_0x32c42b(Box,{'flexDirection':'column','children':[a55_0x32c42b(Text,{'color':_0x3969a9[_0x298c3f(0xb8)]===_0x298c3f(0xcb)?'green':_0x3969a9[_0x298c3f(0xb8)]==='manual'?_0x298c3f(0xa7):_0x298c3f(0x9b),'children':[_0x3969a9['status']===_0x298c3f(0xcb)?_0x298c3f(0xc7):_0x3969a9[_0x298c3f(0xb8)]===_0x298c3f(0xce)?_0x298c3f(0x99):'\x20\x20✗','\x20',_0x3969a9[_0x298c3f(0xac)],':']}),a55_0x3e6686(Text,{'color':_0x3969a9[_0x298c3f(0xb8)]===_0x298c3f(0xcb)?_0x298c3f(0xad):_0x3969a9[_0x298c3f(0xb8)]==='manual'?_0x298c3f(0xa7):_0x298c3f(0x9b),'children':_0x3969a9[_0x298c3f(0xc6)]})]},_0xb808a2)),a55_0x3e6686(Box,{'marginTop':0x1,'children':a55_0x3e6686(Text,{'color':_0x298c3f(0x98),'children':_0x298c3f(0xab)})})]});}async function configureMcp(_0x33d519){const _0x56b614=a55_0x262c49,_0x2ccce1=process[_0x56b614(0xbe)]();switch(_0x33d519){case _0x56b614(0xaa):return configureCursorMcp(_0x2ccce1);case'claude':return configureClaudeMcp(_0x2ccce1);case _0x56b614(0xba):return showOtherMcpGuide(_0x2ccce1);default:throw new Error('不支持的\x20IDE:\x20'+_0x33d519);}}function a55_0x5691(){const _0x1eb329=['from','red','26407069eiJLuP','description','getSelectedIDEs','8IpUqbd','2092TERnLN','正在配置\x20MCP\x20服务器...','7fkMSka','find','column','selectedIndexes','40gQZdYR','yellow','map','size','cursor','按任意键退出...','ide','white','1553095PFPcyV','some','194tRLqiL','needsManualAction','push','selecting','260rRDdTH','12eVzKJD','cyan','14142eXZkvi','status','其他\x20IDE\x20配置指引','other','2052259yFgPiS','every','error','cwd','value','⚠️\x20配置需要手动完成','3253635pdRvFN','done','✗\x20配置失败','4083510GDjjJZ','handleKeyDown','message','\x20\x20✓','setErrorMsg','其他\x20IDE','label','success','name','key','manual','已选择\x20IDE','gray','\x20\x20⚠️'];a55_0x5691=function(){return _0x1eb329;};return a55_0x5691();}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- function a55_0x19eb(){const _0x3286b1=['274473wCqOOi','8WNNsdw','exit','210835lZIfDE','252242UNzdCF','message','56157JZWoEa','1151368nvIpjU','8WFXyOI','6286AMZrcb','error','\x0a📋\x20','16489nZtyAq','1524uJXwQP','success','70ySMiHS'];a55_0x19eb=function(){return _0x3286b1;};return a55_0x19eb();}(function(_0x109927,_0x447516){const _0xe16dd2=a55_0x1a55,_0xec3aad=_0x109927();while(!![]){try{const _0x55f475=parseInt(_0xe16dd2(0x1e2))/0x1+-parseInt(_0xe16dd2(0x1d6))/0x2*(parseInt(_0xe16dd2(0x1d4))/0x3)+parseInt(_0xe16dd2(0x1d5))/0x4+-parseInt(_0xe16dd2(0x1e1))/0x5+parseInt(_0xe16dd2(0x1db))/0x6*(-parseInt(_0xe16dd2(0x1d7))/0x7)+parseInt(_0xe16dd2(0x1df))/0x8*(-parseInt(_0xe16dd2(0x1de))/0x9)+parseInt(_0xe16dd2(0x1dd))/0xa*(-parseInt(_0xe16dd2(0x1da))/0xb);if(_0x55f475===_0x447516)break;else _0xec3aad['push'](_0xec3aad['shift']());}catch(_0x24b42f){_0xec3aad['push'](_0xec3aad['shift']());}}}(a55_0x19eb,0x25967));function a55_0x1a55(_0x45bf75,_0xb5963a){_0x45bf75=_0x45bf75-0x1d3;const _0x19ebb5=a55_0x19eb();let _0x1a55a8=_0x19ebb5[_0x45bf75];return _0x1a55a8;}import{configureClaudeMcp as a55_0x388e7d}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x249f1d=a55_0x1a55,_0x33cf40=process['cwd'](),_0x19d1bd=a55_0x388e7d(_0x33cf40);_0x19d1bd[_0x249f1d(0x1dc)]?(console['log'](_0x249f1d(0x1d9)+_0x19d1bd[_0x249f1d(0x1d3)]+'\x0a'),process[_0x249f1d(0x1e0)](0x0)):(console[_0x249f1d(0x1d8)]('\x0a错误:\x20配置失败\x20-\x20'+_0x19d1bd['message']+'\x0a'),process['exit'](0x1));}
1
+ (function(_0x4c4c57,_0x452334){const _0x2ffdb2=a56_0x449b,_0x53abf0=_0x4c4c57();while(!![]){try{const _0x56d9c3=parseInt(_0x2ffdb2(0xf4))/0x1+parseInt(_0x2ffdb2(0xf1))/0x2+-parseInt(_0x2ffdb2(0xf3))/0x3+-parseInt(_0x2ffdb2(0xf2))/0x4*(parseInt(_0x2ffdb2(0xee))/0x5)+-parseInt(_0x2ffdb2(0xef))/0x6*(-parseInt(_0x2ffdb2(0xeb))/0x7)+parseInt(_0x2ffdb2(0xf6))/0x8+parseInt(_0x2ffdb2(0xed))/0x9;if(_0x56d9c3===_0x452334)break;else _0x53abf0['push'](_0x53abf0['shift']());}catch(_0x49fc33){_0x53abf0['push'](_0x53abf0['shift']());}}}(a56_0x4596,0x86852));function a56_0x4596(){const _0x4183a3=['6cXzfGA','\x0a错误:\x20配置失败\x20-\x20','677464iQYDzt','31316iOHbia','2787648eeJAid','998170wXSZWy','exit','795888ovDgBN','success','message','error','1924195gEaOwZ','log','4473306cmmOLX','465kpJiLW'];a56_0x4596=function(){return _0x4183a3;};return a56_0x4596();}import{configureClaudeMcp as a56_0x320e61}from'./mcp-installer.js';function a56_0x449b(_0xa16bc,_0x504412){_0xa16bc=_0xa16bc-0xeb;const _0x4596f9=a56_0x4596();let _0x449b92=_0x4596f9[_0xa16bc];return _0x449b92;}export async function configureClaudeMcp(){const _0x483d57=a56_0x449b,_0x6c5128=process['cwd'](),_0xd2a113=a56_0x320e61(_0x6c5128);_0xd2a113[_0x483d57(0xf7)]?(console[_0x483d57(0xec)]('\x0a📋\x20'+_0xd2a113[_0x483d57(0xf8)]+'\x0a'),process[_0x483d57(0xf5)](0x0)):(console[_0x483d57(0xf9)](_0x483d57(0xf0)+_0xd2a113['message']+'\x0a'),process[_0x483d57(0xf5)](0x1));}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- function a56_0x9299(_0x39a8b6,_0x2175c6){_0x39a8b6=_0x39a8b6-0xf1;const _0x359495=a56_0x3594();let _0x9299cd=_0x359495[_0x39a8b6];return _0x9299cd;}(function(_0x187297,_0x59bb67){const _0x50a31c=a56_0x9299,_0x47bcde=_0x187297();while(!![]){try{const _0x46c5f2=parseInt(_0x50a31c(0xf7))/0x1+parseInt(_0x50a31c(0xf5))/0x2+-parseInt(_0x50a31c(0xf6))/0x3+-parseInt(_0x50a31c(0xf8))/0x4*(parseInt(_0x50a31c(0xff))/0x5)+-parseInt(_0x50a31c(0xf2))/0x6*(-parseInt(_0x50a31c(0xfc))/0x7)+-parseInt(_0x50a31c(0xf1))/0x8*(-parseInt(_0x50a31c(0x101))/0x9)+-parseInt(_0x50a31c(0xfb))/0xa*(parseInt(_0x50a31c(0x100))/0xb);if(_0x46c5f2===_0x59bb67)break;else _0x47bcde['push'](_0x47bcde['shift']());}catch(_0x19b9eb){_0x47bcde['push'](_0x47bcde['shift']());}}}(a56_0x3594,0xe1c94));import{configureCursorMcp as a56_0xa38545}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x3ad2ff=a56_0x9299,_0x47f099=process['cwd'](),_0x8b821a=await a56_0xa38545(_0x47f099);_0x8b821a[_0x3ad2ff(0xf4)]?(console[_0x3ad2ff(0xfe)](_0x3ad2ff(0xfd)),console[_0x3ad2ff(0xfe)](_0x3ad2ff(0xf3)),console[_0x3ad2ff(0xfe)]('\x20\x20'+_0x8b821a['message']+'\x0a'),console[_0x3ad2ff(0xfe)](_0x3ad2ff(0xfa)),console['log']('请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。'),process[_0x3ad2ff(0x102)](0x0)):(console[_0x3ad2ff(0xf9)](_0x3ad2ff(0x103)+_0x8b821a['message']+'\x0a'),process['exit'](0x1));}function a56_0x3594(){const _0x4245d3=['5114220XRsZQI','145534oTAspe','276QsmWfL','error','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','10dLwoJM','383453iVPMGD','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','log','3205CRHPLK','16299107vZgZfp','9LlSXXf','exit','\x0a错误:\x20配置失败\x20-\x20','14031152cXdRWG','102HCfckJ','配置信息:','success','2649710tdaDmP'];a56_0x3594=function(){return _0x4245d3;};return a56_0x3594();}
1
+ function a57_0x1b94(_0x2c2520,_0x2ddcbb){_0x2c2520=_0x2c2520-0x1f0;const _0x287c60=a57_0x287c();let _0x1b9413=_0x287c60[_0x2c2520];return _0x1b9413;}(function(_0x472195,_0x4a23f6){const _0x3767b1=a57_0x1b94,_0x561e76=_0x472195();while(!![]){try{const _0x2dffbd=parseInt(_0x3767b1(0x1fe))/0x1+parseInt(_0x3767b1(0x1fb))/0x2+-parseInt(_0x3767b1(0x1f3))/0x3+-parseInt(_0x3767b1(0x1f1))/0x4*(-parseInt(_0x3767b1(0x1ff))/0x5)+-parseInt(_0x3767b1(0x1fa))/0x6+-parseInt(_0x3767b1(0x1f7))/0x7+-parseInt(_0x3767b1(0x1f6))/0x8*(-parseInt(_0x3767b1(0x1fc))/0x9);if(_0x2dffbd===_0x4a23f6)break;else _0x561e76['push'](_0x561e76['shift']());}catch(_0x3e83f3){_0x561e76['push'](_0x561e76['shift']());}}}(a57_0x287c,0x9585d));import{configureCursorMcp as a57_0x222bf6}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x2a062a=a57_0x1b94,_0x5a8d6a=process[_0x2a062a(0x1f4)](),_0xb0e70a=await a57_0x222bf6(_0x5a8d6a);_0xb0e70a[_0x2a062a(0x1f2)]?(console['log'](_0x2a062a(0x1f8)),console[_0x2a062a(0x1f5)]('配置信息:'),console[_0x2a062a(0x1f5)]('\x20\x20'+_0xb0e70a[_0x2a062a(0x1f9)]+'\x0a'),console[_0x2a062a(0x1f5)](_0x2a062a(0x1f0)),console[_0x2a062a(0x1f5)]('请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。'),process[_0x2a062a(0x1fd)](0x0)):(console['error']('\x0a错误:\x20配置失败\x20-\x20'+_0xb0e70a[_0x2a062a(0x1f9)]+'\x0a'),process[_0x2a062a(0x1fd)](0x1));}function a57_0x287c(){const _0x302e9b=['1065907UsiWOO','2245rjnvMB','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','772bqIWnI','success','15561xeddXy','cwd','log','1486984tuwiSW','5918724ENvsao','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','message','3304668DkdmHF','1351010CCnecU','9yQTlbZ','exit'];a57_0x287c=function(){return _0x302e9b;};return a57_0x287c();}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3b1bff,_0x1f0955){const _0x3138ef=a57_0x9af2,_0x1eaed3=_0x3b1bff();while(!![]){try{const _0x4f9016=parseInt(_0x3138ef(0x116))/0x1+-parseInt(_0x3138ef(0x10e))/0x2*(-parseInt(_0x3138ef(0x113))/0x3)+parseInt(_0x3138ef(0x11b))/0x4+parseInt(_0x3138ef(0x118))/0x5+parseInt(_0x3138ef(0x122))/0x6*(parseInt(_0x3138ef(0x125))/0x7)+-parseInt(_0x3138ef(0x11f))/0x8*(-parseInt(_0x3138ef(0x123))/0x9)+-parseInt(_0x3138ef(0x12a))/0xa;if(_0x4f9016===_0x1f0955)break;else _0x1eaed3['push'](_0x1eaed3['shift']());}catch(_0x38ce3d){_0x1eaed3['push'](_0x1eaed3['shift']());}}}(a57_0x4828,0xa7dc4));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';function a57_0x4828(){const _0x31b81d=['join','\x0a无效的选择,请输入\x201-','forEach','message','stdin','mcpClaude','\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','mcpCursor','close','help','\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP','from','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','error','\x0a可用命令:','2tepqLJ','claude','description','配置失败','请输入编号选择\x20IDE:\x0a','2358543zETdvH','toLowerCase','\x20\x20q.\x20取消\x0a','981460NLEVty','mcp-install','5594385ZUkobG','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','--help','4414756evXYYs','\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','install','quit','48KxgKHG','(空)','\x0a错误:\x20配置失败\x20-\x20','24FFWvBA','145359xguxUF','\x20-\x20','898324jNKtEP','log','\x0a📦\x20正在配置\x20','不支持的命令:\x20','\x20MCP...\x0a','39128850bshXcb','cursor','length','has','name','错误:\x20不支持的命令:\x20','请选择:\x20','exit','mcp'];a57_0x4828=function(){return _0x31b81d;};return a57_0x4828();}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x2151ff,_0x698dd9,_0x416e3a){const _0x55f06f=a57_0x9af2;logger['setLogPath'](process['cwd']());if(_0x416e3a?.[_0x55f06f(0x108)]||_0x2151ff===_0x55f06f(0x11a)){showHelp();return;}_0x2151ff!==_0x55f06f(0x11d)&&(console[_0x55f06f(0x10c)](_0x55f06f(0x12f)+(_0x2151ff||_0x55f06f(0x120))),console[_0x55f06f(0x126)](_0x55f06f(0x10d)),console[_0x55f06f(0x126)](_0x55f06f(0x109)),console['log'](_0x55f06f(0x119)),logger['error'](_0x55f06f(0xfe),_0x55f06f(0x128)+_0x2151ff),process[_0x55f06f(0xfd)](0x1));let _0x5d3685;if(_0x416e3a?.[_0x55f06f(0x106)])_0x5d3685=_0x55f06f(0x12b);else{if(_0x416e3a?.[_0x55f06f(0x104)])_0x5d3685=_0x55f06f(0x10f);else{if(_0x698dd9?.[0x0]){const _0x5968ff=_0x698dd9[0x0][_0x55f06f(0x114)]();MCP_IDES[_0x55f06f(0x12d)](_0x5968ff)&&(_0x5d3685=_0x5968ff);}}}await installMcp(_0x5d3685);}function showHelp(){const _0x4be427=a57_0x9af2;console[_0x4be427(0x126)](_0x4be427(0x105)+Array[_0x4be427(0x10a)](MCP_IDES)['map']((_0x3a476a,_0x454efd)=>'\x20\x20'+(_0x454efd+0x1)+'.\x20'+IDE_CONFIGS[_0x3a476a][_0x4be427(0x12e)]+_0x4be427(0x124)+IDE_CONFIGS[_0x3a476a][_0x4be427(0x110)])[_0x4be427(0xff)]('\x0a')+_0x4be427(0x11c));}async function selectIDE(){const _0x354911=a57_0x9af2;console[_0x354911(0x126)](_0x354911(0x10b));const _0x3634e5=Array[_0x354911(0x10a)](MCP_IDES);return _0x3634e5[_0x354911(0x101)]((_0xaa4488,_0x51e2bc)=>{const _0x54e5c0=_0x354911;console[_0x54e5c0(0x126)]('\x20\x20'+(_0x51e2bc+0x1)+'.\x20'+IDE_CONFIGS[_0xaa4488][_0x54e5c0(0x12e)]+_0x54e5c0(0x124)+IDE_CONFIGS[_0xaa4488][_0x54e5c0(0x110)]);}),console['log'](_0x354911(0x115)),console[_0x354911(0x126)](_0x354911(0x112)),new Promise(_0x21738e=>{const _0x4ae212=_0x354911,_0x5f334b=createInterface({'input':process[_0x4ae212(0x103)],'output':process['stdout']});_0x5f334b['question'](_0x4ae212(0xfc),_0x551102=>{const _0x5e5616=_0x4ae212;_0x5f334b[_0x5e5616(0x107)]();const _0x58bcd6=_0x551102['trim']()[_0x5e5616(0x114)]();(_0x58bcd6==='q'||_0x58bcd6===_0x5e5616(0x11e)||_0x58bcd6===_0x5e5616(0xfd))&&(console[_0x5e5616(0x126)]('\x0a已取消配置\x0a'),process[_0x5e5616(0xfd)](0x0));const _0xf98bf2=parseInt(_0x58bcd6,0xa);if(!isNaN(_0xf98bf2)&&_0xf98bf2>=0x1&&_0xf98bf2<=_0x3634e5[_0x5e5616(0x12c)]){const _0x37ebc9=_0x3634e5[_0xf98bf2-0x1];_0x37ebc9&&_0x21738e(_0x37ebc9);return;}console[_0x5e5616(0x126)](_0x5e5616(0x100)+_0x3634e5[_0x5e5616(0x12c)]+'\x20之间的数字\x0a'),process[_0x5e5616(0xfd)](0x1);});});}function a57_0x9af2(_0x2774bf,_0x3d6938){_0x2774bf=_0x2774bf-0xfc;const _0x482860=a57_0x4828();let _0x9af283=_0x482860[_0x2774bf];return _0x9af283;}async function installMcp(_0x5e9e52){const _0x42f5ad=a57_0x9af2;let _0x37d710;!_0x5e9e52?_0x37d710=await selectIDE():_0x37d710=_0x5e9e52;try{const _0x47a005=IDE_CONFIGS[_0x37d710];console[_0x42f5ad(0x126)](_0x42f5ad(0x127)+_0x47a005['name']+_0x42f5ad(0x129));switch(_0x37d710){case _0x42f5ad(0x12b):await configureCursorMcp();break;case _0x42f5ad(0x10f):await configureClaudeMcp();break;}}catch(_0x4c7492){logger[_0x42f5ad(0x10c)](_0x42f5ad(0x117),_0x42f5ad(0x111),{'error':_0x4c7492 instanceof Error?_0x4c7492[_0x42f5ad(0x102)]:String(_0x4c7492)}),console[_0x42f5ad(0x10c)](_0x42f5ad(0x121)+(_0x4c7492 instanceof Error?_0x4c7492[_0x42f5ad(0x102)]:String(_0x4c7492))+'\x0a'),process['exit'](0x1);}}
1
+ function a58_0x19b6(){const _0x1126fa=['\x0a可用命令:','\x0a错误:\x20配置失败\x20-\x20','setLogPath','不支持的命令:\x20','mcpClaude','3WysPAT','mcpCursor','209324mxeVvA','\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','\x0a无效的选择,请输入\x201-','has','\x20MCP...\x0a','\x0a📦\x20正在配置\x20','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','2257624mpsmBL','cursor','stdout','67098VJeiSP','()','description','trim','join','name','mcp-install','711206pWXhoa','cwd','\x20-\x20','2181640hJPCiC','exit','\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','install','9NnLpYW','claude','from','请选择:\x20','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','help','\x20之间的数字\x0a','length','399xaympD','配置失败','mcp','map','log','forEach','error','toLowerCase','3134944hnmsmx','3097555FgjXfv'];a58_0x19b6=function(){return _0x1126fa;};return a58_0x19b6();}(function(_0x58c85e,_0x3814e0){const _0x5f02eb=a58_0x2e0e,_0x1a9428=_0x58c85e();while(!![]){try{const _0x27f0c0=-parseInt(_0x5f02eb(0x8a))/0x1+parseInt(_0x5f02eb(0x9b))/0x2*(-parseInt(_0x5f02eb(0x88))/0x3)+-parseInt(_0x5f02eb(0x81))/0x4+parseInt(_0x5f02eb(0x82))/0x5+-parseInt(_0x5f02eb(0x94))/0x6*(-parseInt(_0x5f02eb(0x79))/0x7)+parseInt(_0x5f02eb(0x91))/0x8*(parseInt(_0x5f02eb(0x71))/0x9)+parseInt(_0x5f02eb(0x6d))/0xa;if(_0x27f0c0===_0x3814e0)break;else _0x1a9428['push'](_0x1a9428['shift']());}catch(_0x5463d3){_0x1a9428['push'](_0x1a9428['shift']());}}}(a58_0x19b6,0x63c46));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';function a58_0x2e0e(_0x2ef1a3,_0x3c8ad6){_0x2ef1a3=_0x2ef1a3-0x6d;const _0x19b67a=a58_0x19b6();let _0x2e0ee=_0x19b67a[_0x2ef1a3];return _0x2e0ee;}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x27e0dc,_0x531b67,_0x1cc755){const _0xefc186=a58_0x2e0e;logger[_0xefc186(0x85)](process[_0xefc186(0x9c)]());if(_0x1cc755?.[_0xefc186(0x76)]||_0x27e0dc==='--help'){showHelp();return;}_0x27e0dc!==_0xefc186(0x70)&&(console[_0xefc186(0x7f)]('错误:\x20不支持的命令:\x20'+(_0x27e0dc||_0xefc186(0x95))),console[_0xefc186(0x7d)](_0xefc186(0x83)),console[_0xefc186(0x7d)]('\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP'),console['log'](_0xefc186(0x75)),logger['error'](_0xefc186(0x7b),_0xefc186(0x86)+_0x27e0dc),process[_0xefc186(0x6e)](0x1));let _0x252f3b;if(_0x1cc755?.[_0xefc186(0x89)])_0x252f3b=_0xefc186(0x92);else{if(_0x1cc755?.[_0xefc186(0x87)])_0x252f3b=_0xefc186(0x72);else{if(_0x531b67?.[0x0]){const _0x48d417=_0x531b67[0x0][_0xefc186(0x80)]();MCP_IDES[_0xefc186(0x8d)](_0x48d417)&&(_0x252f3b=_0x48d417);}}}await installMcp(_0x252f3b);}function showHelp(){const _0x127c92=a58_0x2e0e;console['log'](_0x127c92(0x6f)+Array[_0x127c92(0x73)](MCP_IDES)[_0x127c92(0x7c)]((_0x554248,_0x5ee321)=>'\x20\x20'+(_0x5ee321+0x1)+'.\x20'+IDE_CONFIGS[_0x554248][_0x127c92(0x99)]+_0x127c92(0x9d)+IDE_CONFIGS[_0x554248]['description'])[_0x127c92(0x98)]('\x0a')+_0x127c92(0x8b));}async function selectIDE(){const _0x34e84a=a58_0x2e0e;console['log'](_0x34e84a(0x90));const _0x14c5bc=Array[_0x34e84a(0x73)](MCP_IDES);return _0x14c5bc[_0x34e84a(0x7e)]((_0x2ca4f3,_0x2755b0)=>{const _0x3fc47e=_0x34e84a;console[_0x3fc47e(0x7d)]('\x20\x20'+(_0x2755b0+0x1)+'.\x20'+IDE_CONFIGS[_0x2ca4f3][_0x3fc47e(0x99)]+'\x20-\x20'+IDE_CONFIGS[_0x2ca4f3][_0x3fc47e(0x96)]);}),console['log']('\x20\x20q.\x20取消\x0a'),console[_0x34e84a(0x7d)]('请输入编号选择\x20IDE:\x0a'),new Promise(_0xf94f0a=>{const _0x5d66ad=_0x34e84a,_0x3754c3=createInterface({'input':process['stdin'],'output':process[_0x5d66ad(0x93)]});_0x3754c3['question'](_0x5d66ad(0x74),_0x3b03ba=>{const _0x533360=_0x5d66ad;_0x3754c3['close']();const _0x3b4df1=_0x3b03ba[_0x533360(0x97)]()[_0x533360(0x80)]();(_0x3b4df1==='q'||_0x3b4df1==='quit'||_0x3b4df1==='exit')&&(console[_0x533360(0x7d)]('\x0a已取消配置\x0a'),process['exit'](0x0));const _0x418ea7=parseInt(_0x3b4df1,0xa);if(!isNaN(_0x418ea7)&&_0x418ea7>=0x1&&_0x418ea7<=_0x14c5bc[_0x533360(0x78)]){const _0x2d950f=_0x14c5bc[_0x418ea7-0x1];_0x2d950f&&_0xf94f0a(_0x2d950f);return;}console[_0x533360(0x7d)](_0x533360(0x8c)+_0x14c5bc[_0x533360(0x78)]+_0x533360(0x77)),process['exit'](0x1);});});}async function installMcp(_0x5702c9){const _0x2cd023=a58_0x2e0e;let _0x53dd43;!_0x5702c9?_0x53dd43=await selectIDE():_0x53dd43=_0x5702c9;try{const _0x2b6670=IDE_CONFIGS[_0x53dd43];console['log'](_0x2cd023(0x8f)+_0x2b6670[_0x2cd023(0x99)]+_0x2cd023(0x8e));switch(_0x53dd43){case'cursor':await configureCursorMcp();break;case _0x2cd023(0x72):await configureClaudeMcp();break;}}catch(_0x51d001){logger[_0x2cd023(0x7f)](_0x2cd023(0x9a),_0x2cd023(0x7a),{'error':_0x51d001 instanceof Error?_0x51d001['message']:String(_0x51d001)}),console[_0x2cd023(0x7f)](_0x2cd023(0x84)+(_0x51d001 instanceof Error?_0x51d001['message']:String(_0x51d001))+'\x0a'),process[_0x2cd023(0x6e)](0x1);}}
@@ -1 +1 @@
1
- const a58_0x293c8b=a58_0x493e;(function(_0x56af87,_0x55b842){const _0x93c401=a58_0x493e,_0x49bf96=_0x56af87();while(!![]){try{const _0x18903d=-parseInt(_0x93c401(0x90))/0x1+-parseInt(_0x93c401(0x7e))/0x2+parseInt(_0x93c401(0x8c))/0x3*(-parseInt(_0x93c401(0x7c))/0x4)+-parseInt(_0x93c401(0x88))/0x5*(parseInt(_0x93c401(0x91))/0x6)+-parseInt(_0x93c401(0x93))/0x7+parseInt(_0x93c401(0x7f))/0x8*(-parseInt(_0x93c401(0x81))/0x9)+-parseInt(_0x93c401(0x8f))/0xa*(-parseInt(_0x93c401(0x87))/0xb);if(_0x18903d===_0x55b842)break;else _0x49bf96['push'](_0x49bf96['shift']());}catch(_0x7a631d){_0x49bf96['push'](_0x49bf96['shift']());}}}(a58_0x1f5c,0x8a73e));function a58_0x1f5c(){const _0x17045a=['未知的\x20IDE:\x20','\x20成功)','\x0a注意:部分配置需要手动执行命令,请按照上述说明操作','44UtqwFN','813620xbPxOX','success','\x0a✓\x20MCP\x20配置完成\x20(','mcp-install-non-interactive','137097shQkrz','info','needsManualAction','10282250JdzQJP','312744UFJaXL','6XoKKjQ','claude','5362924AQlIHK','length','\x20MCP\x20配置失败:\x20','error','message','cwd','8RYUhSq','Cursor','2163178bjeWNY','9049688OSRAIo','\x0a✗\x20','9ysmKzL','log','其他\x20IDE'];a58_0x1f5c=function(){return _0x17045a;};return a58_0x1f5c();}function a58_0x493e(_0x119593,_0x2959f5){_0x119593=_0x119593-0x7a;const _0x1f5c3e=a58_0x1f5c();let _0x493ec5=_0x1f5c3e[_0x119593];return _0x493ec5;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x43a01e,_0x5a0b91=process[a58_0x293c8b(0x7b)]()){const _0x1a9238=a58_0x293c8b;logger['setLogPath'](_0x5a0b91),logger[_0x1a9238(0x8d)](_0x1a9238(0x8b),'开始配置\x20MCP',{'ides':_0x43a01e});const _0x56a07d=[];for(const _0x26a1f2 of _0x43a01e){try{let _0x1334f5;switch(_0x26a1f2){case'cursor':_0x1334f5=await configureCursorMcp(_0x5a0b91);break;case _0x1a9238(0x92):_0x1334f5=configureClaudeMcp(_0x5a0b91);break;case'other':_0x1334f5=showOtherMcpGuide(_0x5a0b91);break;default:_0x1334f5={'success':![],'message':_0x1a9238(0x84)+_0x26a1f2};}_0x56a07d['push'](_0x1334f5);if(_0x1334f5['success']){const _0x1a0bd2=_0x26a1f2==='cursor'?_0x1a9238(0x7d):_0x26a1f2===_0x1a9238(0x92)?'Claude\x20Code':_0x1a9238(0x83);console[_0x1a9238(0x82)]('\x0a✓\x20'+_0x1a0bd2+'\x20MCP\x20配置成功'),console[_0x1a9238(0x82)]('\x20\x20'+_0x1334f5[_0x1a9238(0x7a)]);}else console[_0x1a9238(0x96)](_0x1a9238(0x80)+_0x26a1f2+'\x20MCP\x20配置失败:\x20'+_0x1334f5[_0x1a9238(0x7a)]);}catch(_0xe56afa){console[_0x1a9238(0x96)](_0x1a9238(0x80)+_0x26a1f2+_0x1a9238(0x95)+(_0xe56afa instanceof Error?_0xe56afa[_0x1a9238(0x7a)]:String(_0xe56afa)));}}const _0xb50da8=_0x56a07d['filter'](_0xcdd65d=>_0xcdd65d[_0x1a9238(0x89)])[_0x1a9238(0x94)],_0x33eff7=_0x56a07d['length'];console[_0x1a9238(0x82)](_0x1a9238(0x8a)+_0xb50da8+'/'+_0x33eff7+_0x1a9238(0x85));const _0x16b7eb=_0x56a07d['some'](_0x35f729=>_0x35f729[_0x1a9238(0x8e)]);_0x16b7eb&&console['log'](_0x1a9238(0x86));}
1
+ function a59_0x3ba3(){const _0x24406e=['216222HwzeXh','1142372uzkLfs','cursor','\x20成功)','\x20MCP\x20配置失败:\x20','filter','setLogPath','5tycoyl','465NwKFUj','needsManualAction','1383084sFxUhD','info','未知的\x20IDE:\x20','102697CoqYOt','length','error','success','377EzjrVF','other','20VKQiWD','\x0a✓\x20MCP\x20配置完成\x20(','log','7484epsyWZ','10cXJqYS','\x0a✗\x20','12sgkbnx','其他\x20IDE','Cursor','3760xukDrL','开始配置\x20MCP','8muDvAT','34944QTkaHm','claude','Claude\x20Code','\x0a✓\x20','\x20MCP\x20配置成功','some'];a59_0x3ba3=function(){return _0x24406e;};return a59_0x3ba3();}(function(_0xa22231,_0x5c434b){const _0x1e5ec8=a59_0x451d,_0x153e2a=_0xa22231();while(!![]){try{const _0x531dfc=parseInt(_0x1e5ec8(0x15b))/0x1*(parseInt(_0x1e5ec8(0x158))/0x2)+-parseInt(_0x1e5ec8(0x172))/0x3*(-parseInt(_0x1e5ec8(0x161))/0x4)+-parseInt(_0x1e5ec8(0x171))/0x5*(-parseInt(_0x1e5ec8(0x16a))/0x6)+parseInt(_0x1e5ec8(0x177))/0x7*(parseInt(_0x1e5ec8(0x163))/0x8)+-parseInt(_0x1e5ec8(0x174))/0x9*(parseInt(_0x1e5ec8(0x15c))/0xa)+-parseInt(_0x1e5ec8(0x16b))/0xb*(-parseInt(_0x1e5ec8(0x15e))/0xc)+parseInt(_0x1e5ec8(0x156))/0xd*(-parseInt(_0x1e5ec8(0x164))/0xe);if(_0x531dfc===_0x5c434b)break;else _0x153e2a['push'](_0x153e2a['shift']());}catch(_0x560703){_0x153e2a['push'](_0x153e2a['shift']());}}}(a59_0x3ba3,0x24630));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';function a59_0x451d(_0x161976,_0x402910){_0x161976=_0x161976-0x153;const _0x3ba315=a59_0x3ba3();let _0x451de8=_0x3ba315[_0x161976];return _0x451de8;}import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x54c04a,_0x2c964d=process['cwd']()){const _0x573662=a59_0x451d;logger[_0x573662(0x170)](_0x2c964d),logger[_0x573662(0x175)]('mcp-install-non-interactive',_0x573662(0x162),{'ides':_0x54c04a});const _0x314dd3=[];for(const _0x3f9719 of _0x54c04a){try{let _0x1bb3eb;switch(_0x3f9719){case _0x573662(0x16c):_0x1bb3eb=await configureCursorMcp(_0x2c964d);break;case _0x573662(0x165):_0x1bb3eb=configureClaudeMcp(_0x2c964d);break;case _0x573662(0x157):_0x1bb3eb=showOtherMcpGuide(_0x2c964d);break;default:_0x1bb3eb={'success':![],'message':_0x573662(0x176)+_0x3f9719};}_0x314dd3['push'](_0x1bb3eb);if(_0x1bb3eb[_0x573662(0x155)]){const _0x5e7b2f=_0x3f9719===_0x573662(0x16c)?_0x573662(0x160):_0x3f9719===_0x573662(0x165)?_0x573662(0x166):_0x573662(0x15f);console['log'](_0x573662(0x167)+_0x5e7b2f+_0x573662(0x168)),console[_0x573662(0x15a)]('\x20\x20'+_0x1bb3eb['message']);}else console[_0x573662(0x154)](_0x573662(0x15d)+_0x3f9719+_0x573662(0x16e)+_0x1bb3eb['message']);}catch(_0x1bd34c){console['error'](_0x573662(0x15d)+_0x3f9719+_0x573662(0x16e)+(_0x1bd34c instanceof Error?_0x1bd34c['message']:String(_0x1bd34c)));}}const _0x4796e1=_0x314dd3[_0x573662(0x16f)](_0x3419ce=>_0x3419ce['success'])[_0x573662(0x153)],_0x559dc7=_0x314dd3[_0x573662(0x153)];console[_0x573662(0x15a)](_0x573662(0x159)+_0x4796e1+'/'+_0x559dc7+_0x573662(0x16d));const _0x14d33f=_0x314dd3[_0x573662(0x169)](_0x3af1f4=>_0x3af1f4[_0x573662(0x173)]);_0x14d33f&&console[_0x573662(0x15a)]('\x0a注意:部分配置需要手动执行命令,请按照上述说明操作');}
@@ -1 +1 @@
1
- const a59_0x578f52=a59_0x4d21;(function(_0x2b7431,_0x262f62){const _0x258eb8=a59_0x4d21,_0x27a274=_0x2b7431();while(!![]){try{const _0x1b28c1=parseInt(_0x258eb8(0x167))/0x1*(-parseInt(_0x258eb8(0x175))/0x2)+-parseInt(_0x258eb8(0x16e))/0x3+parseInt(_0x258eb8(0x183))/0x4+parseInt(_0x258eb8(0x18b))/0x5+-parseInt(_0x258eb8(0x178))/0x6+-parseInt(_0x258eb8(0x193))/0x7*(parseInt(_0x258eb8(0x16d))/0x8)+parseInt(_0x258eb8(0x18d))/0x9*(parseInt(_0x258eb8(0x173))/0xa);if(_0x1b28c1===_0x262f62)break;else _0x27a274['push'](_0x27a274['shift']());}catch(_0x39ac14){_0x27a274['push'](_0x27a274['shift']());}}}(a59_0x5c01,0x4cd4e));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_0x578f52(0x177);export const MCP_COMMAND='npx';export const MCP_ARGS=[a59_0x578f52(0x187)];export function getAppConfig(){const _0x3028b7=a59_0x578f52,_0x3f8dfe=readConfig(),_0x3610a1=_0x3f8dfe[_0x3028b7(0x16f)]||_0x3f8dfe['app'],_0x420ccf=_0x3f8dfe[_0x3028b7(0x15e)]||_0x3028b7(0x186);if(!_0x3610a1)throw new Error('未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置');return{'appcode':String(_0x3610a1),'env':_0x420ccf};}export function buildMcpEnv(_0x7663b3,_0xc4b8ae){const _0x523009=a59_0x578f52,_0x425fd4={'LOVRABET_APP_CODE':_0x7663b3};return _0xc4b8ae!==_0x523009(0x186)&&(_0x425fd4[_0x523009(0x17b)]=_0xc4b8ae),_0x425fd4;}export function buildMcpServerConfig(_0x4bf652,_0x2f0127){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x4bf652,_0x2f0127)};}function a59_0x5c01(){const _0x2ed1e=['479285HRCRdG','map','3472038BvnYly','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','生成配置命令','配置信息:\x20appcode=','Cursor\x20Rules\x20文件已存在,跳过','join','208789FAqmLZ','error','请执行以下命令配置\x20Claude\x20Code\x20MCP:','配置\x20Cursor\x20MCP\x20成功','已写入\x20.cursor/mcp.json','\x20\x20\x20\x20\x20\x20}','重启\x20Cursor\x20后生效','env','mcp-install','\x22LOVRABET_APP_CODE\x22:\x20\x22','mcp-claude','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','info','配置信息:','mcp-cursor','push','232579qlaIAJ','utf-8','utf8','创建\x20agents.md\x20文件','配置\x20Cursor\x20MCP\x20失败','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','168Zkbkjp','1070556WfQBdS','appcode','rules','复制\x20Cursor\x20Rules\x20文件失败','lovrabet_rules.mdc','50hxAhGc','\x0a\x20\x20','2phXzri','\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet-dataset','3009708siGfza','message','agents.md','LOVRABET_ENV','配置失败','\x20\x20\x20\x20}','mcpServers','已创建\x20Cursor\x20Rules\x20文件','mcp.json','复制\x20agents.md\x20文件失败','\x22LOVRABET_ENV\x22:\x20\x22','29404iOhbrI','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','.cursor','online','@lovrabet/dataset-mcp-server@latest','\x20\x20\x22mcpServers\x22:\x20{','AppCode:\x20','环境:\x20'];a59_0x5c01=function(){return _0x2ed1e;};return a59_0x5c01();}function a59_0x4d21(_0x3a92af,_0x1a9f11){_0x3a92af=_0x3a92af-0x15e;const _0x5c0164=a59_0x5c01();let _0x4d21d1=_0x5c0164[_0x3a92af];return _0x4d21d1;}export function buildClaudeMcpCommand(_0x5bb4d7,_0x47b978){const _0x202dd0=a59_0x578f52,_0x3cbf3c='claude\x20mcp\x20add\x20'+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS['join']('\x20')+'\x20-e\x20LOVRABET_APP_CODE='+_0x5bb4d7,_0x10e1cf=_0x47b978!==_0x202dd0(0x186)?'\x20-e\x20LOVRABET_ENV='+_0x47b978:'';return''+_0x3cbf3c+_0x10e1cf;}export async function copyCursorRules(_0x1d182f){const _0x45951d=a59_0x578f52,_0x3c061b=join(_0x1d182f,_0x45951d(0x185)),_0x1720b8=join(_0x3c061b,_0x45951d(0x170)),_0x387d02=join(_0x1720b8,_0x45951d(0x172));if(existsSync(_0x387d02))return logger[_0x45951d(0x163)]('mcp-install',_0x45951d(0x191),{'path':_0x387d02}),![];try{ensureDir(_0x1720b8);const _0x19a95e=await getRulesContent();return writeFileSync(_0x387d02,_0x19a95e,_0x45951d(0x168)),logger['info'](_0x45951d(0x15f),'创建\x20Cursor\x20Rules\x20文件',{'to':_0x387d02}),!![];}catch(_0x221b92){return logger[_0x45951d(0x194)]('mcp-install',_0x45951d(0x171),{'error':_0x221b92 instanceof Error?_0x221b92['message']:String(_0x221b92)}),![];}}export async function copyAgentsMd(_0x1531de){const _0x3f200d=a59_0x578f52,_0xe06737=join(_0x1531de,_0x3f200d(0x17a));if(existsSync(_0xe06737))return logger[_0x3f200d(0x163)]('mcp-install','agents.md\x20文件已存在,跳过',{'path':_0xe06737}),![];try{const _0x1bc255=await getRulesContent();return writeFileSync(_0xe06737,_0x1bc255,_0x3f200d(0x168)),logger[_0x3f200d(0x163)](_0x3f200d(0x15f),_0x3f200d(0x16a),{'to':_0xe06737}),!![];}catch(_0x3d3417){return logger[_0x3f200d(0x194)](_0x3f200d(0x15f),_0x3f200d(0x181),{'error':_0x3d3417 instanceof Error?_0x3d3417[_0x3f200d(0x179)]:String(_0x3d3417)}),![];}}export async function configureCursorMcp(_0x26b700){const _0x27673e=a59_0x578f52;try{const {appcode:_0x20a707,env:_0x54e37f}=getAppConfig(),_0xf43c69=join(_0x26b700,_0x27673e(0x185)),_0x3a4f27=join(_0xf43c69,_0x27673e(0x180));ensureDir(_0xf43c69);const _0x5bab4d=buildMcpServerConfig(_0x20a707,_0x54e37f);let _0x3deea6;if(existsSync(_0x3a4f27)){const _0x2c31d4=readFileSync(_0x3a4f27,_0x27673e(0x169));_0x3deea6=JSON['parse'](_0x2c31d4),!_0x3deea6['mcpServers']&&(_0x3deea6[_0x27673e(0x17e)]={}),logger['info'](_0x27673e(0x165),'更新现有\x20mcp.json\x20配置',{'path':_0x3a4f27,'appcode':_0x20a707,'env':_0x54e37f});}else _0x3deea6={'mcpServers':{}},logger[_0x27673e(0x163)](_0x27673e(0x165),'创建新的\x20mcp.json\x20配置',{'path':_0x3a4f27,'appcode':_0x20a707,'env':_0x54e37f});_0x3deea6[_0x27673e(0x17e)][MCP_SERVER_NAME]=_0x5bab4d,writeFileSync(_0x3a4f27,JSON['stringify'](_0x3deea6,null,0x2),{'encoding':_0x27673e(0x169)});const _0x17635f=await copyCursorRules(_0x26b700),_0x3ecbb4=[_0x27673e(0x197),'AppCode:\x20'+_0x20a707];return _0x54e37f!==_0x27673e(0x186)&&_0x3ecbb4['push'](_0x27673e(0x18a)+_0x54e37f),_0x3ecbb4['push'](_0x27673e(0x199)),_0x17635f&&_0x3ecbb4[_0x27673e(0x166)](_0x27673e(0x17f)),logger['info'](_0x27673e(0x165),_0x27673e(0x196),{'appcode':_0x20a707,'env':_0x54e37f,'configPath':_0x3a4f27}),{'success':!![],'message':_0x3ecbb4[_0x27673e(0x192)](_0x27673e(0x174))};}catch(_0x24dd7f){return logger[_0x27673e(0x194)](_0x27673e(0x165),_0x27673e(0x16b),{'error':_0x24dd7f instanceof Error?_0x24dd7f[_0x27673e(0x179)]:String(_0x24dd7f)}),{'success':![],'message':_0x24dd7f instanceof Error?_0x24dd7f['message']:String(_0x24dd7f)};}}export function configureClaudeMcp(_0x2491c8){const _0x35ab59=a59_0x578f52;try{const {appcode:_0x5558fc,env:_0x515b6b}=getAppConfig();copyAgentsMd(_0x2491c8);const _0x51e432=buildClaudeMcpCommand(_0x5558fc,_0x515b6b),_0xbd0b16=[_0x35ab59(0x195),''+_0x51e432,_0x35ab59(0x164),_0x35ab59(0x189)+_0x5558fc];return _0x515b6b!==_0x35ab59(0x186)&&_0xbd0b16['push']('环境:\x20'+_0x515b6b),_0xbd0b16[_0x35ab59(0x166)]('重启\x20Claude\x20Code\x20后生效'),logger[_0x35ab59(0x163)](_0x35ab59(0x161),_0x35ab59(0x18f),{'appcode':_0x5558fc,'env':_0x515b6b,'command':_0x51e432}),{'success':!![],'message':_0xbd0b16[_0x35ab59(0x192)]('\x0a\x20\x20'),'needsManualAction':!![]};}catch(_0x162889){return logger[_0x35ab59(0x194)](_0x35ab59(0x161),_0x35ab59(0x17c),{'error':_0x162889 instanceof Error?_0x162889[_0x35ab59(0x179)]:String(_0x162889)}),{'success':![],'message':_0x162889 instanceof Error?_0x162889[_0x35ab59(0x179)]:String(_0x162889)};}}export function showOtherMcpGuide(_0x4cc245){const _0x761e3f=a59_0x578f52;try{const {appcode:_0x4b0217,env:_0x16738a}=getAppConfig(),_0x201dbe=buildMcpServerConfig(_0x4b0217,_0x16738a),_0x21b2d6=[_0x761e3f(0x160)+_0x4b0217+'\x22'];_0x16738a!=='online'&&_0x21b2d6['push'](_0x761e3f(0x182)+_0x16738a+'\x22');const _0x2d85f4=[_0x761e3f(0x190)+_0x4b0217+',\x20env='+_0x16738a,'{',_0x761e3f(0x188),_0x761e3f(0x184),_0x761e3f(0x162),_0x761e3f(0x16c),_0x761e3f(0x18e),..._0x21b2d6[_0x761e3f(0x18c)](_0x234a32=>_0x761e3f(0x176)+_0x234a32+','),_0x761e3f(0x198),_0x761e3f(0x17d),'\x20\x20}','}','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide'];return logger[_0x761e3f(0x163)](_0x761e3f(0x15f),'其他\x20IDE\x20配置指引已显示',{'appcode':_0x4b0217,'env':_0x16738a}),{'success':!![],'message':_0x2d85f4[_0x761e3f(0x192)]('\x0a'),'needsManualAction':!![]};}catch(_0x25ea84){return{'success':![],'message':_0x25ea84 instanceof Error?_0x25ea84['message']:String(_0x25ea84)};}}function ensureDir(_0x41f868){!existsSync(_0x41f868)&&mkdirSync(_0x41f868,{'recursive':!![]});}
1
+ const a60_0x49bf17=a60_0x5cf0;(function(_0x1dcfa2,_0x281946){const _0x420099=a60_0x5cf0,_0x10a178=_0x1dcfa2();while(!![]){try{const _0x3f30b6=-parseInt(_0x420099(0x135))/0x1*(-parseInt(_0x420099(0x154))/0x2)+-parseInt(_0x420099(0x131))/0x3+-parseInt(_0x420099(0x16d))/0x4+-parseInt(_0x420099(0x169))/0x5*(-parseInt(_0x420099(0x148))/0x6)+-parseInt(_0x420099(0x132))/0x7*(-parseInt(_0x420099(0x157))/0x8)+-parseInt(_0x420099(0x137))/0x9+parseInt(_0x420099(0x15b))/0xa;if(_0x3f30b6===_0x281946)break;else _0x10a178['push'](_0x10a178['shift']());}catch(_0x309bb8){_0x10a178['push'](_0x10a178['shift']());}}}(a60_0x8168,0x95c38));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_0x49bf17(0x152);export const MCP_COMMAND=a60_0x49bf17(0x14e);export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x5583da=a60_0x49bf17,_0x1fef91=readConfig(),_0x5d275c=_0x1fef91['appcode']||_0x1fef91[_0x5583da(0x16c)],_0x3e5e90=_0x1fef91[_0x5583da(0x171)]||_0x5583da(0x16a);if(!_0x5d275c)throw new Error(_0x5583da(0x15f));return{'appcode':String(_0x5d275c),'env':_0x3e5e90};}export function buildMcpEnv(_0x344534,_0x481bcc){const _0x399dc5=a60_0x49bf17,_0x3077b7={'LOVRABET_APP_CODE':_0x344534};return _0x481bcc!=='online'&&(_0x3077b7[_0x399dc5(0x15d)]=_0x481bcc),_0x3077b7;}export function buildMcpServerConfig(_0x2a3b24,_0x3ac6ab){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x2a3b24,_0x3ac6ab)};}function a60_0x8168(){const _0x3c0122=['创建新的\x20mcp.json\x20配置','npx','配置信息:','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','agents.md','lovrabet-dataset','push','47078aUThBW','mcp-claude','lovrabet_rules.mdc','6890392SmoBYW','创建\x20Cursor\x20Rules\x20文件','\x20-e\x20LOVRABET_ENV=','mcp-cursor','4604170ebxKcw','utf8','LOVRABET_ENV','复制\x20agents.md\x20文件失败','未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','claude\x20mcp\x20add\x20','agents.md\x20文件已存在,跳过','join','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide','\x22LOVRABET_APP_CODE\x22:\x20\x22','配置\x20Cursor\x20MCP\x20成功','\x20\x20\x20\x20\x20\x20}','mcpServers','已写入\x20.cursor/mcp.json','10JaqQRW','online','配置失败','app','1697964sOIcTE','\x20\x20\x22mcpServers\x22:\x20{','重启\x20Claude\x20Code\x20后生效','\x0a\x20\x20','env','map','2637576dEWRRU','7orLjSi','\x20\x20\x20\x20}','.cursor','9YQEMXg','环境:\x20','4754412NgumBG','mcp-install','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','\x20\x20}','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','utf-8','配置\x20Cursor\x20MCP\x20失败','Cursor\x20Rules\x20文件已存在,跳过','parse','stringify','error','生成配置命令','创建\x20agents.md\x20文件',',\x20env=','AppCode:\x20','mcp.json','\x22LOVRABET_ENV\x22:\x20\x22','2735448qLerbE','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','\x20\x20\x20\x20\x20\x20\x20\x20','info','message'];a60_0x8168=function(){return _0x3c0122;};return a60_0x8168();}export function buildClaudeMcpCommand(_0x33b515,_0x5a9035){const _0x470952=a60_0x49bf17,_0x44102f=_0x470952(0x160)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x470952(0x162)]('\x20')+'\x20-e\x20LOVRABET_APP_CODE='+_0x33b515,_0x1022d8=_0x5a9035!==_0x470952(0x16a)?_0x470952(0x159)+_0x5a9035:'';return''+_0x44102f+_0x1022d8;}export async function copyCursorRules(_0x1f1fc4){const _0x30b62c=a60_0x49bf17,_0x595d5f=join(_0x1f1fc4,_0x30b62c(0x134)),_0x4a163c=join(_0x595d5f,'rules'),_0x582886=join(_0x4a163c,_0x30b62c(0x156));if(existsSync(_0x582886))return logger[_0x30b62c(0x14b)](_0x30b62c(0x138),_0x30b62c(0x13e),{'path':_0x582886}),![];try{ensureDir(_0x4a163c);const _0x598639=await getRulesContent();return writeFileSync(_0x582886,_0x598639,'utf-8'),logger['info'](_0x30b62c(0x138),_0x30b62c(0x158),{'to':_0x582886}),!![];}catch(_0x52d4c7){return logger['error']('mcp-install','复制\x20Cursor\x20Rules\x20文件失败',{'error':_0x52d4c7 instanceof Error?_0x52d4c7['message']:String(_0x52d4c7)}),![];}}export async function copyAgentsMd(_0x39ab72){const _0x4a0afe=a60_0x49bf17,_0x4ff53f=join(_0x39ab72,_0x4a0afe(0x151));if(existsSync(_0x4ff53f))return logger[_0x4a0afe(0x14b)](_0x4a0afe(0x138),_0x4a0afe(0x161),{'path':_0x4ff53f}),![];try{const _0x3bd206=await getRulesContent();return writeFileSync(_0x4ff53f,_0x3bd206,_0x4a0afe(0x13c)),logger[_0x4a0afe(0x14b)](_0x4a0afe(0x138),_0x4a0afe(0x143),{'to':_0x4ff53f}),!![];}catch(_0x97e495){return logger['error'](_0x4a0afe(0x138),_0x4a0afe(0x15e),{'error':_0x97e495 instanceof Error?_0x97e495[_0x4a0afe(0x14c)]:String(_0x97e495)}),![];}}export async function configureCursorMcp(_0x188571){const _0x656063=a60_0x49bf17;try{const {appcode:_0xd22945,env:_0x3aab97}=getAppConfig(),_0x5d2421=join(_0x188571,'.cursor'),_0x3dd901=join(_0x5d2421,_0x656063(0x146));ensureDir(_0x5d2421);const _0x52978c=buildMcpServerConfig(_0xd22945,_0x3aab97);let _0x114969;if(existsSync(_0x3dd901)){const _0x2296dd=readFileSync(_0x3dd901,_0x656063(0x15c));_0x114969=JSON[_0x656063(0x13f)](_0x2296dd),!_0x114969[_0x656063(0x167)]&&(_0x114969[_0x656063(0x167)]={}),logger[_0x656063(0x14b)](_0x656063(0x15a),'更新现有\x20mcp.json\x20配置',{'path':_0x3dd901,'appcode':_0xd22945,'env':_0x3aab97});}else _0x114969={'mcpServers':{}},logger[_0x656063(0x14b)]('mcp-cursor',_0x656063(0x14d),{'path':_0x3dd901,'appcode':_0xd22945,'env':_0x3aab97});_0x114969['mcpServers'][MCP_SERVER_NAME]=_0x52978c,writeFileSync(_0x3dd901,JSON[_0x656063(0x140)](_0x114969,null,0x2),{'encoding':'utf8'});const _0x4edf27=await copyCursorRules(_0x188571),_0x565b5c=[_0x656063(0x168),_0x656063(0x145)+_0xd22945];return _0x3aab97!==_0x656063(0x16a)&&_0x565b5c[_0x656063(0x153)](_0x656063(0x136)+_0x3aab97),_0x565b5c[_0x656063(0x153)]('重启\x20Cursor\x20后生效'),_0x4edf27&&_0x565b5c['push']('已创建\x20Cursor\x20Rules\x20文件'),logger['info'](_0x656063(0x15a),_0x656063(0x165),{'appcode':_0xd22945,'env':_0x3aab97,'configPath':_0x3dd901}),{'success':!![],'message':_0x565b5c['join'](_0x656063(0x170))};}catch(_0x3e0eab){return logger[_0x656063(0x141)](_0x656063(0x15a),_0x656063(0x13d),{'error':_0x3e0eab instanceof Error?_0x3e0eab['message']:String(_0x3e0eab)}),{'success':![],'message':_0x3e0eab instanceof Error?_0x3e0eab[_0x656063(0x14c)]:String(_0x3e0eab)};}}export function configureClaudeMcp(_0x22732a){const _0x7da9c6=a60_0x49bf17;try{const {appcode:_0x28521d,env:_0x129e20}=getAppConfig();copyAgentsMd(_0x22732a);const _0x16f3f9=buildClaudeMcpCommand(_0x28521d,_0x129e20),_0x5344ac=['请执行以下命令配置\x20Claude\x20Code\x20MCP:',''+_0x16f3f9,_0x7da9c6(0x14f),'AppCode:\x20'+_0x28521d];return _0x129e20!==_0x7da9c6(0x16a)&&_0x5344ac['push'](_0x7da9c6(0x136)+_0x129e20),_0x5344ac[_0x7da9c6(0x153)](_0x7da9c6(0x16f)),logger[_0x7da9c6(0x14b)]('mcp-claude',_0x7da9c6(0x142),{'appcode':_0x28521d,'env':_0x129e20,'command':_0x16f3f9}),{'success':!![],'message':_0x5344ac[_0x7da9c6(0x162)](_0x7da9c6(0x170)),'needsManualAction':!![]};}catch(_0x5b7749){return logger['error'](_0x7da9c6(0x155),_0x7da9c6(0x16b),{'error':_0x5b7749 instanceof Error?_0x5b7749[_0x7da9c6(0x14c)]:String(_0x5b7749)}),{'success':![],'message':_0x5b7749 instanceof Error?_0x5b7749['message']:String(_0x5b7749)};}}function a60_0x5cf0(_0x19fc76,_0x257c22){_0x19fc76=_0x19fc76-0x130;const _0x81685c=a60_0x8168();let _0x5cf067=_0x81685c[_0x19fc76];return _0x5cf067;}export function showOtherMcpGuide(_0x200aec){const _0x4e4910=a60_0x49bf17;try{const {appcode:_0x4b56ea,env:_0x98ce0c}=getAppConfig(),_0x5d774a=buildMcpServerConfig(_0x4b56ea,_0x98ce0c),_0x37e09c=[_0x4e4910(0x164)+_0x4b56ea+'\x22'];_0x98ce0c!==_0x4e4910(0x16a)&&_0x37e09c[_0x4e4910(0x153)](_0x4e4910(0x147)+_0x98ce0c+'\x22');const _0x4f8a7a=['配置信息:\x20appcode='+_0x4b56ea+_0x4e4910(0x144)+_0x98ce0c,'{',_0x4e4910(0x16e),_0x4e4910(0x150),_0x4e4910(0x13b),_0x4e4910(0x139),_0x4e4910(0x149),..._0x37e09c[_0x4e4910(0x130)](_0x40def7=>_0x4e4910(0x14a)+_0x40def7+','),_0x4e4910(0x166),_0x4e4910(0x133),_0x4e4910(0x13a),'}',_0x4e4910(0x163)];return logger[_0x4e4910(0x14b)]('mcp-install','其他\x20IDE\x20配置指引已显示',{'appcode':_0x4b56ea,'env':_0x98ce0c}),{'success':!![],'message':_0x4f8a7a[_0x4e4910(0x162)]('\x0a'),'needsManualAction':!![]};}catch(_0x199faf){return{'success':![],'message':_0x199faf instanceof Error?_0x199faf[_0x4e4910(0x14c)]:String(_0x199faf)};}}function ensureDir(_0x544def){!existsSync(_0x544def)&&mkdirSync(_0x544def,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a60_0x33fb36=a60_0x1c4c;(function(_0x51abde,_0x341e18){const _0x1c1562=a60_0x1c4c,_0x2cb381=_0x51abde();while(!![]){try{const _0x5ee9b7=-parseInt(_0x1c1562(0x84))/0x1+parseInt(_0x1c1562(0x77))/0x2*(-parseInt(_0x1c1562(0x88))/0x3)+-parseInt(_0x1c1562(0x81))/0x4*(parseInt(_0x1c1562(0x67))/0x5)+parseInt(_0x1c1562(0x8c))/0x6*(-parseInt(_0x1c1562(0x8f))/0x7)+parseInt(_0x1c1562(0x7b))/0x8*(parseInt(_0x1c1562(0x8e))/0x9)+parseInt(_0x1c1562(0x6c))/0xa+parseInt(_0x1c1562(0x69))/0xb;if(_0x5ee9b7===_0x341e18)break;else _0x2cb381['push'](_0x2cb381['shift']());}catch(_0x4a94e5){_0x2cb381['push'](_0x2cb381['shift']());}}}(a60_0x2813,0xd4bfa));import{jsx as a60_0x41d6a5,jsxs as a60_0x303fa4,Fragment as a60_0x128fe5}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';function a60_0x1c4c(_0x193459,_0x137a0a){_0x193459=_0x193459-0x64;const _0x2813c3=a60_0x2813();let _0x1c4c93=_0x2813c3[_0x193459];return _0x1c4c93;}const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a60_0x33fb36(0x78)](_0x5bd5d8=>({'key':_0x5bd5d8,'name':IDE_CONFIGS[_0x5bd5d8][a60_0x33fb36(0x7a)],'description':IDE_CONFIGS[_0x5bd5d8]['description']}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x5b2a68=a60_0x33fb36,{exit:_0x5908f7}=useApp(),[_0x561587,_0x42fffc]=useState(_0x5b2a68(0x73)),[_0x18cd32,_0x359ebe]=useState([]),[_0x51b7c4,_0x5be80c]=useState([]),[_0xaa2b24,_0xde4bf5]=useState(0x0),_0xd2ebc7=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x4f41c7=_0x5b2a68;preselectedIDEs['length']>0x0&&_0xd2ebc7[_0x4f41c7(0x6b)][_0x4f41c7(0x83)]>0x0&&_0x529d4b();},[]),useInput((_0x29ef3d,_0x2c696c)=>{const _0x34260d=_0x5b2a68;if(_0x561587==='selecting'){if(_0x29ef3d==='q'||_0x29ef3d==='Q'){_0x5908f7();return;}if(_0x2c696c[_0x34260d(0x91)]){if(_0xd2ebc7[_0x34260d(0x6b)][_0x34260d(0x83)]===0x0){_0xd2ebc7[_0x34260d(0x66)](_0x34260d(0x87));return;}_0x529d4b();return;}_0xd2ebc7[_0x34260d(0x7d)](_0x29ef3d,_0x2c696c);}_0x561587===_0x34260d(0x95)&&_0x5908f7();});async function _0x529d4b(){const _0x3cf341=_0x5b2a68,_0xcfddb2=_0xd2ebc7[_0x3cf341(0x70)]();_0x5be80c(_0xcfddb2),_0x359ebe([{'label':_0x3cf341(0x6e),'value':_0xd2ebc7[_0x3cf341(0x6b)]['size']+'\x20个'}]),_0x42fffc('installing'),await _0x155012(_0xcfddb2);}async function _0x155012(_0x5bbea0){const _0xf2c6b2=_0x5b2a68,_0x102bc8=process[_0xf2c6b2(0x6f)](),_0x4ccf8c=resolve(__dirname,_0xf2c6b2(0x6d));logger['setLogPath'](_0x102bc8),console[_0xf2c6b2(0x7e)](_0xf2c6b2(0x85));let _0x4209a3;try{_0x4209a3=await fetchGuidesFromCDN(),console[_0xf2c6b2(0x7e)](_0xf2c6b2(0x64)+Object['keys'](_0x4209a3[_0xf2c6b2(0x79)])[_0xf2c6b2(0x72)]+_0xf2c6b2(0x74));}catch(_0x472421){console[_0xf2c6b2(0x92)](_0xf2c6b2(0x76)+(_0x472421 instanceof Error?_0x472421['message']:String(_0x472421)));}let _0x3127ea=0x0;for(const _0x134f37 of _0x5bbea0){try{const _0x49e39e=IDE_CONFIGS[_0x134f37],_0x153b84=await installSingleIDE(_0x134f37,_0x49e39e,_0x102bc8,_0x4ccf8c,_0x4209a3);_0x3127ea+=_0x153b84,_0xde4bf5(_0x3127ea);}catch(_0x223308){console['error'](_0xf2c6b2(0x82)+_0x134f37+_0xf2c6b2(0x98)+(_0x223308 instanceof Error?_0x223308[_0xf2c6b2(0x65)]:String(_0x223308)));}}_0x4209a3&&writeGuidesToProject(_0x4209a3,_0x102bc8);const _0x2582a9={'version':_0xf2c6b2(0x71),'installedAt':new Date()[_0xf2c6b2(0x94)](),'platforms':_0x5bbea0},_0x49aadd=join(_0x102bc8,_0xf2c6b2(0x90)),_0x46b559=join(_0x102bc8,_0xf2c6b2(0x96));await copyDir(_0x46b559,_0x46b559),writeFileSync(_0x49aadd,JSON['stringify'](_0x2582a9,null,0x2),_0xf2c6b2(0x86)),logger[_0xf2c6b2(0x93)]('skill-install','安装成功',{'projectRoot':_0x102bc8,'ides':_0x5bbea0,'foldersCount':_0x3127ea}),_0x42fffc('done'),setTimeout(()=>{_0x5908f7();},0x3e8);}return a60_0x303fa4(Box,{'flexDirection':_0x5b2a68(0x97),'marginTop':0x1,'children':[_0x561587==='selecting'&&a60_0x41d6a5(IDESelector,{'ideList':UI_IDE_LIST,'title':'安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','selection':_0xd2ebc7}),_0x561587==='installing'&&a60_0x41d6a5(InstallingStep,{'completedSteps':_0x18cd32,'installingIDEs':_0x51b7c4,'installedCount':_0xaa2b24}),_0x561587===_0x5b2a68(0x95)&&a60_0x41d6a5(DoneStep,{'installedCount':_0xaa2b24})]});}function a60_0x2813(){const _0x4f1c8b=['cwd','getSelectedIDEs','2.0.0','length','selecting','\x20个开发者指南','正在安装技能包...','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','200DsWKwa','map','guides','name','712PRHlmR','✓\x20技能包安装成功!共安装\x20','handleKeyDown','log','label','cyan','12gyYigs','\x20\x20✗\x20安装\x20','size','728993JryhFJ','正在从\x20CDN\x20拉取开发者指南...','utf-8','请至少选择一个\x20IDE','11604rZQfDd','\x20个目录','value','gray','6582LlMuPQ','已安装\x20','125523OcnAfU','7112HiVRAI','.lovrabet/skill-manifest.json','return','warn','info','toISOString','done','.lovrabet','column','\x20失败:\x20','green','✓\x20拉取\x20','message','setErrorMsg','1756145lsciSh','\x20\x20✓\x20','17298347ODtsli','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','selectedIndexes','13415900MoqHQB','../../cdn-source/skills','已选择\x20IDE'];a60_0x2813=function(){return _0x4f1c8b;};return a60_0x2813();}function InstallingStep({completedSteps:_0x45ae81,installingIDEs:_0x1f7b3f,installedCount:_0x17973f}){const _0x240277=a60_0x33fb36;return a60_0x303fa4(a60_0x128fe5,{'children':[_0x45ae81['map']((_0x1b8d9a,_0x1a64bd)=>a60_0x303fa4(Box,{'children':[a60_0x303fa4(Text,{'color':'green','children':['√\x20',_0x1b8d9a[_0x240277(0x7f)],':\x20']}),a60_0x41d6a5(Text,{'color':_0x240277(0x80),'children':_0x1b8d9a[_0x240277(0x8a)]})]},_0x1a64bd)),a60_0x41d6a5(Box,{'marginTop':0x1,'children':a60_0x41d6a5(Text,{'children':_0x240277(0x75)})}),_0x1f7b3f[_0x240277(0x78)](_0x5a0a90=>a60_0x303fa4(Box,{'children':[a60_0x41d6a5(Text,{'color':_0x240277(0x99),'children':_0x240277(0x68)}),a60_0x41d6a5(Text,{'children':IDE_CONFIGS[_0x5a0a90]?.[_0x240277(0x7a)]||_0x5a0a90})]},_0x5a0a90)),a60_0x41d6a5(Box,{'marginTop':0x1,'children':a60_0x303fa4(Text,{'color':_0x240277(0x8b),'children':[_0x240277(0x8d),_0x17973f,_0x240277(0x89)]})})]});}function DoneStep({installedCount:_0x1fd8fb}){const _0x420f74=a60_0x33fb36;return a60_0x303fa4(a60_0x128fe5,{'children':[a60_0x41d6a5(Box,{'children':a60_0x303fa4(Text,{'color':'green','children':[_0x420f74(0x7c),_0x1fd8fb,_0x420f74(0x89)]})}),a60_0x41d6a5(Box,{'marginTop':0x1,'children':a60_0x41d6a5(Text,{'color':'gray','children':_0x420f74(0x6a)})}),a60_0x41d6a5(Box,{'marginTop':0x1,'children':a60_0x41d6a5(Text,{'color':_0x420f74(0x8b),'children':'按任意键退出...'})})]});}async function copyDirIfNeeded(_0x48a083,_0x11ca50){try{return await copyDir(_0x48a083,_0x11ca50),!![];}catch{return![];}}
1
+ const a61_0x227554=a61_0x3f8a;(function(_0x2fc48e,_0xd3a0c7){const _0x615f3b=a61_0x3f8a,_0x4070b0=_0x2fc48e();while(!![]){try{const _0x4ff987=-parseInt(_0x615f3b(0x14d))/0x1*(-parseInt(_0x615f3b(0x172))/0x2)+-parseInt(_0x615f3b(0x171))/0x3*(parseInt(_0x615f3b(0x165))/0x4)+parseInt(_0x615f3b(0x14b))/0x5+-parseInt(_0x615f3b(0x177))/0x6*(parseInt(_0x615f3b(0x16e))/0x7)+-parseInt(_0x615f3b(0x16c))/0x8*(-parseInt(_0x615f3b(0x15c))/0x9)+parseInt(_0x615f3b(0x16b))/0xa+-parseInt(_0x615f3b(0x150))/0xb;if(_0x4ff987===_0xd3a0c7)break;else _0x4070b0['push'](_0x4070b0['shift']());}catch(_0x366598){_0x4070b0['push'](_0x4070b0['shift']());}}}(a61_0x19c4,0x50a4d));function a61_0x19c4(){const _0x53c387=['warn','setErrorMsg','column','utf-8','info','1458370gpnaUV','8048npeopr','\x20\x20✗\x20安装\x20','14623vjrNeg','../../cdn-source/skills','.lovrabet/skill-manifest.json','32187TaQJtY','134YqgDyV','cwd','.lovrabet','cyan','...','66cazIRv','\x20失败:\x20','\x20个目录','length','stringify','message','2827220lDjQGA','green','5447BhCEXm','keys','selecting','6842297tqMQqq','guides','2.0.0','done','map','按任意键退出...','name','size','description','log','(含扩展)','gray','729UcuKcu','return','✓\x20拉取\x20','安装成功','selectedIndexes','handleKeyDown','value','installing','toISOString','68usBVpw'];a61_0x19c4=function(){return _0x53c387;};return a61_0x19c4();}import{jsx as a61_0x56413c,jsxs as a61_0x344450,Fragment as a61_0x145fb8}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';function a61_0x3f8a(_0x1baeab,_0x2b5e3f){_0x1baeab=_0x1baeab-0x148;const _0x19c47f=a61_0x19c4();let _0x3f8a1a=_0x19c47f[_0x1baeab];return _0x3f8a1a;}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[a61_0x227554(0x154)](_0x870a82=>({'key':_0x870a82,'name':IDE_CONFIGS[_0x870a82][a61_0x227554(0x156)],'description':IDE_CONFIGS[_0x870a82][a61_0x227554(0x158)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x552f52}){const _0x2fa42e=a61_0x227554,{exit:_0x4ffb7e}=useApp(),[_0x2bfd06,_0x3ef163]=useState(_0x2fa42e(0x14f)),[_0x44d6b6,_0xbbecd]=useState([]),[_0x409d11,_0x3638aa]=useState([]),[_0x552863,_0x5bc6fa]=useState(0x0),_0x648a80=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x28243b=_0x2fa42e;preselectedIDEs[_0x28243b(0x148)]>0x0&&_0x648a80[_0x28243b(0x160)][_0x28243b(0x157)]>0x0&&_0x33587d();},[]),useInput((_0x339e47,_0x1aa020)=>{const _0x46eb86=_0x2fa42e;if(_0x2bfd06===_0x46eb86(0x14f)){if(_0x339e47==='q'||_0x339e47==='Q'){_0x4ffb7e();return;}if(_0x1aa020[_0x46eb86(0x15d)]){if(_0x648a80[_0x46eb86(0x160)]['size']===0x0){_0x648a80[_0x46eb86(0x167)]('请至少选择一个\x20IDE');return;}_0x33587d();return;}_0x648a80[_0x46eb86(0x161)](_0x339e47,_0x1aa020);}_0x2bfd06===_0x46eb86(0x153)&&_0x4ffb7e();});async function _0x33587d(){const _0x948b54=_0x2fa42e,_0x4c0e95=_0x648a80['getSelectedIDEs']();_0x3638aa(_0x4c0e95),_0xbbecd([{'label':'已选择\x20IDE','value':_0x648a80[_0x948b54(0x160)]['size']+'\x20个'}]),_0x3ef163(_0x948b54(0x163)),await _0x25d209(_0x4c0e95);}async function _0x25d209(_0x345406){const _0x54ce38=_0x2fa42e,_0x2b8fa5=process[_0x54ce38(0x173)](),_0xce3a9c=resolve(__dirname,_0x54ce38(0x16f));logger['setLogPath'](_0x2b8fa5);const _0x1e9e73=_0x552f52&&_0x552f52['length']>0x0;console[_0x54ce38(0x159)]('正在从\x20CDN\x20拉取开发者指南'+(_0x1e9e73?_0x54ce38(0x15a):'')+_0x54ce38(0x176));let _0x340c31;try{_0x340c31=await fetchGuidesFromCDN(_0x1e9e73),console[_0x54ce38(0x159)](_0x54ce38(0x15e)+Object[_0x54ce38(0x14e)](_0x340c31[_0x54ce38(0x151)])[_0x54ce38(0x148)]+'\x20个开发者指南');}catch(_0x18bce0){console[_0x54ce38(0x166)]('\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20'+(_0x18bce0 instanceof Error?_0x18bce0[_0x54ce38(0x14a)]:String(_0x18bce0)));}let _0x5f2eb9=0x0;for(const _0x5aa8f2 of _0x345406){try{const _0x59244f=IDE_CONFIGS[_0x5aa8f2],_0x35eec7=await installSingleIDE(_0x5aa8f2,_0x59244f,_0x2b8fa5,_0xce3a9c,_0x340c31,_0x552f52);_0x5f2eb9+=_0x35eec7,_0x5bc6fa(_0x5f2eb9);}catch(_0x5ef879){console['error'](_0x54ce38(0x16d)+_0x5aa8f2+_0x54ce38(0x178)+(_0x5ef879 instanceof Error?_0x5ef879['message']:String(_0x5ef879)));}}_0x340c31&&writeGuidesToProject(_0x340c31,_0x2b8fa5,'.lovrabet/skill/.shared/guides',_0x552f52);const _0x488085={'version':_0x54ce38(0x152),'installedAt':new Date()[_0x54ce38(0x164)](),'platforms':_0x345406},_0x680f53=join(_0x2b8fa5,_0x54ce38(0x170)),_0x435232=join(_0x2b8fa5,_0x54ce38(0x174));await copyDir(_0x435232,_0x435232),writeFileSync(_0x680f53,JSON[_0x54ce38(0x149)](_0x488085,null,0x2),_0x54ce38(0x169)),logger[_0x54ce38(0x16a)]('skill-install',_0x54ce38(0x15f),{'projectRoot':_0x2b8fa5,'ides':_0x345406,'foldersCount':_0x5f2eb9}),_0x3ef163('done'),setTimeout(()=>{_0x4ffb7e();},0x3e8);}return a61_0x344450(Box,{'flexDirection':_0x2fa42e(0x168),'marginTop':0x1,'children':[_0x2bfd06===_0x2fa42e(0x14f)&&a61_0x56413c(IDESelector,{'ideList':UI_IDE_LIST,'title':'安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','selection':_0x648a80}),_0x2bfd06==='installing'&&a61_0x56413c(InstallingStep,{'completedSteps':_0x44d6b6,'installingIDEs':_0x409d11,'installedCount':_0x552863}),_0x2bfd06==='done'&&a61_0x56413c(DoneStep,{'installedCount':_0x552863})]});}function InstallingStep({completedSteps:_0x1c0087,installingIDEs:_0x518708,installedCount:_0x4f1300}){const _0x301290=a61_0x227554;return a61_0x344450(a61_0x145fb8,{'children':[_0x1c0087['map']((_0x22f7d5,_0x4963f4)=>a61_0x344450(Box,{'children':[a61_0x344450(Text,{'color':_0x301290(0x14c),'children':['√\x20',_0x22f7d5['label'],':\x20']}),a61_0x56413c(Text,{'color':_0x301290(0x175),'children':_0x22f7d5[_0x301290(0x162)]})]},_0x4963f4)),a61_0x56413c(Box,{'marginTop':0x1,'children':a61_0x56413c(Text,{'children':'正在安装技能包...'})}),_0x518708['map'](_0xceff9c=>a61_0x344450(Box,{'children':[a61_0x56413c(Text,{'color':'green','children':'\x20\x20✓\x20'}),a61_0x56413c(Text,{'children':IDE_CONFIGS[_0xceff9c]?.[_0x301290(0x156)]||_0xceff9c})]},_0xceff9c)),a61_0x56413c(Box,{'marginTop':0x1,'children':a61_0x344450(Text,{'color':_0x301290(0x15b),'children':['已安装\x20',_0x4f1300,_0x301290(0x179)]})})]});}function DoneStep({installedCount:_0x1c2684}){const _0x240a56=a61_0x227554;return a61_0x344450(a61_0x145fb8,{'children':[a61_0x56413c(Box,{'children':a61_0x344450(Text,{'color':_0x240a56(0x14c),'children':['✓\x20技能包安装成功!共安装\x20',_0x1c2684,_0x240a56(0x179)]})}),a61_0x56413c(Box,{'marginTop':0x1,'children':a61_0x56413c(Text,{'color':_0x240a56(0x15b),'children':'开发者指南位置:\x20.lovrabet/skill/.shared/guides/'})}),a61_0x56413c(Box,{'marginTop':0x1,'children':a61_0x56413c(Text,{'color':_0x240a56(0x15b),'children':_0x240a56(0x155)})})]});}async function copyDirIfNeeded(_0x25e095,_0x5b2f3b){try{return await copyDir(_0x25e095,_0x5b2f3b),!![];}catch{return![];}}