@lovrabet/cli 1.3.2 → 1.3.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -0
  52. package/lib/i18n/hooks.js +1 -0
  53. package/lib/i18n/index.js +1 -0
  54. package/lib/i18n/locales/en-US.js +1 -0
  55. package/lib/i18n/locales/zh-CN.js +1 -0
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +6 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- const a55_0x33242a=a55_0x35c7;(function(_0x51d884,_0x5b2b88){const _0x28ce64=a55_0x35c7,_0x4c1fc9=_0x51d884();while(!![]){try{const _0x254f2d=parseInt(_0x28ce64(0xf7))/0x1+parseInt(_0x28ce64(0xfc))/0x2*(-parseInt(_0x28ce64(0xfe))/0x3)+-parseInt(_0x28ce64(0x10f))/0x4*(parseInt(_0x28ce64(0x114))/0x5)+-parseInt(_0x28ce64(0xe0))/0x6*(parseInt(_0x28ce64(0xed))/0x7)+parseInt(_0x28ce64(0x104))/0x8+parseInt(_0x28ce64(0x10b))/0x9*(parseInt(_0x28ce64(0xf0))/0xa)+parseInt(_0x28ce64(0xe2))/0xb*(parseInt(_0x28ce64(0xdf))/0xc);if(_0x254f2d===_0x5b2b88)break;else _0x4c1fc9['push'](_0x4c1fc9['shift']());}catch(_0x596361){_0x4c1fc9['push'](_0x4c1fc9['shift']());}}}(a55_0x283f,0x5bc98));function a55_0x283f(){const _0x35e8be=['white','✓\x20MCP\x20配置完成!','message','cyan','425584lUlQOy','label','done','ide','name','success','green','36648pgJyut','description','cwd','red','1022668gVBTki','error','setErrorMsg','other','manual','5MKyYgk','gray','push','\x20\x20⚠️','map','82956MsVTWy','187356OzJigj','status','1496jyLpuA','selectedIndexes','不支持的\x20IDE:\x20','value','yellow','every','column','请至少选择一个\x20IDE','configuring','length','\x20\x20✓','105ZMTVlw','cursor','selecting','30LMadoo','⚠️\x20部分配置需要手动完成','已选择\x20IDE','return','claude','其他\x20IDE','\x20\x20✗','190023ZKsfTo','key','handleKeyDown','配置\x20Lovrabet\x20MCP\x20服务器','from','191176xfnlJG','some','3nDMmiM','find'];a55_0x283f=function(){return _0x35e8be;};return a55_0x283f();}function a55_0x35c7(_0x40d985,_0x5d3af2){_0x40d985=_0x40d985-0xdb;const _0x283f8a=a55_0x283f();let _0x35c730=_0x283f8a[_0x40d985];return _0x35c730;}import{jsx as a55_0x3f71b2,jsxs as a55_0x34c836,Fragment as a55_0x1d077f}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array[a55_0x33242a(0xfb)](MCP_IDES)[a55_0x33242a(0xde)](_0x18e845=>({'key':_0x18e845,'name':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x108)],'description':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x10c)]})),{'key':a55_0x33242a(0x112),'name':a55_0x33242a(0xf5),'description':'其他\x20IDE\x20配置指引'}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x58e348=a55_0x33242a,{exit:_0x4653d6}=useApp(),[_0x40a10a,_0x983f8]=useState(_0x58e348(0xef)),[_0x4a510a,_0x297670]=useState([]),[_0x1c146f,_0x330c11]=useState([]),_0x53eabc=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x585855=_0x58e348;preselectedIDEs[_0x585855(0xeb)]>0x0&&_0x53eabc[_0x585855(0xe3)]['size']>0x0&&_0x2876a5();},[]),useInput((_0x44e870,_0x1d8182)=>{const _0x226570=_0x58e348;if(_0x40a10a===_0x226570(0xef)){if(_0x44e870==='q'||_0x44e870==='Q'){_0x4653d6();return;}if(_0x1d8182[_0x226570(0xf3)]){if(_0x53eabc[_0x226570(0xe3)]['size']===0x0){_0x53eabc[_0x226570(0x111)](_0x226570(0xe9));return;}_0x2876a5();return;}_0x53eabc[_0x226570(0xf9)](_0x44e870,_0x1d8182);}_0x40a10a===_0x226570(0x106)&&_0x4653d6();});async function _0x2876a5(){const _0x5e9b9c=_0x58e348,_0x58fdca=_0x53eabc['getSelectedIDEs']();_0x297670([{'label':_0x5e9b9c(0xf2),'value':_0x53eabc[_0x5e9b9c(0xe3)]['size']+'\x20个'}]),_0x983f8(_0x5e9b9c(0xea));const _0xb2dd38=[];for(const _0x1dba7e of _0x58fdca){try{const _0x31b473=await configureMcp(_0x1dba7e);_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST[_0x5e9b9c(0xff)](_0x559f3b=>_0x559f3b[_0x5e9b9c(0xf8)]===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x31b473['needsManualAction']?'manual':_0x31b473[_0x5e9b9c(0x109)]?_0x5e9b9c(0x109):'error','message':_0x31b473[_0x5e9b9c(0x102)]});}catch(_0xd9a734){_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST['find'](_0x46dd41=>_0x46dd41['key']===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x5e9b9c(0x110),'message':_0xd9a734 instanceof Error?_0xd9a734[_0x5e9b9c(0x102)]:String(_0xd9a734)});}}_0x330c11(_0xb2dd38),_0x983f8('done'),setTimeout(()=>{_0x4653d6();},0x1388);}return a55_0x34c836(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x40a10a==='selecting'&&a55_0x3f71b2(IDESelector,{'ideList':IDE_LIST,'title':_0x58e348(0xfa),'selection':_0x53eabc}),_0x40a10a===_0x58e348(0xea)&&a55_0x34c836(a55_0x1d077f,{'children':[_0x4a510a['map']((_0x447b19,_0x5a94c4)=>a55_0x34c836(Box,{'children':[a55_0x34c836(Text,{'color':'green','children':['√\x20',_0x447b19[_0x58e348(0x105)],':\x20']}),a55_0x3f71b2(Text,{'color':_0x58e348(0x103),'children':_0x447b19[_0x58e348(0xe5)]})]},_0x5a94c4)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'children':'正在配置\x20MCP\x20服务器...'})})]}),_0x40a10a===_0x58e348(0x106)&&a55_0x3f71b2(DoneStep,{'configResults':_0x1c146f})]});}function DoneStep({configResults:_0x43c5a4}){const _0xc9a5b6=a55_0x33242a,_0x5b1a06=_0x43c5a4[_0xc9a5b6(0xe7)](_0x4b9fd5=>_0x4b9fd5[_0xc9a5b6(0xe1)]==='success'),_0x1ca0c6=_0x43c5a4[_0xc9a5b6(0xfd)](_0xdb669=>_0xdb669[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)),_0x41c072=_0x43c5a4[_0xc9a5b6(0xfd)](_0xfc8d=>_0xfc8d[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x110));return a55_0x34c836(a55_0x1d077f,{'children':[a55_0x3f71b2(Box,{'children':_0x5b1a06?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10a),'children':_0xc9a5b6(0x101)}):_0x1ca0c6?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xe6),'children':_0xc9a5b6(0xf1)}):_0x41c072?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10e),'children':'✗\x20配置失败'}):a55_0x3f71b2(Text,{'color':'yellow','children':'⚠️\x20配置需要手动完成'})}),_0x43c5a4['map']((_0x532de4,_0x2d8835)=>a55_0x34c836(Box,{'flexDirection':_0xc9a5b6(0xe8),'children':[a55_0x34c836(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?'green':_0x532de4[_0xc9a5b6(0xe1)]==='manual'?'yellow':_0xc9a5b6(0x10e),'children':[_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0xec):_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)?_0xc9a5b6(0xdd):_0xc9a5b6(0xf6),'\x20',_0x532de4[_0xc9a5b6(0x107)],':']}),a55_0x3f71b2(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0x100):_0x532de4['status']===_0xc9a5b6(0x113)?'yellow':_0xc9a5b6(0x10e),'children':_0x532de4[_0xc9a5b6(0x102)]})]},_0x2d8835)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xdb),'children':'按任意键退出...'})})]});}async function configureMcp(_0x146189){const _0x5c2ea6=a55_0x33242a,_0x491575=process[_0x5c2ea6(0x10d)]();switch(_0x146189){case _0x5c2ea6(0xee):return configureCursorMcp(_0x491575);case _0x5c2ea6(0xf4):return configureClaudeMcp(_0x491575);case _0x5c2ea6(0x112):return showOtherMcpGuide(_0x491575);default:throw new Error(_0x5c2ea6(0xe4)+_0x146189);}}
1
+ (function(_0x45452b,_0x1afb90){const _0xdd148=a58_0x3b6a,_0x331321=_0x45452b();while(!![]){try{const _0x3e2345=parseInt(_0xdd148(0x14e))/0x1*(parseInt(_0xdd148(0x135))/0x2)+-parseInt(_0xdd148(0x15c))/0x3*(-parseInt(_0xdd148(0x151))/0x4)+-parseInt(_0xdd148(0x13d))/0x5+-parseInt(_0xdd148(0x14c))/0x6+parseInt(_0xdd148(0x152))/0x7+parseInt(_0xdd148(0x13e))/0x8*(parseInt(_0xdd148(0x14a))/0x9)+parseInt(_0xdd148(0x154))/0xa*(-parseInt(_0xdd148(0x14f))/0xb);if(_0x3e2345===_0x1afb90)break;else _0x331321['push'](_0x331321['shift']());}catch(_0x55386f){_0x331321['push'](_0x331321['shift']());}}}(a58_0x5081,0x8e8a5));import{jsx as a58_0x2f18c8,jsxs as a58_0x4a5d70,Fragment as a58_0x374f57}from'react/jsx-runtime';function a58_0x3b6a(_0x115c83,_0x48d4dc){_0x115c83=_0x115c83-0x131;const _0x508179=a58_0x5081();let _0x3b6a08=_0x508179[_0x115c83];return _0x3b6a08;}import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';import a58_0x4331e8 from'../i18n/index.js';export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x1122bc=a58_0x3b6a,{t:_0x2e11b2}=useI18n(),{exit:_0x3a01f1}=useApp(),[_0x27dec0,_0x2c23db]=useState(_0x1122bc(0x162)),[_0xa732e3,_0x385b2d]=useState([]),[_0x50df5e,_0x17337a]=useState([]),_0x4c08f4=useMemo(()=>[...Array['from'](MCP_IDES)[_0x1122bc(0x13b)](_0x112edd=>({'key':_0x112edd,'name':IDE_CONFIGS[_0x112edd][_0x1122bc(0x148)],'description':IDE_CONFIGS[_0x112edd][_0x1122bc(0x145)]})),{'key':_0x1122bc(0x141),'name':_0x2e11b2(_0x1122bc(0x131)),'description':_0x2e11b2(_0x1122bc(0x143))}],[_0x2e11b2]),_0x3a00ec=useIDESelection({'ideList':_0x4c08f4,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x24bd5b=_0x1122bc;preselectedIDEs[_0x24bd5b(0x13c)]>0x0&&_0x3a00ec['selectedIndexes']['size']>0x0&&_0xf41e24();},[]),useInput((_0x1d3b70,_0x21e3fc)=>{const _0x553655=_0x1122bc;if(_0x27dec0===_0x553655(0x162)){if(_0x1d3b70==='q'||_0x1d3b70==='Q'){_0x3a01f1();return;}if(_0x21e3fc[_0x553655(0x133)]){if(_0x3a00ec[_0x553655(0x165)][_0x553655(0x153)]===0x0){_0x3a00ec['setErrorMsg'](_0x2e11b2(_0x553655(0x13a)));return;}_0xf41e24();return;}_0x3a00ec[_0x553655(0x134)](_0x1d3b70,_0x21e3fc);}_0x27dec0===_0x553655(0x15d)&&_0x3a01f1();});async function _0xf41e24(){const _0x32416b=_0x1122bc,_0x1f7731=_0x3a00ec['getSelectedIDEs']();_0x385b2d([{'label':_0x2e11b2(_0x32416b(0x13f)),'value':_0x2e11b2(_0x32416b(0x157),{'count':_0x3a00ec[_0x32416b(0x165)]['size']})}]),_0x2c23db(_0x32416b(0x159));const _0x14a640=[];for(const _0x29e2bf of _0x1f7731){try{const _0x354158=await configureMcp(_0x29e2bf);_0x14a640[_0x32416b(0x15f)]({'ide':_0x4c08f4[_0x32416b(0x14d)](_0x3465c2=>_0x3465c2['key']===_0x29e2bf)?.[_0x32416b(0x148)]||_0x29e2bf,'status':_0x354158[_0x32416b(0x139)]?_0x32416b(0x167):_0x354158[_0x32416b(0x138)]?_0x32416b(0x138):'error','message':_0x354158['message']});}catch(_0x10df87){_0x14a640[_0x32416b(0x15f)]({'ide':_0x4c08f4[_0x32416b(0x14d)](_0x439153=>_0x439153[_0x32416b(0x163)]===_0x29e2bf)?.['name']||_0x29e2bf,'status':'error','message':_0x10df87 instanceof Error?_0x10df87[_0x32416b(0x158)]:String(_0x10df87)});}}_0x17337a(_0x14a640),_0x2c23db(_0x32416b(0x15d)),setTimeout(()=>{_0x3a01f1();},0x1388);}return a58_0x4a5d70(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x27dec0===_0x1122bc(0x162)&&a58_0x2f18c8(IDESelector,{'ideList':_0x4c08f4,'title':_0x2e11b2(_0x1122bc(0x160)),'selection':_0x3a00ec}),_0x27dec0===_0x1122bc(0x159)&&a58_0x4a5d70(a58_0x374f57,{'children':[_0xa732e3[_0x1122bc(0x13b)]((_0x4edf2d,_0x57d9a3)=>a58_0x4a5d70(Box,{'children':[a58_0x4a5d70(Text,{'color':_0x1122bc(0x147),'children':['√\x20',_0x4edf2d[_0x1122bc(0x144)],':\x20']}),a58_0x2f18c8(Text,{'color':_0x1122bc(0x164),'children':_0x4edf2d[_0x1122bc(0x156)]})]},_0x57d9a3)),a58_0x2f18c8(Box,{'marginTop':0x1,'children':a58_0x2f18c8(Text,{'children':_0x2e11b2('mcp.ui.configuring')})})]}),_0x27dec0===_0x1122bc(0x15d)&&a58_0x2f18c8(DoneStep,{'configResults':_0x50df5e})]});}function DoneStep({configResults:_0x99d5a3}){const _0x3ae246=a58_0x3b6a,{t:_0x231acc}=useI18n(),_0x2aac29=_0x99d5a3[_0x3ae246(0x15a)](_0xbb67eb=>_0xbb67eb[_0x3ae246(0x142)]===_0x3ae246(0x138)),_0x50d8a1=_0x99d5a3['some'](_0x12e70d=>_0x12e70d[_0x3ae246(0x142)]==='manual'),_0x25fe08=_0x99d5a3[_0x3ae246(0x149)](_0x5f0759=>_0x5f0759[_0x3ae246(0x142)]==='error');return a58_0x4a5d70(a58_0x374f57,{'children':[a58_0x2f18c8(Box,{'children':_0x2aac29?a58_0x2f18c8(Text,{'color':_0x3ae246(0x147),'children':_0x231acc('mcp.ui.completed')}):_0x50d8a1?a58_0x2f18c8(Text,{'color':'yellow','children':_0x231acc(_0x3ae246(0x132))}):_0x25fe08?a58_0x2f18c8(Text,{'color':'red','children':_0x231acc(_0x3ae246(0x150))}):a58_0x2f18c8(Text,{'color':_0x3ae246(0x161),'children':_0x231acc(_0x3ae246(0x155))})}),_0x99d5a3[_0x3ae246(0x13b)]((_0x7bf2e8,_0x4b376d)=>a58_0x4a5d70(Box,{'flexDirection':_0x3ae246(0x166),'children':[a58_0x4a5d70(Text,{'color':_0x7bf2e8[_0x3ae246(0x142)]===_0x3ae246(0x138)?_0x3ae246(0x147):_0x7bf2e8[_0x3ae246(0x142)]===_0x3ae246(0x167)?_0x3ae246(0x161):_0x3ae246(0x137),'children':[_0x7bf2e8[_0x3ae246(0x142)]==='success'?_0x3ae246(0x168):_0x7bf2e8[_0x3ae246(0x142)]===_0x3ae246(0x167)?'\x20\x20⚠️':_0x3ae246(0x15e),'\x20',_0x7bf2e8['ide'],':']}),a58_0x2f18c8(Text,{'color':_0x7bf2e8[_0x3ae246(0x142)]===_0x3ae246(0x138)?_0x3ae246(0x140):_0x7bf2e8['status']==='manual'?_0x3ae246(0x161):'red','children':_0x7bf2e8['message']})]},_0x4b376d)),a58_0x2f18c8(Box,{'marginTop':0x1,'children':a58_0x2f18c8(Text,{'color':_0x3ae246(0x146),'children':_0x231acc(_0x3ae246(0x136))})})]});}async function configureMcp(_0x5d567a){const _0x5c5cb7=a58_0x3b6a,_0x31aa56=process[_0x5c5cb7(0x15b)]();switch(_0x5d567a){case _0x5c5cb7(0x14b):return configureCursorMcp(_0x31aa56);case'claude':return configureClaudeMcp(_0x31aa56);case'other':return showOtherMcpGuide(_0x31aa56);default:throw new Error(a58_0x4331e8['t']('mcp.ui.unsupportedIDE',{'ide':_0x5d567a}));}}function a58_0x5081(){const _0x25fdc6=['gray','green','name','some','38079HeAlno','cursor','2714040rIYQFS','find','346837gsIfcv','1562429VhSeRT','mcp.ui.failed','1396cuJlus','1087555tyjScN','size','70QVFmZx','mcp.ui.manualRequired','value','mcp.ui.count','message','configuring','every','cwd','3369IegoEc','done','\x20\x20✗','push','mcp.ui.title','yellow','selecting','key','cyan','selectedIndexes','column','manual','\x20\x20✓','mcp.ui.otherIDE','mcp.ui.partialManual','return','handleKeyDown','6bQtVBy','mcp.ui.pressAnyKeyToExit','red','success','needsManualAction','mcp.ui.selectAtLeastOne','map','length','938820WfdiNP','1192PjSWHy','mcp.ui.selectedIDE','white','other','status','mcp.ui.otherIDEDescription','label','description'];a58_0x5081=function(){return _0x25fdc6;};return a58_0x5081();}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- (function(_0x35de3f,_0x478a66){const _0x26ab21=a56_0x133a,_0x26ef81=_0x35de3f();while(!![]){try{const _0x2a1cb9=-parseInt(_0x26ab21(0x1d5))/0x1*(parseInt(_0x26ab21(0x1d7))/0x2)+-parseInt(_0x26ab21(0x1d1))/0x3*(-parseInt(_0x26ab21(0x1cf))/0x4)+-parseInt(_0x26ab21(0x1cd))/0x5+-parseInt(_0x26ab21(0x1d3))/0x6*(-parseInt(_0x26ab21(0x1da))/0x7)+-parseInt(_0x26ab21(0x1d8))/0x8+-parseInt(_0x26ab21(0x1d0))/0x9+parseInt(_0x26ab21(0x1ce))/0xa;if(_0x2a1cb9===_0x478a66)break;else _0x26ef81['push'](_0x26ef81['shift']());}catch(_0x141037){_0x26ef81['push'](_0x26ef81['shift']());}}}(a56_0x1792,0x36a77));function a56_0x133a(_0x22d94b,_0xf74a0c){_0x22d94b=_0x22d94b-0x1cd;const _0x17923d=a56_0x1792();let _0x133aad=_0x17923d[_0x22d94b];return _0x133aad;}import{configureClaudeMcp as a56_0x580a34}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x3695c3=a56_0x133a,_0x19c56c=process['cwd'](),_0x146dbf=a56_0x580a34(_0x19c56c);_0x146dbf[_0x3695c3(0x1db)]?(console[_0x3695c3(0x1d2)](_0x3695c3(0x1dc)+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x0)):(console[_0x3695c3(0x1d9)]('\x0a错误:\x20配置失败\x20-\x20'+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x1));}function a56_0x1792(){const _0x1175ae=['message','10HpYWaU','2943080RREljs','error','560245UIGJiu','success','\x0a📋\x20','940475XzPCjU','6944200VtYrbi','32792vTFcYS','2271177VAMDtn','126wQwuRJ','log','6WFGEfe','exit','17315evUyzX'];a56_0x1792=function(){return _0x1175ae;};return a56_0x1792();}
1
+ function a59_0xc931(_0x5de158,_0x5c175b){_0x5de158=_0x5de158-0x1b2;const _0xa87c8a=a59_0xa87c();let _0xc9312b=_0xa87c8a[_0x5de158];return _0xc9312b;}(function(_0x57491b,_0x13b060){const _0x3d13f3=a59_0xc931,_0x58b9f2=_0x57491b();while(!![]){try{const _0x4020bb=-parseInt(_0x3d13f3(0x1bc))/0x1+-parseInt(_0x3d13f3(0x1ba))/0x2+-parseInt(_0x3d13f3(0x1c0))/0x3+-parseInt(_0x3d13f3(0x1be))/0x4*(parseInt(_0x3d13f3(0x1bf))/0x5)+-parseInt(_0x3d13f3(0x1b5))/0x6*(parseInt(_0x3d13f3(0x1b9))/0x7)+parseInt(_0x3d13f3(0x1b3))/0x8+parseInt(_0x3d13f3(0x1bb))/0x9;if(_0x4020bb===_0x13b060)break;else _0x58b9f2['push'](_0x58b9f2['shift']());}catch(_0xbcf229){_0x58b9f2['push'](_0x58b9f2['shift']());}}}(a59_0xa87c,0x21663));import{configureClaudeMcp as a59_0x5f3721}from'./mcp-installer.js';import a59_0x5a9743 from'../i18n/index.js';function a59_0xa87c(){const _0x304f44=['log','exit','\x0a📋\x20','7WfYjBC','79528bqmFxB','7900803epAtLK','3651qQIXSY','cwd','4PuMDjp','1172450ioMdbH','668127pCVfpc','mcp.claudeConfig.error','success','158096YGTxMO','message','1561272QXIwMh'];a59_0xa87c=function(){return _0x304f44;};return a59_0xa87c();}export async function configureClaudeMcp(){const _0x2efdfe=a59_0xc931,_0x4f3441=process[_0x2efdfe(0x1bd)](),_0xe597b5=a59_0x5f3721(_0x4f3441);_0xe597b5[_0x2efdfe(0x1b2)]?(console[_0x2efdfe(0x1b6)](_0x2efdfe(0x1b8)+_0xe597b5[_0x2efdfe(0x1b4)]+'\x0a'),process[_0x2efdfe(0x1b7)](0x0)):(console['error'](a59_0x5a9743['t'](_0x2efdfe(0x1c1),{'error':_0xe597b5['message']})),process[_0x2efdfe(0x1b7)](0x1));}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- function a57_0x31d3(_0x1f8e26,_0xd61d8e){_0x1f8e26=_0x1f8e26-0x1d6;const _0x3932a1=a57_0x3932();let _0x31d3b7=_0x3932a1[_0x1f8e26];return _0x31d3b7;}function a57_0x3932(){const _0x16bf2e=['5564785BcEMfc','8obxWhP','exit','success','11770398APUEgE','8pQaOhB','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','message','1179066Vytnvk','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','error','1130082CMKVdC','308951lkMuaP','5702610uTTREJ','cwd','9053373gCQigI','配置信息:','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','log'];a57_0x3932=function(){return _0x16bf2e;};return a57_0x3932();}(function(_0x1b3c7c,_0x5e3678){const _0x436d34=a57_0x31d3,_0x1283ac=_0x1b3c7c();while(!![]){try{const _0x331ca5=parseInt(_0x436d34(0x1d6))/0x1+-parseInt(_0x436d34(0x1e5))/0x2+-parseInt(_0x436d34(0x1e8))/0x3*(-parseInt(_0x436d34(0x1de))/0x4)+parseInt(_0x436d34(0x1dd))/0x5+-parseInt(_0x436d34(0x1d7))/0x6+-parseInt(_0x436d34(0x1d9))/0x7+-parseInt(_0x436d34(0x1e2))/0x8*(-parseInt(_0x436d34(0x1e1))/0x9);if(_0x331ca5===_0x5e3678)break;else _0x1283ac['push'](_0x1283ac['shift']());}catch(_0x179c44){_0x1283ac['push'](_0x1283ac['shift']());}}}(a57_0x3932,0x9ea53));import{configureCursorMcp as a57_0x15a779}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x192e4d=a57_0x31d3,_0x48c36d=process[_0x192e4d(0x1d8)](),_0x4c1331=await a57_0x15a779(_0x48c36d);_0x4c1331[_0x192e4d(0x1e0)]?(console[_0x192e4d(0x1dc)](_0x192e4d(0x1db)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1da)),console[_0x192e4d(0x1dc)]('\x20\x20'+_0x4c1331[_0x192e4d(0x1e4)]+'\x0a'),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e6)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e3)),process[_0x192e4d(0x1df)](0x0)):(console[_0x192e4d(0x1e7)]('\x0a错误:\x20配置失败\x20-\x20'+_0x4c1331['message']+'\x0a'),process['exit'](0x1));}
1
+ (function(_0x73d82d,_0x22863a){const _0x26685a=a60_0x5836,_0x2418b1=_0x73d82d();while(!![]){try{const _0x1c465f=parseInt(_0x26685a(0x134))/0x1+-parseInt(_0x26685a(0x12f))/0x2*(-parseInt(_0x26685a(0x12b))/0x3)+parseInt(_0x26685a(0x131))/0x4+-parseInt(_0x26685a(0x12e))/0x5*(parseInt(_0x26685a(0x12c))/0x6)+-parseInt(_0x26685a(0x12d))/0x7*(-parseInt(_0x26685a(0x132))/0x8)+parseInt(_0x26685a(0x133))/0x9+parseInt(_0x26685a(0x130))/0xa*(-parseInt(_0x26685a(0x127))/0xb);if(_0x1c465f===_0x22863a)break;else _0x2418b1['push'](_0x2418b1['shift']());}catch(_0x5686b1){_0x2418b1['push'](_0x2418b1['shift']());}}}(a60_0x5c8f,0x6d1ea));function a60_0x5836(_0x35711e,_0x5c4793){_0x35711e=_0x35711e-0x127;const _0x5c8f38=a60_0x5c8f();let _0x5836a6=_0x5c8f38[_0x35711e];return _0x5836a6;}import{configureCursorMcp as a60_0x2424ff}from'./mcp-installer.js';import a60_0x3afeee from'../i18n/index.js';function a60_0x5c8f(){const _0x9a6bf0=['3486yNKXnx','25iMitch','1466jBTzhW','10nqQXUu','165884YKVNnD','10232WTyjIW','7060077avCJYo','186801nmXZQe','mcp.cursorConfig.restartRequired','cwd','exit','message','mcp.cursorConfig.success','mcp.cursorConfig.configInfo','21842579NFXPqd','log','success','error','3561oSqTDI','104514AhBIrC'];a60_0x5c8f=function(){return _0x9a6bf0;};return a60_0x5c8f();}export async function configureCursorMcp(){const _0x158a6a=a60_0x5836,_0x236b3c=process[_0x158a6a(0x136)](),_0x14e79e=await a60_0x2424ff(_0x236b3c);_0x14e79e[_0x158a6a(0x129)]?(console[_0x158a6a(0x128)](a60_0x3afeee['t'](_0x158a6a(0x139))),console[_0x158a6a(0x128)](a60_0x3afeee['t'](_0x158a6a(0x13a))),console['log']('\x20\x20'+_0x14e79e['message']+'\x0a'),console[_0x158a6a(0x128)](a60_0x3afeee['t']('mcp.cursorConfig.usageHint')),console[_0x158a6a(0x128)](a60_0x3afeee['t'](_0x158a6a(0x135))),process[_0x158a6a(0x137)](0x0)):(console[_0x158a6a(0x12a)](a60_0x3afeee['t']('mcp.cursorConfig.error',{'error':_0x14e79e[_0x158a6a(0x138)]})),process['exit'](0x1));}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5605d1,_0x1f3dc6){const _0x3a40e8=a58_0x44e6,_0x33d6a7=_0x5605d1();while(!![]){try{const _0xe8b7d7=-parseInt(_0x3a40e8(0x1e5))/0x1+-parseInt(_0x3a40e8(0x1f0))/0x2+parseInt(_0x3a40e8(0x1d2))/0x3+-parseInt(_0x3a40e8(0x1eb))/0x4+parseInt(_0x3a40e8(0x1d0))/0x5+parseInt(_0x3a40e8(0x1ce))/0x6+parseInt(_0x3a40e8(0x1d1))/0x7;if(_0xe8b7d7===_0x1f3dc6)break;else _0x33d6a7['push'](_0x33d6a7['shift']());}catch(_0x1008e7){_0x33d6a7['push'](_0x33d6a7['shift']());}}}(a58_0x4db6,0x58381));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';function a58_0x44e6(_0x9f9b52,_0x49994e){_0x9f9b52=_0x9f9b52-0x1cd;const _0x4db6f3=a58_0x4db6();let _0x44e674=_0x4db6f3[_0x9f9b52];return _0x44e674;}function a58_0x4db6(){const _0x3b9497=['has','\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20交互式选择\x20IDE\x0a\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20直接配置\x20Cursor\x20MCP\x20(写入\x20.cursor/mcp.json)\x0a\x0a配置指南:\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','不支持的命令:\x20','\x0a📦\x20正在配置\x20','请输入编号选择\x20IDE:\x0a','length','1787898ZGxmds','description','1865175UCQYxe','2036629IftuUA','795903NpxYzx','exit','(空)','from','\x0a已取消配置\x0a','\x0aLovrabet\x20MCP\x20-\x20MCP\x20服务器配置工具\x0a\x0a用法:\x0a\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息\x0a\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并配置\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20直接配置\x20Cursor\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20直接配置\x20Claude\x20Code\x20MCP\x0a\x0a配置方式:\x0a\x20\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20输入编号选择\x20IDE\x0a\x0a\x20\x20直接配置指定\x20IDE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接配置\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Claude\x20Code\x0a\x0a支持的\x20IDE:\x0a','error','help','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','mcp-install','mcpClaude','\x20之间的数字\x0a','claude','join','stdin','stdout','message','请选择:\x20','quit','219577OnPbWj','forEach','cursor','close','配置失败','name','1355148BtksrB','错误:\x20不支持的命令:\x20','toLowerCase','log','cwd','615114MwCdqp','trim','mcp','question','install','map','\x20-\x20','--help'];a58_0x4db6=function(){return _0x3b9497;};return a58_0x4db6();}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x2ed278,_0xf3b409,_0x2fcab8){const _0x51fd1e=a58_0x44e6;logger['setLogPath'](process[_0x51fd1e(0x1ef)]());if(_0x2fcab8?.[_0x51fd1e(0x1d9)]||_0x2ed278===_0x51fd1e(0x1f7)){showHelp();return;}_0x2ed278!==_0x51fd1e(0x1f4)&&(console[_0x51fd1e(0x1d8)](_0x51fd1e(0x1ec)+(_0x2ed278||_0x51fd1e(0x1d4))),console[_0x51fd1e(0x1ee)]('\x0a可用命令:'),console[_0x51fd1e(0x1ee)]('\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP'),console['log']('\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a'),logger[_0x51fd1e(0x1d8)](_0x51fd1e(0x1f2),_0x51fd1e(0x1fa)+_0x2ed278),process[_0x51fd1e(0x1d3)](0x1));let _0x2b2e15;if(_0x2fcab8?.['mcpCursor'])_0x2b2e15='cursor';else{if(_0x2fcab8?.[_0x51fd1e(0x1dc)])_0x2b2e15=_0x51fd1e(0x1de);else{if(_0xf3b409?.[0x0]){const _0x2a83d1=_0xf3b409[0x0][_0x51fd1e(0x1ed)]();MCP_IDES[_0x51fd1e(0x1f8)](_0x2a83d1)&&(_0x2b2e15=_0x2a83d1);}}}await installMcp(_0x2b2e15);}function showHelp(){const _0x3c2d9f=a58_0x44e6;console['log'](_0x3c2d9f(0x1d7)+Array[_0x3c2d9f(0x1d5)](MCP_IDES)[_0x3c2d9f(0x1f5)]((_0x5abcd5,_0x570baa)=>'\x20\x20'+(_0x570baa+0x1)+'.\x20'+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1ea)]+_0x3c2d9f(0x1f6)+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1cf)])[_0x3c2d9f(0x1df)]('\x0a')+_0x3c2d9f(0x1f9));}async function selectIDE(){const _0x40543b=a58_0x44e6;console[_0x40543b(0x1ee)](_0x40543b(0x1da));const _0x3bf265=Array[_0x40543b(0x1d5)](MCP_IDES);return _0x3bf265[_0x40543b(0x1e6)]((_0xd5fab6,_0x26bd18)=>{const _0x468d3d=_0x40543b;console[_0x468d3d(0x1ee)]('\x20\x20'+(_0x26bd18+0x1)+'.\x20'+IDE_CONFIGS[_0xd5fab6]['name']+_0x468d3d(0x1f6)+IDE_CONFIGS[_0xd5fab6]['description']);}),console[_0x40543b(0x1ee)]('\x20\x20q.\x20取消\x0a'),console[_0x40543b(0x1ee)](_0x40543b(0x1fc)),new Promise(_0x3bed1e=>{const _0x351c33=_0x40543b,_0x16653f=createInterface({'input':process[_0x351c33(0x1e0)],'output':process[_0x351c33(0x1e1)]});_0x16653f[_0x351c33(0x1f3)](_0x351c33(0x1e3),_0x43677e=>{const _0x1737c9=_0x351c33;_0x16653f[_0x1737c9(0x1e8)]();const _0x1eda65=_0x43677e[_0x1737c9(0x1f1)]()['toLowerCase']();(_0x1eda65==='q'||_0x1eda65===_0x1737c9(0x1e4)||_0x1eda65===_0x1737c9(0x1d3))&&(console['log'](_0x1737c9(0x1d6)),process[_0x1737c9(0x1d3)](0x0));const _0xa2b32e=parseInt(_0x1eda65,0xa);if(!isNaN(_0xa2b32e)&&_0xa2b32e>=0x1&&_0xa2b32e<=_0x3bf265['length']){const _0x5bae03=_0x3bf265[_0xa2b32e-0x1];_0x5bae03&&_0x3bed1e(_0x5bae03);return;}console[_0x1737c9(0x1ee)]('\x0a无效的选择,请输入\x201-'+_0x3bf265[_0x1737c9(0x1cd)]+_0x1737c9(0x1dd)),process[_0x1737c9(0x1d3)](0x1);});});}async function installMcp(_0x5aaa63){const _0x44a620=a58_0x44e6;let _0x1d620e;!_0x5aaa63?_0x1d620e=await selectIDE():_0x1d620e=_0x5aaa63;try{const _0xeb878a=IDE_CONFIGS[_0x1d620e];console[_0x44a620(0x1ee)](_0x44a620(0x1fb)+_0xeb878a[_0x44a620(0x1ea)]+'\x20MCP...\x0a');switch(_0x1d620e){case _0x44a620(0x1e7):await configureCursorMcp();break;case _0x44a620(0x1de):await configureClaudeMcp();break;}}catch(_0x21aacb){logger[_0x44a620(0x1d8)](_0x44a620(0x1db),_0x44a620(0x1e9),{'error':_0x21aacb instanceof Error?_0x21aacb[_0x44a620(0x1e2)]:String(_0x21aacb)}),console[_0x44a620(0x1d8)]('\x0a错误:\x20配置失败\x20-\x20'+(_0x21aacb instanceof Error?_0x21aacb['message']:String(_0x21aacb))+'\x0a'),process[_0x44a620(0x1d3)](0x1);}}
1
+ (function(_0x1cf7f4,_0x1766dc){const _0x34e680=a61_0x564f,_0x55767c=_0x1cf7f4();while(!![]){try{const _0x35483e=-parseInt(_0x34e680(0x127))/0x1*(-parseInt(_0x34e680(0x10c))/0x2)+parseInt(_0x34e680(0x123))/0x3*(-parseInt(_0x34e680(0x112))/0x4)+parseInt(_0x34e680(0x11f))/0x5+parseInt(_0x34e680(0x11c))/0x6+-parseInt(_0x34e680(0xfe))/0x7+-parseInt(_0x34e680(0x120))/0x8+parseInt(_0x34e680(0xfb))/0x9;if(_0x35483e===_0x1766dc)break;else _0x55767c['push'](_0x55767c['shift']());}catch(_0x209606){_0x55767c['push'](_0x55767c['shift']());}}}(a61_0x5e67,0x46b3e));function a61_0x564f(_0x37078e,_0x188286){_0x37078e=_0x37078e-0xfa;const _0x5e6725=a61_0x5e67();let _0x564fe0=_0x5e6725[_0x37078e];return _0x564fe0;}import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';function a61_0x5e67(){const _0x8285f8=['mcp.help.command.help','mcp-install','3iibGXa','quit','mcp.help.exampleInstallCursor','mcp.help.configMethodsDirect','202667cmFymj','close','description','mcp.help.examples','message','mcp.help.configMethodsDirectCursor','mcp.select.prompt','mcp.help.availableCommands','name','mcp.help.exampleInstallHint','mcp.help.usage.install','\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','setLogPath','mcp.help.command.install','claude','mcp.help.usage.installClaude','stdout','from','4493889mMfLnt','--help','mcp.help.configMethods','3251353ZOIyde','map','has','cursor','mcp.help.configGuide','mcp.help.title','mcp.installFlow.configuring','trim','mcp.help.configMethodsInteractiveHint','mcp.select.cancelled','log','install','help','mcp.help.usage.installCursor','2fhKpcd','mcp.help.exampleInstallCursorHint','mcp.help.exampleInstall','error','mcpClaude','mcp.help.supportedIDEs','550980LlEVvo','exit','mcp.help.configMethodsDirectClaude','length','\x20-\x20','mcpCursor','question','mcp.error.unsupportedCommand','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','mcp.help.configMethodsInteractive','1125750mbwVAA','toLowerCase','mcp.select.chooseIDE','2618830UaknKS','4172456cRcjsT'];a61_0x5e67=function(){return _0x8285f8;};return a61_0x5e67();}import a61_0x4e7020 from'../i18n/index.js';export async function mcpCommand(_0x5ad899,_0x1ed12b,_0x3c06ed){const _0x5add2d=a61_0x564f;logger[_0x5add2d(0x133)](process['cwd']());if(_0x3c06ed?.[_0x5add2d(0x10a)]||_0x5ad899===_0x5add2d(0xfc)){showHelp();return;}_0x5ad899!==_0x5add2d(0x109)&&(console['error'](a61_0x4e7020['t']('mcp.error.unsupportedCommand',{'cmd':_0x5ad899||'-'})),console['log'](a61_0x4e7020['t'](_0x5add2d(0x12e))),console[_0x5add2d(0x108)](a61_0x4e7020['t'](_0x5add2d(0x134))),console['log'](a61_0x4e7020['t'](_0x5add2d(0x121))),logger[_0x5add2d(0x10f)]('mcp',a61_0x4e7020['t'](_0x5add2d(0x119),{'cmd':_0x5ad899||'-'})),process[_0x5add2d(0x113)](0x1));let _0x4c983b;if(_0x3c06ed?.[_0x5add2d(0x117)])_0x4c983b=_0x5add2d(0x101);else{if(_0x3c06ed?.[_0x5add2d(0x110)])_0x4c983b=_0x5add2d(0x135);else{if(_0x1ed12b?.[0x0]){const _0x49ba37=_0x1ed12b[0x0][_0x5add2d(0x11d)]();MCP_IDES[_0x5add2d(0x100)](_0x49ba37)&&(_0x4c983b=_0x49ba37);}}}await installMcp(_0x4c983b);}function showHelp(){const _0x1101da=a61_0x564f;console[_0x1101da(0x108)]('\x0a'+a61_0x4e7020['t'](_0x1101da(0x103))+'\x0a\x0a'+a61_0x4e7020['t']('mcp.help.usage.help')+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x131))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x10b))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x136))+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0xfd))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x11b))+_0x1101da(0x11a)+a61_0x4e7020['t'](_0x1101da(0x106))+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0x126))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x12c))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x114))+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0x111))+'\x0a'+Array['from'](MCP_IDES)[_0x1101da(0xff)]((_0x5dff2e,_0x23d281)=>'\x20\x20'+(_0x23d281+0x1)+'.\x20'+IDE_CONFIGS[_0x5dff2e]['name']+_0x1101da(0x116)+IDE_CONFIGS[_0x5dff2e][_0x1101da(0x129)])['join']('\x0a')+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0x12a))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x10e))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x130))+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0x125))+'\x0a'+a61_0x4e7020['t'](_0x1101da(0x10d))+'\x0a\x0a'+a61_0x4e7020['t'](_0x1101da(0x102))+_0x1101da(0x132));}async function selectIDE(){const _0x28e3b5=a61_0x564f;console['log'](a61_0x4e7020['t'](_0x28e3b5(0x11e)));const _0x47f706=Array[_0x28e3b5(0xfa)](MCP_IDES);return _0x47f706['forEach']((_0x5cfc13,_0x42065c)=>{const _0xed3a08=_0x28e3b5;console[_0xed3a08(0x108)]('\x20\x20'+(_0x42065c+0x1)+'.\x20'+IDE_CONFIGS[_0x5cfc13][_0xed3a08(0x12f)]+_0xed3a08(0x116)+IDE_CONFIGS[_0x5cfc13][_0xed3a08(0x129)]);}),console[_0x28e3b5(0x108)](a61_0x4e7020['t']('mcp.select.cancel')),console['log'](a61_0x4e7020['t']('mcp.select.enterNumber')),new Promise(_0x1067b2=>{const _0x9b38c7=_0x28e3b5,_0x13deb7=createInterface({'input':process['stdin'],'output':process[_0x9b38c7(0x137)]});_0x13deb7[_0x9b38c7(0x118)](a61_0x4e7020['t'](_0x9b38c7(0x12d)),_0x2a51c7=>{const _0x380662=_0x9b38c7;_0x13deb7[_0x380662(0x128)]();const _0x12fe89=_0x2a51c7[_0x380662(0x105)]()[_0x380662(0x11d)]();(_0x12fe89==='q'||_0x12fe89===_0x380662(0x124)||_0x12fe89===_0x380662(0x113))&&(console[_0x380662(0x108)](a61_0x4e7020['t'](_0x380662(0x107))),process[_0x380662(0x113)](0x0));const _0xa5d735=parseInt(_0x12fe89,0xa);if(!isNaN(_0xa5d735)&&_0xa5d735>=0x1&&_0xa5d735<=_0x47f706[_0x380662(0x115)]){const _0x4598af=_0x47f706[_0xa5d735-0x1];_0x4598af&&_0x1067b2(_0x4598af);return;}console['log'](a61_0x4e7020['t']('mcp.select.invalidChoice',{'count':_0x47f706[_0x380662(0x115)]})),process[_0x380662(0x113)](0x1);});});}async function installMcp(_0x52156e){const _0x3c097f=a61_0x564f;let _0x5cb8c0;!_0x52156e?_0x5cb8c0=await selectIDE():_0x5cb8c0=_0x52156e;try{const _0x5dad71=IDE_CONFIGS[_0x5cb8c0];console['log'](a61_0x4e7020['t'](_0x3c097f(0x104),{'name':_0x5dad71[_0x3c097f(0x12f)]}));switch(_0x5cb8c0){case _0x3c097f(0x101):await configureCursorMcp();break;case _0x3c097f(0x135):await configureClaudeMcp();break;}}catch(_0x59e515){logger['error'](_0x3c097f(0x122),a61_0x4e7020['t']('mcp.installFlow.error',{'error':_0x59e515 instanceof Error?_0x59e515[_0x3c097f(0x12b)]:String(_0x59e515)}),{'error':_0x59e515 instanceof Error?_0x59e515[_0x3c097f(0x12b)]:String(_0x59e515)}),console[_0x3c097f(0x10f)](a61_0x4e7020['t']('mcp.installFlow.error',{'error':_0x59e515 instanceof Error?_0x59e515[_0x3c097f(0x12b)]:String(_0x59e515)})),process[_0x3c097f(0x113)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x29cac8,_0x1b3bac){const _0x39ce64=a59_0x4fea,_0xc5df02=_0x29cac8();while(!![]){try{const _0x5d83e6=-parseInt(_0x39ce64(0xa4))/0x1*(-parseInt(_0x39ce64(0xa8))/0x2)+parseInt(_0x39ce64(0xa5))/0x3+-parseInt(_0x39ce64(0xa7))/0x4+parseInt(_0x39ce64(0x9e))/0x5*(-parseInt(_0x39ce64(0x97))/0x6)+parseInt(_0x39ce64(0xa2))/0x7*(-parseInt(_0x39ce64(0x9d))/0x8)+parseInt(_0x39ce64(0x99))/0x9+-parseInt(_0x39ce64(0xa6))/0xa*(-parseInt(_0x39ce64(0x9b))/0xb);if(_0x5d83e6===_0x1b3bac)break;else _0xc5df02['push'](_0xc5df02['shift']());}catch(_0x953745){_0xc5df02['push'](_0xc5df02['shift']());}}}(a59_0x784c,0x2bb04));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a59_0x784c(){const _0x5d7dba=['\x20成功)','setLogPath','35TVHVSQ','message','2wOexdM','460980FGvKom','190AUuibf','427424DJtRbD','169256SJQtIW','length','info','其他\x20IDE','needsManualAction','\x20MCP\x20配置成功','error','success','other','some','\x0a✗\x20','\x0a✓\x20','\x20MCP\x20配置失败:\x20','33438QzBuQL','cursor','481599eVqmOf','filter','249238flsYeo','mcp-install-non-interactive','387960brXyYn','250FJruId','log'];a59_0x784c=function(){return _0x5d7dba;};return a59_0x784c();}function a59_0x4fea(_0x353005,_0x4d4a7e){_0x353005=_0x353005-0x91;const _0x784c5f=a59_0x784c();let _0x4fea50=_0x784c5f[_0x353005];return _0x4fea50;}export async function installMcpNonInteractive(_0x4d0972,_0x3f04e6=process['cwd']()){const _0x147331=a59_0x4fea;logger[_0x147331(0xa1)](_0x3f04e6),logger[_0x147331(0xaa)](_0x147331(0x9c),'开始配置\x20MCP',{'ides':_0x4d0972});const _0x2682eb=[];for(const _0x509da4 of _0x4d0972){try{let _0x236ce6;switch(_0x509da4){case'cursor':_0x236ce6=await configureCursorMcp(_0x3f04e6);break;case'claude':_0x236ce6=configureClaudeMcp(_0x3f04e6);break;case _0x147331(0x92):_0x236ce6=showOtherMcpGuide(_0x3f04e6);break;default:_0x236ce6={'success':![],'message':'未知的\x20IDE:\x20'+_0x509da4};}_0x2682eb['push'](_0x236ce6);if(_0x236ce6[_0x147331(0x91)]){const _0x1386f8=_0x509da4===_0x147331(0x98)?'Cursor':_0x509da4==='claude'?'Claude\x20Code':_0x147331(0xab);console[_0x147331(0x9f)](_0x147331(0x95)+_0x1386f8+_0x147331(0xad)),console['log']('\x20\x20'+_0x236ce6[_0x147331(0xa3)]);}else console[_0x147331(0xae)]('\x0a✗\x20'+_0x509da4+_0x147331(0x96)+_0x236ce6[_0x147331(0xa3)]);}catch(_0x5ee7c6){console[_0x147331(0xae)](_0x147331(0x94)+_0x509da4+_0x147331(0x96)+(_0x5ee7c6 instanceof Error?_0x5ee7c6[_0x147331(0xa3)]:String(_0x5ee7c6)));}}const _0x4d8db1=_0x2682eb[_0x147331(0x9a)](_0x1a2da5=>_0x1a2da5['success'])[_0x147331(0xa9)],_0xe05d6c=_0x2682eb[_0x147331(0xa9)];console['log']('\x0a✓\x20MCP\x20配置完成\x20('+_0x4d8db1+'/'+_0xe05d6c+_0x147331(0xa0));const _0x5bfc37=_0x2682eb[_0x147331(0x93)](_0x1acfae=>_0x1acfae[_0x147331(0xac)]);_0x5bfc37&&console[_0x147331(0x9f)]('\x0a注意:部分配置需要手动执行命令,请按照上述说明操作');}
1
+ const a62_0x23132a=a62_0x5716;(function(_0x78de52,_0x57df87){const _0x50a44e=a62_0x5716,_0x26f164=_0x78de52();while(!![]){try{const _0x1b752d=-parseInt(_0x50a44e(0xa2))/0x1+-parseInt(_0x50a44e(0xa5))/0x2+-parseInt(_0x50a44e(0x96))/0x3*(parseInt(_0x50a44e(0x95))/0x4)+parseInt(_0x50a44e(0xa1))/0x5*(parseInt(_0x50a44e(0x94))/0x6)+parseInt(_0x50a44e(0x9d))/0x7+parseInt(_0x50a44e(0x9a))/0x8*(parseInt(_0x50a44e(0x8d))/0x9)+parseInt(_0x50a44e(0x8a))/0xa*(-parseInt(_0x50a44e(0x93))/0xb);if(_0x1b752d===_0x57df87)break;else _0x26f164['push'](_0x26f164['shift']());}catch(_0xf20495){_0x26f164['push'](_0x26f164['shift']());}}}(a62_0x39aa,0xd7946));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';function a62_0x5716(_0x23f4c5,_0x30a2cc){_0x23f4c5=_0x23f4c5-0x87;const _0x39aa15=a62_0x39aa();let _0x571637=_0x39aa15[_0x23f4c5];return _0x571637;}import{logger}from'../utils/logger.js';function a62_0x39aa(){const _0xfd2b72=['mcp.claude','1128638tIVflR','mcp.install.manualActionRequired','mcp.install.success','claude','3668815JlDgnI','463843DBtGof','error','push','840454sogVRa','mcp.install.unknownIDE','mcp.cursor','mcp.install.failed','mcp.install.starting','log','735890VLNApt','message','some','136341bXiPza','length','filter','needsManualAction','success','other','33CnKtww','6vpityq','220768pTdbqY','18OCOedj','cwd','mcp.install.otherIDE','cursor','752BJsSnk','setLogPath'];a62_0x39aa=function(){return _0xfd2b72;};return a62_0x39aa();}import a62_0x5778c2 from'../i18n/index.js';export async function installMcpNonInteractive(_0xf5023f,_0x5088c7=process[a62_0x23132a(0x97)]()){const _0x3f883c=a62_0x23132a;logger[_0x3f883c(0x9b)](_0x5088c7),logger['info']('mcp-install-non-interactive',a62_0x5778c2['t'](_0x3f883c(0x88)),{'ides':_0xf5023f});const _0x3487aa=[];for(const _0x44dcc0 of _0xf5023f){try{let _0x50b6c9;switch(_0x44dcc0){case _0x3f883c(0x99):_0x50b6c9=await configureCursorMcp(_0x5088c7);break;case _0x3f883c(0xa0):_0x50b6c9=configureClaudeMcp(_0x5088c7);break;case _0x3f883c(0x92):_0x50b6c9=showOtherMcpGuide(_0x5088c7);break;default:_0x50b6c9={'success':![],'message':a62_0x5778c2['t'](_0x3f883c(0xa6),{'ide':_0x44dcc0})};}_0x3487aa[_0x3f883c(0xa4)](_0x50b6c9);if(_0x50b6c9['success']){const _0x37e4f8=_0x44dcc0===_0x3f883c(0x99)?a62_0x5778c2['t'](_0x3f883c(0xa7)):_0x44dcc0===_0x3f883c(0xa0)?a62_0x5778c2['t'](_0x3f883c(0x9c)):a62_0x5778c2['t']('mcp.install.otherIDE');console[_0x3f883c(0x89)](a62_0x5778c2['t'](_0x3f883c(0x9f),{'ide':_0x37e4f8})),console[_0x3f883c(0x89)]('\x20\x20'+_0x50b6c9[_0x3f883c(0x8b)]);}else console[_0x3f883c(0xa3)](a62_0x5778c2['t'](_0x3f883c(0x87),{'ide':_0x44dcc0===_0x3f883c(0x99)?a62_0x5778c2['t']('mcp.cursor'):_0x44dcc0==='claude'?a62_0x5778c2['t'](_0x3f883c(0x9c)):a62_0x5778c2['t'](_0x3f883c(0x98)),'error':_0x50b6c9[_0x3f883c(0x8b)]}));}catch(_0x506010){console[_0x3f883c(0xa3)](a62_0x5778c2['t'](_0x3f883c(0x87),{'ide':_0x44dcc0===_0x3f883c(0x99)?a62_0x5778c2['t']('mcp.cursor'):_0x44dcc0===_0x3f883c(0xa0)?a62_0x5778c2['t'](_0x3f883c(0x9c)):a62_0x5778c2['t']('mcp.install.otherIDE'),'error':_0x506010 instanceof Error?_0x506010[_0x3f883c(0x8b)]:String(_0x506010)}));}}const _0x5c0858=_0x3487aa[_0x3f883c(0x8f)](_0x37caed=>_0x37caed[_0x3f883c(0x91)])[_0x3f883c(0x8e)],_0xe73c77=_0x3487aa['length'];console[_0x3f883c(0x89)](a62_0x5778c2['t']('mcp.install.completed',{'successCount':_0x5c0858,'totalCount':_0xe73c77}));const _0x3e15c2=_0x3487aa[_0x3f883c(0x8c)](_0x25591e=>_0x25591e[_0x3f883c(0x90)]);_0x3e15c2&&console['log'](a62_0x5778c2['t'](_0x3f883c(0x9e)));}
@@ -1 +1 @@
1
- const a60_0x39c62e=a60_0x1c5e;(function(_0x39c6eb,_0x1f01df){const _0x98e136=a60_0x1c5e,_0x6f1a29=_0x39c6eb();while(!![]){try{const _0x1f834c=parseInt(_0x98e136(0x119))/0x1*(parseInt(_0x98e136(0x11d))/0x2)+parseInt(_0x98e136(0x12b))/0x3*(-parseInt(_0x98e136(0x11e))/0x4)+-parseInt(_0x98e136(0x107))/0x5*(parseInt(_0x98e136(0x132))/0x6)+parseInt(_0x98e136(0x123))/0x7*(-parseInt(_0x98e136(0x117))/0x8)+parseInt(_0x98e136(0x111))/0x9*(-parseInt(_0x98e136(0x125))/0xa)+parseInt(_0x98e136(0x103))/0xb*(-parseInt(_0x98e136(0x106))/0xc)+parseInt(_0x98e136(0x10d))/0xd;if(_0x1f834c===_0x1f01df)break;else _0x6f1a29['push'](_0x6f1a29['shift']());}catch(_0x2d9b94){_0x6f1a29['push'](_0x6f1a29['shift']());}}}(a60_0x5167,0x70fa5));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a60_0x5167(){const _0x3808ab=['utf8','mcpServers','721uMcfTZ','其他\x20IDE\x20配置指引已显示','90gikNcn','\x20\x20\x20\x20}','复制\x20agents.md\x20文件失败','\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','join','95754GoxvSz','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','app','已创建\x20Cursor\x20Rules\x20文件','Cursor\x20Rules\x20文件已存在,跳过','更新现有\x20mcp.json\x20配置','\x20\x20\x22mcpServers\x22:\x20{','5204334LbycCl','\x20-e\x20LOVRABET_ENV=','message','配置信息:\x20appcode=','\x22LOVRABET_APP_CODE\x22:\x20\x22','.cursor','env','agents.md\x20文件已存在,跳过','mcp-install','复制\x20Cursor\x20Rules\x20文件失败','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','已写入\x20.cursor/mcp.json','创建新的\x20mcp.json\x20配置','\x20\x20\x20\x20\x20\x20\x20\x20','rules','utf-8','4088381dYtLWv','lovrabet_rules.mdc','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide','12iEweFS','5YqJWxw','agents.md','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','claude\x20mcp\x20add\x20','appcode','AppCode:\x20','37268660kbUtlj','mcp.json','npx','环境:\x20','452331qOkaPh','配置失败','info','mcp-claude','push','\x20-e\x20LOVRABET_APP_CODE=','29816jxjBax',',\x20env=','41AhkOCt','error','配置\x20Cursor\x20MCP\x20失败','mcp-cursor','10430gpzrOp','68aqiKzu','online','请执行以下命令配置\x20Claude\x20Code\x20MCP:'];a60_0x5167=function(){return _0x3808ab;};return a60_0x5167();}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='lovrabet-dataset';function a60_0x1c5e(_0x218fe9,_0x30b849){_0x218fe9=_0x218fe9-0xfa;const _0x51671f=a60_0x5167();let _0x1c5e38=_0x51671f[_0x218fe9];return _0x1c5e38;}export const MCP_COMMAND=a60_0x39c62e(0x10f);export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x13f190=a60_0x39c62e,_0x256516=readConfig(),_0x3089b4=_0x256516[_0x13f190(0x10b)]||_0x256516[_0x13f190(0x12d)],_0x744c47=_0x256516[_0x13f190(0x138)]||'online';if(!_0x3089b4)throw new Error('未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置');return{'appcode':String(_0x3089b4),'env':_0x744c47};}export function buildMcpEnv(_0x26343f,_0x4037dd){const _0x5e58c0={'LOVRABET_APP_CODE':_0x26343f};return _0x4037dd!=='online'&&(_0x5e58c0['LOVRABET_ENV']=_0x4037dd),_0x5e58c0;}export function buildMcpServerConfig(_0x15a309,_0x286f4a){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x15a309,_0x286f4a)};}export function buildClaudeMcpCommand(_0x78bad3,_0x261442){const _0x46e023=a60_0x39c62e,_0xcffc91=_0x46e023(0x10a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x46e023(0x12a)]('\x20')+_0x46e023(0x116)+_0x78bad3,_0x52d4e3=_0x261442!==_0x46e023(0x11f)?_0x46e023(0x133)+_0x261442:'';return''+_0xcffc91+_0x52d4e3;}export async function copyCursorRules(_0x37afee){const _0x296e31=a60_0x39c62e,_0x595e30=join(_0x37afee,_0x296e31(0x137)),_0x594a60=join(_0x595e30,_0x296e31(0x101)),_0x2bd88a=join(_0x594a60,_0x296e31(0x104));if(existsSync(_0x2bd88a))return logger['info']('mcp-install',_0x296e31(0x12f),{'path':_0x2bd88a}),![];try{ensureDir(_0x594a60);const _0x4f6869=await getRulesContent();return writeFileSync(_0x2bd88a,_0x4f6869,_0x296e31(0x102)),logger['info'](_0x296e31(0xfb),'创建\x20Cursor\x20Rules\x20文件',{'to':_0x2bd88a}),!![];}catch(_0x45ed93){return logger[_0x296e31(0x11a)](_0x296e31(0xfb),_0x296e31(0xfc),{'error':_0x45ed93 instanceof Error?_0x45ed93[_0x296e31(0x134)]:String(_0x45ed93)}),![];}}export async function copyAgentsMd(_0x262af6){const _0x4298a9=a60_0x39c62e,_0x289ea2=join(_0x262af6,_0x4298a9(0x108));if(existsSync(_0x289ea2))return logger[_0x4298a9(0x113)](_0x4298a9(0xfb),_0x4298a9(0xfa),{'path':_0x289ea2}),![];try{const _0x468d8f=await getRulesContent();return writeFileSync(_0x289ea2,_0x468d8f,'utf-8'),logger[_0x4298a9(0x113)](_0x4298a9(0xfb),'创建\x20agents.md\x20文件',{'to':_0x289ea2}),!![];}catch(_0x5e2968){return logger['error'](_0x4298a9(0xfb),_0x4298a9(0x127),{'error':_0x5e2968 instanceof Error?_0x5e2968[_0x4298a9(0x134)]:String(_0x5e2968)}),![];}}export async function configureCursorMcp(_0x26138a){const _0x5b2a11=a60_0x39c62e;try{const {appcode:_0x55cc66,env:_0x5070ab}=getAppConfig(),_0x2e36c8=join(_0x26138a,_0x5b2a11(0x137)),_0x4f254c=join(_0x2e36c8,_0x5b2a11(0x10e));ensureDir(_0x2e36c8);const _0x5b4735=buildMcpServerConfig(_0x55cc66,_0x5070ab);let _0xbe7f3c;if(existsSync(_0x4f254c)){const _0xac5abe=readFileSync(_0x4f254c,_0x5b2a11(0x121));_0xbe7f3c=JSON['parse'](_0xac5abe),!_0xbe7f3c['mcpServers']&&(_0xbe7f3c['mcpServers']={}),logger[_0x5b2a11(0x113)]('mcp-cursor',_0x5b2a11(0x130),{'path':_0x4f254c,'appcode':_0x55cc66,'env':_0x5070ab});}else _0xbe7f3c={'mcpServers':{}},logger[_0x5b2a11(0x113)](_0x5b2a11(0x11c),_0x5b2a11(0xff),{'path':_0x4f254c,'appcode':_0x55cc66,'env':_0x5070ab});_0xbe7f3c[_0x5b2a11(0x122)][MCP_SERVER_NAME]=_0x5b4735,writeFileSync(_0x4f254c,JSON['stringify'](_0xbe7f3c,null,0x2),{'encoding':_0x5b2a11(0x121)});const _0x2aebf7=await copyCursorRules(_0x26138a),_0x2077a2=[_0x5b2a11(0xfe),_0x5b2a11(0x10c)+_0x55cc66];return _0x5070ab!==_0x5b2a11(0x11f)&&_0x2077a2['push'](_0x5b2a11(0x110)+_0x5070ab),_0x2077a2[_0x5b2a11(0x115)]('重启\x20Cursor\x20后生效'),_0x2aebf7&&_0x2077a2[_0x5b2a11(0x115)](_0x5b2a11(0x12e)),logger[_0x5b2a11(0x113)](_0x5b2a11(0x11c),'配置\x20Cursor\x20MCP\x20成功',{'appcode':_0x55cc66,'env':_0x5070ab,'configPath':_0x4f254c}),{'success':!![],'message':_0x2077a2[_0x5b2a11(0x12a)]('\x0a\x20\x20')};}catch(_0x125d79){return logger[_0x5b2a11(0x11a)](_0x5b2a11(0x11c),_0x5b2a11(0x11b),{'error':_0x125d79 instanceof Error?_0x125d79['message']:String(_0x125d79)}),{'success':![],'message':_0x125d79 instanceof Error?_0x125d79[_0x5b2a11(0x134)]:String(_0x125d79)};}}export function configureClaudeMcp(_0x35f0ad){const _0x5404a6=a60_0x39c62e;try{const {appcode:_0x88befe,env:_0x9d7f3}=getAppConfig();copyAgentsMd(_0x35f0ad);const _0x141fa2=buildClaudeMcpCommand(_0x88befe,_0x9d7f3),_0x56fd2a=[_0x5404a6(0x120),''+_0x141fa2,'配置信息:','AppCode:\x20'+_0x88befe];return _0x9d7f3!==_0x5404a6(0x11f)&&_0x56fd2a['push']('环境:\x20'+_0x9d7f3),_0x56fd2a['push']('重启\x20Claude\x20Code\x20后生效'),logger['info']('mcp-claude','生成配置命令',{'appcode':_0x88befe,'env':_0x9d7f3,'command':_0x141fa2}),{'success':!![],'message':_0x56fd2a['join'](_0x5404a6(0x128)),'needsManualAction':!![]};}catch(_0x3eae69){return logger['error'](_0x5404a6(0x114),_0x5404a6(0x112),{'error':_0x3eae69 instanceof Error?_0x3eae69[_0x5404a6(0x134)]:String(_0x3eae69)}),{'success':![],'message':_0x3eae69 instanceof Error?_0x3eae69['message']:String(_0x3eae69)};}}export function showOtherMcpGuide(_0x81a842){const _0xea0604=a60_0x39c62e;try{const {appcode:_0x575315,env:_0x17899d}=getAppConfig(),_0x4ccc08=buildMcpServerConfig(_0x575315,_0x17899d),_0x4b4183=[_0xea0604(0x136)+_0x575315+'\x22'];_0x17899d!==_0xea0604(0x11f)&&_0x4b4183[_0xea0604(0x115)]('\x22LOVRABET_ENV\x22:\x20\x22'+_0x17899d+'\x22');const _0x46bd4f=[_0xea0604(0x135)+_0x575315+_0xea0604(0x118)+_0x17899d,'{',_0xea0604(0x131),_0xea0604(0x12c),_0xea0604(0xfd),_0xea0604(0x109),_0xea0604(0x129),..._0x4b4183['map'](_0x29cce1=>_0xea0604(0x100)+_0x29cce1+','),'\x20\x20\x20\x20\x20\x20}',_0xea0604(0x126),'\x20\x20}','}',_0xea0604(0x105)];return logger[_0xea0604(0x113)](_0xea0604(0xfb),_0xea0604(0x124),{'appcode':_0x575315,'env':_0x17899d}),{'success':!![],'message':_0x46bd4f[_0xea0604(0x12a)]('\x0a'),'needsManualAction':!![]};}catch(_0x4f4af3){return{'success':![],'message':_0x4f4af3 instanceof Error?_0x4f4af3[_0xea0604(0x134)]:String(_0x4f4af3)};}}function ensureDir(_0x119d5a){!existsSync(_0x119d5a)&&mkdirSync(_0x119d5a,{'recursive':!![]});}
1
+ const a63_0x38c251=a63_0x5bad;(function(_0x128dbe,_0x9db07d){const _0x4f88a2=a63_0x5bad,_0x56537c=_0x128dbe();while(!![]){try{const _0x30ec64=parseInt(_0x4f88a2(0x19a))/0x1*(-parseInt(_0x4f88a2(0x19e))/0x2)+parseInt(_0x4f88a2(0x1b2))/0x3+-parseInt(_0x4f88a2(0x188))/0x4+-parseInt(_0x4f88a2(0x18b))/0x5+parseInt(_0x4f88a2(0x18c))/0x6*(-parseInt(_0x4f88a2(0x1a2))/0x7)+-parseInt(_0x4f88a2(0x18a))/0x8*(parseInt(_0x4f88a2(0x1a7))/0x9)+parseInt(_0x4f88a2(0x1b0))/0xa*(parseInt(_0x4f88a2(0x190))/0xb);if(_0x30ec64===_0x9db07d)break;else _0x56537c['push'](_0x56537c['shift']());}catch(_0x58ff43){_0x56537c['push'](_0x56537c['shift']());}}}(a63_0x1ab9,0x9a5b3));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';import a63_0x40f47f from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a63_0x38c251(0x193);export const MCP_COMMAND=a63_0x38c251(0x19b);export const MCP_ARGS=[a63_0x38c251(0x192)];function a63_0x5bad(_0x5f5930,_0x20ce68){_0x5f5930=_0x5f5930-0x187;const _0x1ab903=a63_0x1ab9();let _0x5badac=_0x1ab903[_0x5f5930];return _0x5badac;}export function getAppConfig(){const _0x365f18=a63_0x38c251,_0x2f4da7=readConfig(),_0x4b1fca=_0x2f4da7['appcode']||_0x2f4da7['app'],_0x1b5ee3=_0x2f4da7['env']||_0x365f18(0x1a8);if(!_0x4b1fca)throw new Error(a63_0x40f47f['t'](_0x365f18(0x197)));return{'appcode':String(_0x4b1fca),'env':_0x1b5ee3};}export function buildMcpEnv(_0x2b0414,_0x327fe8){const _0x3c2f25=a63_0x38c251,_0x2f9433={'LOVRABET_APP_CODE':_0x2b0414};return _0x327fe8!==_0x3c2f25(0x1a8)&&(_0x2f9433[_0x3c2f25(0x1b1)]=_0x327fe8),_0x2f9433;}function a63_0x1ab9(){const _0x24bb75=['mcp.cursorConfig.success','mcp.claudeConfig.commandGenerated','mcp.error.missingAppcode','push','mcp.cursorConfig.rules.copyFailed','599ZGgCvB','npx','\x20-e\x20LOVRABET_ENV=','mcp-install','2222jqppwY','info','rules','.cursor','7NwkBEn','mcp.other.configInfo','error','mcp.cursorConfig.rules.created','parse','27vywLpH','online','\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet_rules.mdc','\x0a\x20\x20','mcp.claudeConfig.error','\x22LOVRABET_ENV\x22:\x20\x22','mcp.cursorConfig.updateExisting','mcp-claude','30ILXXTx','LOVRABET_ENV','3535434vWehQo','message','mcp.cursorConfig.written','agents.md','utf8','AppCode:\x20','mcp.cursorConfig.rules.exists','mcp.cursorConfig.error','mcp-cursor','\x20-e\x20LOVRABET_APP_CODE=','mcp.claudeConfig.restartRequired','mcp.claudeConfig.agents.copyFailed','mcp.claudeConfig.manualCommand','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','mcp.cursorConfig.restartRequired','mcpServers','stringify','2344120HWUZqm','\x22LOVRABET_APP_CODE\x22:\x20\x22','1057768MxwOSR','3068495TSfclB','510426KfdtZm','join','claude\x20mcp\x20add\x20','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','6602629ewvyQC','mcp.claudeConfig.agents.created','@lovrabet/dataset-mcp-server@latest','lovrabet-dataset','mcp.config.env'];a63_0x1ab9=function(){return _0x24bb75;};return a63_0x1ab9();}export function buildMcpServerConfig(_0x793a13,_0x7ac3f6){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x793a13,_0x7ac3f6)};}export function buildClaudeMcpCommand(_0x23c1f2,_0x2d8990){const _0x5162ac=a63_0x38c251,_0x5d974f=_0x5162ac(0x18e)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x5162ac(0x18d)]('\x20')+_0x5162ac(0x1bb)+_0x23c1f2,_0x330628=_0x2d8990!==_0x5162ac(0x1a8)?_0x5162ac(0x19c)+_0x2d8990:'';return''+_0x5d974f+_0x330628;}export async function copyCursorRules(_0x1aa43b){const _0xb35a79=a63_0x38c251,_0x12683c=join(_0x1aa43b,_0xb35a79(0x1a1)),_0x140fa4=join(_0x12683c,_0xb35a79(0x1a0)),_0x3b27ee=join(_0x140fa4,_0xb35a79(0x1aa));if(existsSync(_0x3b27ee))return logger[_0xb35a79(0x19f)](_0xb35a79(0x19d),a63_0x40f47f['t'](_0xb35a79(0x1b8)),{'path':_0x3b27ee}),![];try{ensureDir(_0x140fa4);const _0x294bf1=await getRulesContent();return writeFileSync(_0x3b27ee,_0x294bf1,'utf-8'),logger['info'](_0xb35a79(0x19d),a63_0x40f47f['t'](_0xb35a79(0x1a5)),{'to':_0x3b27ee}),!![];}catch(_0x56daf2){return logger[_0xb35a79(0x1a4)](_0xb35a79(0x19d),a63_0x40f47f['t'](_0xb35a79(0x199)),{'error':_0x56daf2 instanceof Error?_0x56daf2[_0xb35a79(0x1b3)]:String(_0x56daf2)}),![];}}export async function copyAgentsMd(_0x35d3d0){const _0x5a6fa7=a63_0x38c251,_0x235121=join(_0x35d3d0,_0x5a6fa7(0x1b5));if(existsSync(_0x235121))return logger[_0x5a6fa7(0x19f)](_0x5a6fa7(0x19d),a63_0x40f47f['t']('mcp.claudeConfig.agents.exists'),{'path':_0x235121}),![];try{const _0x3973fb=await getRulesContent();return writeFileSync(_0x235121,_0x3973fb,'utf-8'),logger['info'](_0x5a6fa7(0x19d),a63_0x40f47f['t'](_0x5a6fa7(0x191)),{'to':_0x235121}),!![];}catch(_0x5e9c2c){return logger[_0x5a6fa7(0x1a4)]('mcp-install',a63_0x40f47f['t'](_0x5a6fa7(0x1bd)),{'error':_0x5e9c2c instanceof Error?_0x5e9c2c[_0x5a6fa7(0x1b3)]:String(_0x5e9c2c)}),![];}}export async function configureCursorMcp(_0x2d18e0){const _0x1d3af3=a63_0x38c251;try{const {appcode:_0x570a05,env:_0x39aaa0}=getAppConfig(),_0x3f9884=join(_0x2d18e0,_0x1d3af3(0x1a1)),_0x3b40ea=join(_0x3f9884,'mcp.json');ensureDir(_0x3f9884);const _0x3ed614=buildMcpServerConfig(_0x570a05,_0x39aaa0);let _0x309ba9;if(existsSync(_0x3b40ea)){const _0x26cff5=readFileSync(_0x3b40ea,_0x1d3af3(0x1b6));_0x309ba9=JSON[_0x1d3af3(0x1a6)](_0x26cff5),!_0x309ba9[_0x1d3af3(0x1c1)]&&(_0x309ba9[_0x1d3af3(0x1c1)]={}),logger['info']('mcp-cursor',a63_0x40f47f['t'](_0x1d3af3(0x1ae)),{'path':_0x3b40ea,'appcode':_0x570a05,'env':_0x39aaa0});}else _0x309ba9={'mcpServers':{}},logger[_0x1d3af3(0x19f)](_0x1d3af3(0x1ba),a63_0x40f47f['t']('mcp.cursorConfig.createNew'),{'path':_0x3b40ea,'appcode':_0x570a05,'env':_0x39aaa0});_0x309ba9['mcpServers'][MCP_SERVER_NAME]=_0x3ed614,writeFileSync(_0x3b40ea,JSON[_0x1d3af3(0x187)](_0x309ba9,null,0x2),{'encoding':'utf8'});const _0x6b33c4=await copyCursorRules(_0x2d18e0),_0x4c7479=[a63_0x40f47f['t'](_0x1d3af3(0x1b4)),'AppCode:\x20'+_0x570a05];return _0x39aaa0!==_0x1d3af3(0x1a8)&&_0x4c7479[_0x1d3af3(0x198)](a63_0x40f47f['t'](_0x1d3af3(0x194),{'env':_0x39aaa0})),_0x4c7479['push'](a63_0x40f47f['t'](_0x1d3af3(0x1c0))),_0x6b33c4&&_0x4c7479[_0x1d3af3(0x198)](a63_0x40f47f['t']('mcp.cursorConfig.rules.created')),logger[_0x1d3af3(0x19f)](_0x1d3af3(0x1ba),a63_0x40f47f['t'](_0x1d3af3(0x195)),{'appcode':_0x570a05,'env':_0x39aaa0,'configPath':_0x3b40ea}),{'success':!![],'message':_0x4c7479[_0x1d3af3(0x18d)](_0x1d3af3(0x1ab))};}catch(_0x5b231b){return logger[_0x1d3af3(0x1a4)](_0x1d3af3(0x1ba),a63_0x40f47f['t'](_0x1d3af3(0x1b9),{'error':_0x5b231b instanceof Error?_0x5b231b['message']:String(_0x5b231b)}),{'error':_0x5b231b instanceof Error?_0x5b231b[_0x1d3af3(0x1b3)]:String(_0x5b231b)}),{'success':![],'message':_0x5b231b instanceof Error?_0x5b231b[_0x1d3af3(0x1b3)]:String(_0x5b231b)};}}export function configureClaudeMcp(_0x55fc2e){const _0x344bf8=a63_0x38c251;try{const {appcode:_0x45e70e,env:_0x58d939}=getAppConfig();copyAgentsMd(_0x55fc2e);const _0x2a5e9e=buildClaudeMcpCommand(_0x45e70e,_0x58d939),_0x216372=[a63_0x40f47f['t'](_0x344bf8(0x1be)),''+_0x2a5e9e,a63_0x40f47f['t']('mcp.claudeConfig.configInfo'),_0x344bf8(0x1b7)+_0x45e70e];return _0x58d939!==_0x344bf8(0x1a8)&&_0x216372[_0x344bf8(0x198)](a63_0x40f47f['t']('mcp.config.env',{'env':_0x58d939})),_0x216372['push'](a63_0x40f47f['t'](_0x344bf8(0x1bc))),logger[_0x344bf8(0x19f)](_0x344bf8(0x1af),a63_0x40f47f['t'](_0x344bf8(0x196)),{'appcode':_0x45e70e,'env':_0x58d939,'command':_0x2a5e9e}),{'success':!![],'message':_0x216372[_0x344bf8(0x18d)]('\x0a\x20\x20'),'needsManualAction':!![]};}catch(_0x5c0089){return logger[_0x344bf8(0x1a4)](_0x344bf8(0x1af),a63_0x40f47f['t'](_0x344bf8(0x1ac),{'error':_0x5c0089 instanceof Error?_0x5c0089[_0x344bf8(0x1b3)]:String(_0x5c0089)}),{'error':_0x5c0089 instanceof Error?_0x5c0089['message']:String(_0x5c0089)}),{'success':![],'message':_0x5c0089 instanceof Error?_0x5c0089[_0x344bf8(0x1b3)]:String(_0x5c0089)};}}export function showOtherMcpGuide(_0x119979){const _0xd4fcf0=a63_0x38c251;try{const {appcode:_0x3e8ccc,env:_0x25432a}=getAppConfig(),_0x14ff6c=buildMcpServerConfig(_0x3e8ccc,_0x25432a),_0x3802f6=[_0xd4fcf0(0x189)+_0x3e8ccc+'\x22'];_0x25432a!==_0xd4fcf0(0x1a8)&&_0x3802f6[_0xd4fcf0(0x198)](_0xd4fcf0(0x1ad)+_0x25432a+'\x22');const _0x192005=[a63_0x40f47f['t'](_0xd4fcf0(0x1a3),{'appcode':_0x3e8ccc,'env':_0x25432a}),'{','\x20\x20\x22mcpServers\x22:\x20{',_0xd4fcf0(0x18f),'\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,',_0xd4fcf0(0x1bf),'\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{',..._0x3802f6['map'](_0x85433d=>_0xd4fcf0(0x1a9)+_0x85433d+','),'\x20\x20\x20\x20\x20\x20}','\x20\x20\x20\x20}','\x20\x20}','}',a63_0x40f47f['t']('mcp.other.configGuide')];return logger[_0xd4fcf0(0x19f)](_0xd4fcf0(0x19d),a63_0x40f47f['t']('mcp.other.guideShown'),{'appcode':_0x3e8ccc,'env':_0x25432a}),{'success':!![],'message':_0x192005['join']('\x0a'),'needsManualAction':!![]};}catch(_0x3bcf27){return{'success':![],'message':_0x3bcf27 instanceof Error?_0x3bcf27[_0xd4fcf0(0x1b3)]:String(_0x3bcf27)};}}function ensureDir(_0x3c0eb4){!existsSync(_0x3c0eb4)&&mkdirSync(_0x3c0eb4,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a61_0x417cd5=a61_0x4150;(function(_0x3bce8e,_0x503835){const _0x47fbf0=a61_0x4150,_0x499c19=_0x3bce8e();while(!![]){try{const _0x53bd04=-parseInt(_0x47fbf0(0x120))/0x1+parseInt(_0x47fbf0(0xf3))/0x2*(-parseInt(_0x47fbf0(0x10a))/0x3)+parseInt(_0x47fbf0(0x113))/0x4+-parseInt(_0x47fbf0(0x110))/0x5*(parseInt(_0x47fbf0(0x114))/0x6)+parseInt(_0x47fbf0(0x11f))/0x7+-parseInt(_0x47fbf0(0x115))/0x8+parseInt(_0x47fbf0(0x11c))/0x9;if(_0x53bd04===_0x503835)break;else _0x499c19['push'](_0x499c19['shift']());}catch(_0x334791){_0x499c19['push'](_0x499c19['shift']());}}}(a61_0x2977,0xb6f3b));import{jsx as a61_0x1aba55,jsxs as a61_0x5a98d9,Fragment as a61_0x28546c}from'react/jsx-runtime';import{useState,useEffect}from'react';function a61_0x4150(_0xb03a02,_0xb09aea){_0xb03a02=_0xb03a02-0xf1;const _0x297712=a61_0x2977();let _0x4150b6=_0x297712[_0xb03a02];return _0x4150b6;}import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';function a61_0x2977(){const _0x4efbc1=['\x20\x20✓\x20','cyan','正在安装技能包...','24263271PIPpvG','\x20个目录','已选择\x20IDE','1515549HQTflO','1186087GyCavA','installing','stringify','toISOString','.lovrabet','name','message','getSelectedIDEs','26oEtfdK','selectedIndexes','green','../../cdn-source/skills','keys','已安装\x20','size','安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','请至少选择一个\x20IDE','\x20个开发者指南','description','info','done','...','selecting','gray','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','✓\x20拉取\x20','\x20失败:\x20','✓\x20技能包安装成功!共安装\x20','map','label','handleKeyDown','170937wPYLhI','length','正在从\x20CDN\x20拉取开发者指南','warn','setLogPath','setErrorMsg','20xgTrRi','cwd','column','3729952Eyqunn','1494618UZNLup','1378536sbeXfA','log','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','guides'];a61_0x2977=function(){return _0x4efbc1;};return a61_0x2977();}import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a61_0x417cd5(0x107)](_0x58219d=>({'key':_0x58219d,'name':IDE_CONFIGS[_0x58219d][a61_0x417cd5(0x125)],'description':IDE_CONFIGS[_0x58219d][a61_0x417cd5(0xfd)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x39d683}){const _0x2d94c2=a61_0x417cd5,{exit:_0x1f2e0e}=useApp(),[_0x5466a1,_0x46750a]=useState(_0x2d94c2(0x101)),[_0x590eef,_0x4634b2]=useState([]),[_0x15ccb7,_0x312863]=useState([]),[_0x578787,_0x64a928]=useState(0x0),_0x219158=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x5bf022=_0x2d94c2;preselectedIDEs['length']>0x0&&_0x219158[_0x5bf022(0xf4)][_0x5bf022(0xf9)]>0x0&&_0x4c2c0f();},[]),useInput((_0x44c1cb,_0x6bc9e2)=>{const _0x39b6fe=_0x2d94c2;if(_0x5466a1===_0x39b6fe(0x101)){if(_0x44c1cb==='q'||_0x44c1cb==='Q'){_0x1f2e0e();return;}if(_0x6bc9e2['return']){if(_0x219158[_0x39b6fe(0xf4)][_0x39b6fe(0xf9)]===0x0){_0x219158[_0x39b6fe(0x10f)](_0x39b6fe(0xfb));return;}_0x4c2c0f();return;}_0x219158[_0x39b6fe(0x109)](_0x44c1cb,_0x6bc9e2);}_0x5466a1==='done'&&_0x1f2e0e();});async function _0x4c2c0f(){const _0x13f72b=_0x2d94c2,_0x443abc=_0x219158[_0x13f72b(0xf2)]();_0x312863(_0x443abc),_0x4634b2([{'label':_0x13f72b(0x11e),'value':_0x219158['selectedIndexes']['size']+'\x20个'}]),_0x46750a(_0x13f72b(0x121)),await _0x94fec7(_0x443abc);}async function _0x94fec7(_0x14eb30){const _0x2e71c0=_0x2d94c2,_0x53ff3f=process[_0x2e71c0(0x111)](),_0x4fabc7=resolve(__dirname,_0x2e71c0(0xf6));logger[_0x2e71c0(0x10e)](_0x53ff3f);const _0x388277=_0x39d683&&_0x39d683[_0x2e71c0(0x10b)]>0x0;console['log'](_0x2e71c0(0x10c)+(_0x388277?'(含扩展)':'')+_0x2e71c0(0x100));let _0x3b87c6;try{_0x3b87c6=await fetchGuidesFromCDN(_0x388277),console[_0x2e71c0(0x116)](_0x2e71c0(0x104)+Object[_0x2e71c0(0xf7)](_0x3b87c6[_0x2e71c0(0x118)])[_0x2e71c0(0x10b)]+_0x2e71c0(0xfc));}catch(_0x40ada2){console[_0x2e71c0(0x10d)](_0x2e71c0(0x103)+(_0x40ada2 instanceof Error?_0x40ada2['message']:String(_0x40ada2)));}let _0x4cf380=0x0;for(const _0x557bd0 of _0x14eb30){try{const _0x52fcb9=IDE_CONFIGS[_0x557bd0],_0xec31bc=await installSingleIDE(_0x557bd0,_0x52fcb9,_0x53ff3f,_0x4fabc7,_0x3b87c6,_0x39d683);_0x4cf380+=_0xec31bc,_0x64a928(_0x4cf380);}catch(_0x5bb02d){console['error']('\x20\x20✗\x20安装\x20'+_0x557bd0+_0x2e71c0(0x105)+(_0x5bb02d instanceof Error?_0x5bb02d[_0x2e71c0(0xf1)]:String(_0x5bb02d)));}}_0x3b87c6&&writeGuidesToProject(_0x3b87c6,_0x53ff3f,'.lovrabet/skill/.shared/guides',_0x39d683);const _0x38be9c={'version':'2.0.0','installedAt':new Date()[_0x2e71c0(0x123)](),'platforms':_0x14eb30},_0x58b8b9=join(_0x53ff3f,'.lovrabet/skill-manifest.json'),_0x576706=join(_0x53ff3f,_0x2e71c0(0x124));await copyDir(_0x576706,_0x576706),writeFileSync(_0x58b8b9,JSON[_0x2e71c0(0x122)](_0x38be9c,null,0x2),'utf-8'),logger[_0x2e71c0(0xfe)]('skill-install','安装成功',{'projectRoot':_0x53ff3f,'ides':_0x14eb30,'foldersCount':_0x4cf380}),_0x46750a(_0x2e71c0(0xff)),setTimeout(()=>{_0x1f2e0e();},0x3e8);}return a61_0x5a98d9(Box,{'flexDirection':_0x2d94c2(0x112),'marginTop':0x1,'children':[_0x5466a1==='selecting'&&a61_0x1aba55(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x2d94c2(0xfa),'selection':_0x219158}),_0x5466a1===_0x2d94c2(0x121)&&a61_0x1aba55(InstallingStep,{'completedSteps':_0x590eef,'installingIDEs':_0x15ccb7,'installedCount':_0x578787}),_0x5466a1===_0x2d94c2(0xff)&&a61_0x1aba55(DoneStep,{'installedCount':_0x578787})]});}function InstallingStep({completedSteps:_0x4471c4,installingIDEs:_0x27c3a3,installedCount:_0x277db2}){const _0x1c6a02=a61_0x417cd5;return a61_0x5a98d9(a61_0x28546c,{'children':[_0x4471c4[_0x1c6a02(0x107)]((_0x53d4d1,_0x28ac92)=>a61_0x5a98d9(Box,{'children':[a61_0x5a98d9(Text,{'color':_0x1c6a02(0xf5),'children':['√\x20',_0x53d4d1[_0x1c6a02(0x108)],':\x20']}),a61_0x1aba55(Text,{'color':_0x1c6a02(0x11a),'children':_0x53d4d1['value']})]},_0x28ac92)),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'children':_0x1c6a02(0x11b)})}),_0x27c3a3[_0x1c6a02(0x107)](_0x4f1555=>a61_0x5a98d9(Box,{'children':[a61_0x1aba55(Text,{'color':_0x1c6a02(0xf5),'children':_0x1c6a02(0x119)}),a61_0x1aba55(Text,{'children':IDE_CONFIGS[_0x4f1555]?.['name']||_0x4f1555})]},_0x4f1555)),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x5a98d9(Text,{'color':_0x1c6a02(0x102),'children':[_0x1c6a02(0xf8),_0x277db2,_0x1c6a02(0x11d)]})})]});}function DoneStep({installedCount:_0x4dda05}){const _0x2325d3=a61_0x417cd5;return a61_0x5a98d9(a61_0x28546c,{'children':[a61_0x1aba55(Box,{'children':a61_0x5a98d9(Text,{'color':_0x2325d3(0xf5),'children':[_0x2325d3(0x106),_0x4dda05,'\x20个目录']})}),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'color':_0x2325d3(0x102),'children':_0x2325d3(0x117)})}),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'color':'gray','children':'按任意键退出...'})})]});}async function copyDirIfNeeded(_0x5bb6b7,_0x1ab121){try{return await copyDir(_0x5bb6b7,_0x1ab121),!![];}catch{return![];}}
1
+ const a64_0x4cd267=a64_0x2583;(function(_0x7ff148,_0xfd296b){const _0xa103b6=a64_0x2583,_0x546e4f=_0x7ff148();while(!![]){try{const _0x24e0bb=parseInt(_0xa103b6(0x1d8))/0x1+parseInt(_0xa103b6(0x1bc))/0x2+parseInt(_0xa103b6(0x1e2))/0x3+-parseInt(_0xa103b6(0x1d0))/0x4*(parseInt(_0xa103b6(0x1be))/0x5)+parseInt(_0xa103b6(0x1d5))/0x6+parseInt(_0xa103b6(0x1ba))/0x7*(-parseInt(_0xa103b6(0x1b6))/0x8)+parseInt(_0xa103b6(0x1bf))/0x9;if(_0x24e0bb===_0xfd296b)break;else _0x546e4f['push'](_0x546e4f['shift']());}catch(_0x318a9a){_0x546e4f['push'](_0x546e4f['shift']());}}}(a64_0x3426,0xc0770));function a64_0x3426(){const _0x4b6b57=['log','.lovrabet/skill-manifest.json','gray','安装成功','../../cdn-source/skills','8943568jzcscM','length','selectedIndexes','cwd','7OYsxhz','description','415134gWmyXd','skill.installing.progress','770405DmJlLf','984528LUdBlE','skill.error.selectAtLeastOne','setErrorMsg','skill.installing.title','.lovrabet','installing','\x20✓\x20','getSelectedIDEs','skill.done.pressAnyKey','info','map','selecting','skill.error.installFailed','done','skill.cdn.fetchingExtend','column','value','4lTDzHX','green','skill.done.successInline','handleKeyDown','2.0.0','1368540auyWSx','message','skill.select.selectedIDE','561391jACyOb','skill.cdn.fetchFailed','stringify','warn','setLogPath','return','size','keys','skill.installing.installed','skill.cdn.fetching','2861769ArlEqV','toISOString','utf-8','label','skill.done.guidesPathInline','skill.select.count'];a64_0x3426=function(){return _0x4b6b57;};return a64_0x3426();}import{jsx as a64_0x46bfa0,jsxs as a64_0x3815cc,Fragment as a64_0x2ff17f}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';import{useI18n}from'../i18n/hooks.js';function a64_0x2583(_0x37c89a,_0x2d065d){_0x37c89a=_0x37c89a-0x1ad;const _0x34263d=a64_0x3426();let _0x2583a4=_0x34263d[_0x37c89a];return _0x2583a4;}const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a64_0x4cd267(0x1c9)](_0x37ecdf=>({'key':_0x37ecdf,'name':IDE_CONFIGS[_0x37ecdf]['name'],'description':IDE_CONFIGS[_0x37ecdf][a64_0x4cd267(0x1bb)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x12da60}){const _0x12e5ae=a64_0x4cd267,{exit:_0x3b6d19}=useApp(),{t:_0x4562ec}=useI18n(),[_0x5ee1b8,_0x4fbe05]=useState(_0x12e5ae(0x1ca)),[_0x2534f3,_0x153d66]=useState([]),[_0x5f2951,_0x5df356]=useState([]),[_0x3e5469,_0x20c7b6]=useState(0x0),_0x4ff374=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0xd9457a=_0x12e5ae;preselectedIDEs[_0xd9457a(0x1b7)]>0x0&&_0x4ff374['selectedIndexes'][_0xd9457a(0x1de)]>0x0&&_0x33e818();},[]),useInput((_0x50c524,_0xe98a8b)=>{const _0x2f0d75=_0x12e5ae;if(_0x5ee1b8===_0x2f0d75(0x1ca)){if(_0x50c524==='q'||_0x50c524==='Q'){_0x3b6d19();return;}if(_0xe98a8b[_0x2f0d75(0x1dd)]){if(_0x4ff374[_0x2f0d75(0x1b8)][_0x2f0d75(0x1de)]===0x0){_0x4ff374[_0x2f0d75(0x1c1)](_0x4562ec(_0x2f0d75(0x1c0)));return;}_0x33e818();return;}_0x4ff374[_0x2f0d75(0x1d3)](_0x50c524,_0xe98a8b);}_0x5ee1b8===_0x2f0d75(0x1cc)&&_0x3b6d19();});async function _0x33e818(){const _0xbc2bff=_0x12e5ae,_0x401067=_0x4ff374[_0xbc2bff(0x1c6)]();_0x5df356(_0x401067),_0x153d66([{'label':_0x4562ec(_0xbc2bff(0x1d7)),'value':_0x4562ec(_0xbc2bff(0x1b0),{'count':_0x4ff374[_0xbc2bff(0x1b8)]['size']})}]),_0x4fbe05(_0xbc2bff(0x1c4)),await _0x504533(_0x401067);}async function _0x504533(_0x3071ac){const _0x4a1223=_0x12e5ae,_0x336c8e=process[_0x4a1223(0x1b9)](),_0x2bdafb=resolve(__dirname,_0x4a1223(0x1b5));logger[_0x4a1223(0x1dc)](_0x336c8e);const _0x17ef42=_0x12da60&&_0x12da60[_0x4a1223(0x1b7)]>0x0;console['log'](_0x17ef42?_0x4562ec(_0x4a1223(0x1cd)):_0x4562ec(_0x4a1223(0x1e1)));let _0x44177;try{_0x44177=await fetchGuidesFromCDN(_0x17ef42),console[_0x4a1223(0x1b1)](_0x4562ec('skill.cdn.fetchSuccess',{'count':Object[_0x4a1223(0x1df)](_0x44177['guides'])[_0x4a1223(0x1b7)]}));}catch(_0x7a4ef1){console[_0x4a1223(0x1db)](_0x4562ec(_0x4a1223(0x1d9),{'error':_0x7a4ef1 instanceof Error?_0x7a4ef1['message']:String(_0x7a4ef1)}));}let _0x1ce675=0x0;for(const _0x33b622 of _0x3071ac){try{const _0x36493e=IDE_CONFIGS[_0x33b622],_0x1b0b7b=await installSingleIDE(_0x33b622,_0x36493e,_0x336c8e,_0x2bdafb,_0x44177,_0x12da60);_0x1ce675+=_0x1b0b7b,_0x20c7b6(_0x1ce675);}catch(_0x3e0747){console['error'](_0x4562ec(_0x4a1223(0x1cb),{'ide':_0x33b622,'error':_0x3e0747 instanceof Error?_0x3e0747[_0x4a1223(0x1d6)]:String(_0x3e0747)}));}}_0x44177&&writeGuidesToProject(_0x44177,_0x336c8e,'.lovrabet/skill/.shared/guides',_0x12da60);const _0x4b0aae={'version':_0x4a1223(0x1d4),'installedAt':new Date()[_0x4a1223(0x1e3)](),'platforms':_0x3071ac},_0x4e2bec=join(_0x336c8e,_0x4a1223(0x1b2)),_0x5c116b=join(_0x336c8e,_0x4a1223(0x1c3));await copyDir(_0x5c116b,_0x5c116b),writeFileSync(_0x4e2bec,JSON[_0x4a1223(0x1da)](_0x4b0aae,null,0x2),_0x4a1223(0x1ad)),logger[_0x4a1223(0x1c8)]('skill-install',_0x4a1223(0x1b4),{'projectRoot':_0x336c8e,'ides':_0x3071ac,'foldersCount':_0x1ce675}),_0x4fbe05(_0x4a1223(0x1cc)),setTimeout(()=>{_0x3b6d19();},0x3e8);}return a64_0x3815cc(Box,{'flexDirection':_0x12e5ae(0x1ce),'marginTop':0x1,'children':[_0x5ee1b8===_0x12e5ae(0x1ca)&&a64_0x46bfa0(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x4562ec(_0x12e5ae(0x1c2)),'selection':_0x4ff374}),_0x5ee1b8==='installing'&&a64_0x46bfa0(InstallingStep,{'completedSteps':_0x2534f3,'installingIDEs':_0x5f2951,'installedCount':_0x3e5469}),_0x5ee1b8===_0x12e5ae(0x1cc)&&a64_0x46bfa0(DoneStep,{'installedCount':_0x3e5469})]});}function InstallingStep({completedSteps:_0x37db61,installingIDEs:_0x21f6e8,installedCount:_0x1ff7c2}){const _0x2e17ad=a64_0x4cd267,{t:_0x117ccf}=useI18n();return a64_0x3815cc(a64_0x2ff17f,{'children':[_0x37db61[_0x2e17ad(0x1c9)]((_0x16bdf3,_0x2f1c58)=>a64_0x3815cc(Box,{'children':[a64_0x3815cc(Text,{'color':_0x2e17ad(0x1d1),'children':['√\x20',_0x16bdf3[_0x2e17ad(0x1ae)],':\x20']}),a64_0x46bfa0(Text,{'color':'cyan','children':_0x16bdf3[_0x2e17ad(0x1cf)]})]},_0x2f1c58)),a64_0x46bfa0(Box,{'marginTop':0x1,'children':a64_0x46bfa0(Text,{'children':_0x117ccf(_0x2e17ad(0x1bd))})}),_0x21f6e8[_0x2e17ad(0x1c9)](_0x3744fe=>a64_0x3815cc(Box,{'children':[a64_0x46bfa0(Text,{'color':_0x2e17ad(0x1d1),'children':_0x2e17ad(0x1c5)}),a64_0x46bfa0(Text,{'children':IDE_CONFIGS[_0x3744fe]?.['name']||_0x3744fe})]},_0x3744fe)),a64_0x46bfa0(Box,{'marginTop':0x1,'children':a64_0x46bfa0(Text,{'color':'gray','children':_0x117ccf(_0x2e17ad(0x1e0),{'count':_0x1ff7c2})})})]});}function DoneStep({installedCount:_0x4cf0f9}){const _0x4d6681=a64_0x4cd267,{t:_0x1bec5b}=useI18n();return a64_0x3815cc(a64_0x2ff17f,{'children':[a64_0x46bfa0(Box,{'children':a64_0x46bfa0(Text,{'color':_0x4d6681(0x1d1),'children':_0x1bec5b(_0x4d6681(0x1d2),{'count':_0x4cf0f9})})}),a64_0x46bfa0(Box,{'marginTop':0x1,'children':a64_0x46bfa0(Text,{'color':_0x4d6681(0x1b3),'children':_0x1bec5b(_0x4d6681(0x1af))})}),a64_0x46bfa0(Box,{'marginTop':0x1,'children':a64_0x46bfa0(Text,{'color':_0x4d6681(0x1b3),'children':_0x1bec5b(_0x4d6681(0x1c7))})})]});}async function copyDirIfNeeded(_0x2d4115,_0x360d05){try{return await copyDir(_0x2d4115,_0x360d05),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x14d620,_0x50cb45){const _0x1a6a09=a62_0x5a00,_0x29aa22=_0x14d620();while(!![]){try{const _0x173768=-parseInt(_0x1a6a09(0xfb))/0x1*(parseInt(_0x1a6a09(0x149))/0x2)+-parseInt(_0x1a6a09(0x14a))/0x3+parseInt(_0x1a6a09(0x11e))/0x4+parseInt(_0x1a6a09(0x144))/0x5*(parseInt(_0x1a6a09(0x11c))/0x6)+-parseInt(_0x1a6a09(0x124))/0x7+parseInt(_0x1a6a09(0x100))/0x8*(-parseInt(_0x1a6a09(0x10a))/0x9)+parseInt(_0x1a6a09(0x11f))/0xa*(parseInt(_0x1a6a09(0x106))/0xb);if(_0x173768===_0x50cb45)break;else _0x29aa22['push'](_0x29aa22['shift']());}catch(_0x2ce8ab){_0x29aa22['push'](_0x29aa22['shift']());}}}(a62_0x17da,0x49bfe));import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{createInterface}from'node:readline';function a62_0x5a00(_0x2e5a79,_0x7aedc5){_0x2e5a79=_0x2e5a79-0xf4;const _0x17da48=a62_0x17da();let _0x5a0078=_0x17da48[_0x2e5a79];return _0x5a0078;}import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';function a62_0x17da(){const _0x4ea346=['from','.lovrabet/skill/.shared/guides','输入格式:\x20输入编号,用空格分隔\x20(例如:\x201\x203\x205)','✓\x20创建\x20.lovrabet/skill-manifest.json','--help','keys','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','8286AiMvgO','stdout','path','✓\x20拉取\x20','stdin','2128dcFIqq','\x20\x20✓\x20创建\x20','includes','entries','⚠️\x20\x20未知的平台:\x20','\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择\x20IDE','924TrHiKV','\x20\x20q.\x20取消\x0a','\x20\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20#\x20直接安装指定\x20IDE\x20的技能包','argv','2925pIoPSJ','错误:\x20不支持的命令:\x20','guides','some','warn','slice','skill-install','stringify','\x20个目录\x0a','trim','(含扩展)','\x20\x20✗\x20安装\x20','setLogPath','log','exit','-$1','.lovrabet','utf-8','159516TvOHDx','不支持的命令:\x20','913828hcbKYR','75410BIeFal','info','\x20\x20.lovrabet/skill/.shared/guides/\x20-\x20详细开发指南\x0a',',使用通用模板','\x0a没有有效的\x20IDE\x20需要安装\x0a','1615978lRCQfv','\x0a📦\x20正在安装\x20','description','length','\x0a✓\x20技能包安装成功!共安装\x20','install','message','startsWith','...\x0a','使用示例:','\x0a未选择任何\x20IDE,安装取消\x0a','\x20个开发者指南','\x0aLovrabet\x20Skill\x20-\x20开发者技能包安装工具\x0a\x0a用法:\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并安装技能包\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20直接安装指定\x20IDE\x20的技能包\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20安装所有技能包\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20包含\x20Backend\x20Function\x20同步工作流\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\x20skill\x20install\x0a\x20\x20\x20\x20→\x20使用\x20↑↓\x20移动光标,空格选中/取消,Enter\x20确认\x0a\x20\x20\x20\x20→\x20按\x20a\x20全选,按\x20i/r\x20反选,按\x20q\x20退出\x0a\x0a\x20\x20直接安装指定\x20IDE\x20(支持多个)\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接安装\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20安装\x20Cursor\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20安装多个\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20安装全部\x0a\x0a\x20\x20包含\x20Backend\x20Function\x20同步工作流\x20\x20\x20-\x20使用\x20--dangerously-bff-save\x20标志\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a支持的\x20IDE:\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20其他\x20(通用模板)\x20(.agent/skills/)\x20-\x20兜底方案\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20安装所有\x20IDE\x20技能包(包括通用模板)\x0a\x0a选项:\x0a\x20\x20--dangerously-bff-save\x20\x20\x20\x20包含\x20Backend\x20Function\x20同步工作流指南\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\x20(需要\x20MCP\x20服务器启用相应\x20tools)\x0a\x0a技能包内容包括:\x0a\x20\x20-\x20Filter\x20查询构建规范\x20(10\x20种常见错误对照)\x0a\x20\x20-\x20MCP\x20SQL\x20创建工作流\x20(5\x20步强制流程)\x0a\x20\x20-\x20AntD\x20UI\x20开发规范\x20(禁止\x20AI\x20味道)\x0a\x20\x20-\x20API\x20集成指南\x20(lovrabet\x20api\x20pull\x20流程)\x0a\x20\x20-\x20菜单管理指南\x20(menu\x20sync/update\x20流程)\x0a\x20\x20-\x20Backend\x20Function\x20脚本编写规范\x20(权限过滤、数据脱敏、业务逻辑)\x0a\x20\x20-\x20Backend\x20Function\x20同步工作流\x20(需\x20--dangerously-bff-save\x20启用)\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a\x20\x20\x20\x20→\x20交互式选择\x20IDE\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a\x20\x20\x20\x20→\x20直接安装\x20Cursor\x20和\x20claude\x20code\x20技能包\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20→\x20安装技能包并包含\x20Backend\x20Function\x20同步工作流\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a\x20\x20\x20\x20→\x20安装所有\x20IDE\x20技能包\x0a\x0a安装后会在项目中创建:\x0a\x20\x20-\x20IDE\x20特定配置文件\x20(.cursorrules,\x20.windsurf/,\x20.claude/,\x20.cline/,\x20.codex/,\x20.opencode/,\x20.qoder/,\x20.codebuddy/,\x20.trae/)\x0a\x20\x20-\x20.lovrabet/skill/.shared/guides/\x20\x20-\x20开发者技能指南\x0a\x0a开发者指南位置:\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20','help','split','replace','正在从\x20CDN\x20拉取开发者指南','.lovrabet/skill-manifest.json','\x20\x20lovrabet\x20skill\x20install\x20cursor\x20\x20\x20\x20#\x20直接安装\x20Cursor\x20技能包\x0a','...','../../cdn-source/skills','push','toLowerCase','\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并安装技能包','quit','\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','folders','agent','files','forEach','cwd','close','30MNkvGS','开发者指南位置:','question','name','all','2OIQPqK','1181247sxuUHO'];a62_0x17da=function(){return _0x4ea346;};return a62_0x17da();}import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x17e27f){const _0x1aea06=a62_0x5a00,_0x562a82=[];for(const [_0x1fcfcb,_0x52afc9]of Object[_0x1aea06(0x103)](_0x17e27f)){if(_0x52afc9===!![]){const _0x30491e=_0x1fcfcb[_0x1aea06(0x133)](/([A-Z])/g,_0x1aea06(0x119))[_0x1aea06(0x13a)]();_0x562a82[_0x1aea06(0x139)](_0x30491e);}}return _0x562a82;}export function parseDynamicFlags(){const _0x166ede=a62_0x5a00,_0x38bcee=[];for(let _0x2a55fc=0x3;_0x2a55fc<process[_0x166ede(0x109)]['length'];_0x2a55fc++){const _0x1f67b1=process[_0x166ede(0x109)][_0x2a55fc];if(_0x1f67b1&&_0x1f67b1[_0x166ede(0x12b)]('--')){const _0x17a4b8=_0x1f67b1[_0x166ede(0x10f)](0x2);_0x17a4b8&&!_0x17a4b8[_0x166ede(0x102)]('=')&&_0x38bcee[_0x166ede(0x139)](_0x17a4b8);}}return _0x38bcee;}export function getAllProvidedFlags(_0x9287b1){const _0x2e1988=a62_0x5a00,_0xe18e8d=camelCaseFlagsToKebab(_0x9287b1),_0x131dcb=parseDynamicFlags(),_0x3ff72b=new Set([..._0xe18e8d,..._0x131dcb]);return Array[_0x2e1988(0xf4)](_0x3ff72b);}export async function skillsCommand(_0x4d47e0,_0x47d6b7,_0x3bb52d){const _0x2fff7b=a62_0x5a00;logger[_0x2fff7b(0x116)](process[_0x2fff7b(0x142)]());if(_0x3bb52d?.[_0x2fff7b(0x131)]||_0x4d47e0===_0x2fff7b(0xf8)){showHelp();return;}_0x4d47e0!==_0x2fff7b(0x129)&&(console['error'](_0x2fff7b(0x10b)+(_0x4d47e0||'(空)')),console[_0x2fff7b(0x117)]('\x0a可用命令:'),console['log'](_0x2fff7b(0x13b)),console[_0x2fff7b(0x117)](_0x2fff7b(0x108)),console[_0x2fff7b(0x117)](_0x2fff7b(0x13d)),console[_0x2fff7b(0x117)](_0x2fff7b(0x12d)),console[_0x2fff7b(0x117)](_0x2fff7b(0x105)),console[_0x2fff7b(0x117)](_0x2fff7b(0x136)),logger['error']('skill',_0x2fff7b(0x11d)+_0x4d47e0),process[_0x2fff7b(0x118)](0x1));let _0x4c5a1a=_0x47d6b7?.[0x0];const _0x4b11b6=getAllProvidedFlags(_0x3bb52d??{});_0x4c5a1a?.[_0x2fff7b(0x12b)]('--')&&(_0x4c5a1a=undefined),await installSkill(_0x4c5a1a??'agent',_0x4b11b6);}async function selectIDEs(){const _0x119d24=a62_0x5a00;return console[_0x119d24(0x117)]('\x0a请选择要安装技能包的\x20IDE\x20(可多选):\x0a'),CORE_IDE_LIST[_0x119d24(0x141)]((_0x453c26,_0x5af22d)=>{const _0x8a0b99=_0x119d24;console[_0x8a0b99(0x117)]('\x20\x20'+(_0x5af22d+0x1)+'.\x20'+IDE_CONFIGS[_0x453c26]['name']+'\x20-\x20'+IDE_CONFIGS[_0x453c26][_0x8a0b99(0x126)]);}),console['log']('\x20\x200.\x20全部安装'),console[_0x119d24(0x117)](_0x119d24(0x107)),console[_0x119d24(0x117)](_0x119d24(0xf6)),console[_0x119d24(0x117)]('输入\x200\x20安装所有\x20IDE,输入\x20q\x20取消\x0a'),new Promise(_0x528e46=>{const _0x59cf48=_0x119d24,_0x21bdbe=createInterface({'input':process[_0x59cf48(0xff)],'output':process[_0x59cf48(0xfc)]});_0x21bdbe[_0x59cf48(0x146)]('请选择:\x20',_0x4661a8=>{const _0x3e23e8=_0x59cf48;_0x21bdbe[_0x3e23e8(0x143)]();const _0x5e3c2f=_0x4661a8[_0x3e23e8(0x113)]()[_0x3e23e8(0x13a)]();(_0x5e3c2f==='q'||_0x5e3c2f===_0x3e23e8(0x13c)||_0x5e3c2f===_0x3e23e8(0x118))&&(console[_0x3e23e8(0x117)]('\x0a已取消安装\x0a'),process[_0x3e23e8(0x118)](0x0));if(_0x5e3c2f==='0'||_0x5e3c2f==='all'){_0x528e46([_0x3e23e8(0x148)]);return;}const _0x488a65=_0x5e3c2f[_0x3e23e8(0x132)](/\s+/)['filter'](Boolean),_0x435031=[];for(const _0x52f14e of _0x488a65){const _0xab3a90=parseInt(_0x52f14e,0xa);if(!isNaN(_0xab3a90)&&_0xab3a90>=0x1&&_0xab3a90<=CORE_IDE_LIST[_0x3e23e8(0x127)]){const _0x358b93=CORE_IDE_LIST[_0xab3a90-0x1];_0x358b93&&!_0x435031['includes'](_0x358b93)&&_0x435031['push'](_0x358b93);}}_0x435031[_0x3e23e8(0x127)]===0x0&&(console[_0x3e23e8(0x117)](_0x3e23e8(0x12e)),process['exit'](0x0)),_0x528e46(_0x435031);});});}function showHelp(){const _0x50cf9b=a62_0x5a00;console[_0x50cf9b(0x117)](_0x50cf9b(0x130));}async function installSkill(_0x3bf829,_0x2abdd8){const _0x5dfb9b=a62_0x5a00,_0x2e4696=process[_0x5dfb9b(0x142)](),_0x284b3c=resolve(__dirname,_0x5dfb9b(0x138));let _0x5404ca=[];!_0x3bf829?_0x5404ca=await selectIDEs():_0x5404ca=[_0x3bf829];_0x5404ca[_0x5dfb9b(0x102)](_0x5dfb9b(0x148))&&(_0x5404ca=[...ALL_CORE_IDES,_0x5dfb9b(0x13f)]);const _0x59bd93=[];for(const _0x2408a7 of _0x5404ca){if(_0x2408a7==='agent')_0x59bd93['push'](_0x5dfb9b(0x13f));else{if(_0x2408a7===_0x5dfb9b(0x148))continue;else IDE_CONFIGS[_0x2408a7]?_0x59bd93[_0x5dfb9b(0x139)](_0x2408a7):(console[_0x5dfb9b(0x117)](_0x5dfb9b(0x104)+_0x2408a7+_0x5dfb9b(0x122)),_0x59bd93[_0x5dfb9b(0x139)](_0x5dfb9b(0x13f)));}}_0x59bd93['length']===0x0&&(console[_0x5dfb9b(0x117)](_0x5dfb9b(0x123)),process[_0x5dfb9b(0x118)](0x0));const _0x2e67fd=_0x2abdd8&&_0x2abdd8['length']>0x0;console[_0x5dfb9b(0x117)](_0x5dfb9b(0x134)+(_0x2e67fd?_0x5dfb9b(0x114):'')+_0x5dfb9b(0x137));let _0x427263;try{_0x427263=await fetchGuidesFromCDN(_0x2e67fd),console[_0x5dfb9b(0x117)](_0x5dfb9b(0xfe)+Object[_0x5dfb9b(0xf9)](_0x427263[_0x5dfb9b(0x10c)])['length']+_0x5dfb9b(0x12f));}catch(_0x1d9ce0){console[_0x5dfb9b(0x10e)](_0x5dfb9b(0xfa)+(_0x1d9ce0 instanceof Error?_0x1d9ce0[_0x5dfb9b(0x12a)]:String(_0x1d9ce0)));}let _0x5a4f98=0x0;for(const _0x4ce9dc of _0x59bd93){try{const _0x1f1209=_0x4ce9dc==='agent'?'通用模板':IDE_CONFIGS[_0x4ce9dc]?.[_0x5dfb9b(0x147)]||_0x4ce9dc;console[_0x5dfb9b(0x117)](_0x5dfb9b(0x125)+_0x1f1209+_0x5dfb9b(0x12c));const _0x3a29de=_0x4ce9dc===_0x5dfb9b(0x13f)?undefined:IDE_CONFIGS[_0x4ce9dc],_0x3e74ad=await installSingleIDE(_0x4ce9dc,_0x3a29de,_0x2e4696,_0x284b3c,_0x427263,_0x2abdd8);_0x5a4f98+=_0x3e74ad;if(_0x3a29de?.[_0x5dfb9b(0x13e)])for(const _0x14add5 of _0x3a29de[_0x5dfb9b(0x13e)]){const _0x1966f7=_0x3a29de[_0x5dfb9b(0x140)]?.[_0x5dfb9b(0x10d)](_0x4f369d=>_0x4f369d['path'][_0x5dfb9b(0x12b)](_0x14add5+'/'))??![];_0x1966f7?console[_0x5dfb9b(0x117)](_0x5dfb9b(0x101)+_0x14add5+'/'):console[_0x5dfb9b(0x117)]('\x20\x20✓\x20创建\x20'+_0x14add5);}if(_0x3a29de?.[_0x5dfb9b(0x140)])for(const _0x119c25 of _0x3a29de[_0x5dfb9b(0x140)]){console[_0x5dfb9b(0x117)](_0x5dfb9b(0x101)+_0x119c25[_0x5dfb9b(0xfd)]);}}catch(_0x5edf24){console['error'](_0x5dfb9b(0x115)+_0x4ce9dc+'\x20失败:\x20'+(_0x5edf24 instanceof Error?_0x5edf24[_0x5dfb9b(0x12a)]:String(_0x5edf24)));}}_0x427263&&writeGuidesToProject(_0x427263,_0x2e4696,_0x5dfb9b(0xf5),_0x2abdd8);const _0x351367={'version':'2.0.0','installedAt':new Date()['toISOString'](),'platforms':_0x59bd93},_0x11a5eb=join(_0x2e4696,_0x5dfb9b(0x135)),_0x4c0a4b=join(_0x2e4696,_0x5dfb9b(0x11a));await copyDir(_0x4c0a4b,_0x4c0a4b),writeFileSync(_0x11a5eb,JSON[_0x5dfb9b(0x111)](_0x351367,null,0x2),_0x5dfb9b(0x11b)),console[_0x5dfb9b(0x117)](_0x5dfb9b(0xf7)),console[_0x5dfb9b(0x117)](_0x5dfb9b(0x128)+_0x5a4f98+_0x5dfb9b(0x112)),console[_0x5dfb9b(0x117)](_0x5dfb9b(0x145)),console[_0x5dfb9b(0x117)](_0x5dfb9b(0x121)),logger[_0x5dfb9b(0x120)](_0x5dfb9b(0x110),'安装成功',{'projectRoot':_0x2e4696,'ides':_0x59bd93,'foldersCount':_0x5a4f98});}
1
+ const a65_0x5a5c0d=a65_0x2f81;(function(_0x110200,_0x16a7b8){const _0x4ec2bc=a65_0x2f81,_0x33ac09=_0x110200();while(!![]){try{const _0x4bb4c0=-parseInt(_0x4ec2bc(0xfd))/0x1+parseInt(_0x4ec2bc(0x107))/0x2*(parseInt(_0x4ec2bc(0x10d))/0x3)+-parseInt(_0x4ec2bc(0xf5))/0x4+-parseInt(_0x4ec2bc(0x117))/0x5*(-parseInt(_0x4ec2bc(0xe5))/0x6)+-parseInt(_0x4ec2bc(0xbd))/0x7*(parseInt(_0x4ec2bc(0xfa))/0x8)+parseInt(_0x4ec2bc(0x106))/0x9+parseInt(_0x4ec2bc(0xcc))/0xa*(parseInt(_0x4ec2bc(0x120))/0xb);if(_0x4bb4c0===_0x16a7b8)break;else _0x33ac09['push'](_0x33ac09['shift']());}catch(_0x21d525){_0x33ac09['push'](_0x33ac09['shift']());}}}(a65_0x2e8d,0x84cf9));import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';function a65_0x2e8d(){const _0x2dc67b=['all','--help','14680aqcUUu','skill.errorHint.installDirect','argv','434440AnKZcQ','split','toLowerCase','skill.help.bffOption','stdin','skill.error.unsupportedCommand','startsWith','skill.help.title','skill.done.guidesLocation','2461455TecPcI','44LYGStB','不支持的命令:\x20','exit','skill.help.installInteractive','question','\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20','105177WQUWbu','error','skill.help.showHelp','.lovrabet','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a','trim','replace','skill.select.inputFormat','\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a','skill.help.afterInstallList','5406955POHrrY','\x20\x20q.\x20','skill.help.installDirect','cwd','skill.help.exampleInteractive','name','skill.help.guidesLocationTitle','.lovrabet/skill/.shared/guides','skill.help.options','319cJQPJo','skill.error.installFailed','stringify','skill.error.unknownPlatform','message','skill.select.inputHint','path','安装成功','bind','\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.installing.created','skill.generic','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a','skill.cdn.fetchSuccess','files','forEach','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','../../cdn-source/skills','3143MbZzzV','skill.select.cancel','skill.help.exampleAllDesc','skill.errorHint.showHelp','\x20\x200.\x20','warn','skill.help.usage','skill.help.installAll','skill.help.skillContentsList','skill.select.title','skill.cdn.fetchFailed','skill.done.guidesPath','skill-install','setLogPath','\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20','12350iDbtbv','help','(empty)','includes','skill.help.skillContents','skill.errorHint.exampleDirect','guides','skill.help.exampleBffDesc','skill.help.interactiveKeys','skill.help.exampleDirectDesc','-$1','skill.help.examples','\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.installing.createdManifest','skill.cdn.fetching','info','\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.errorHint.installInteractive','skill.installing.ide','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20','length','skill.errorHint.usageExamples','push','install','skill.help.afterInstall','6XIoTBY','skill.help.directInstall','close','folders','skill.help.installMethods','skill','entries','filter','skill.installing.createdDir','utf-8','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','agent','skill.help.agentDesc','stdout','\x20-\x20','.lovrabet/skill-manifest.json','1438604uMPUVx','slice','log'];a65_0x2e8d=function(){return _0x2dc67b;};return a65_0x2e8d();}import{dirname}from'node:path';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a65_0x213355 from'../i18n/index.js';const t=a65_0x213355['t'][a65_0x5a5c0d(0x128)](a65_0x213355),__dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x2ac50b){const _0x2563db=a65_0x5a5c0d,_0x438fd2=[];for(const [_0xd000f9,_0x384482]of Object[_0x2563db(0xeb)](_0x2ac50b)){if(_0x384482===!![]){const _0x221d89=_0xd000f9[_0x2563db(0x113)](/([A-Z])/g,_0x2563db(0xd6))[_0x2563db(0xff)]();_0x438fd2[_0x2563db(0xe2)](_0x221d89);}}return _0x438fd2;}export function parseDynamicFlags(){const _0x50d73b=a65_0x5a5c0d,_0x5a65e1=[];for(let _0xe199bf=0x3;_0xe199bf<process['argv'][_0x50d73b(0xe0)];_0xe199bf++){const _0x130cf9=process[_0x50d73b(0xfc)][_0xe199bf];if(_0x130cf9&&_0x130cf9['startsWith']('--')){const _0x49a73b=_0x130cf9[_0x50d73b(0xf6)](0x2);_0x49a73b&&!_0x49a73b[_0x50d73b(0xcf)]('=')&&_0x5a65e1[_0x50d73b(0xe2)](_0x49a73b);}}return _0x5a65e1;}function a65_0x2f81(_0x2a80c1,_0x172fcb){_0x2a80c1=_0x2a80c1-0xbd;const _0x2e8d6d=a65_0x2e8d();let _0x2f8113=_0x2e8d6d[_0x2a80c1];return _0x2f8113;}export function getAllProvidedFlags(_0x523eb6){const _0x3e3252=camelCaseFlagsToKebab(_0x523eb6),_0x3c6db3=parseDynamicFlags(),_0x37e135=new Set([..._0x3e3252,..._0x3c6db3]);return Array['from'](_0x37e135);}export async function skillsCommand(_0x34aeed,_0x368392,_0x230f2b){const _0x37ed33=a65_0x5a5c0d;logger[_0x37ed33(0xca)](process[_0x37ed33(0x11a)]());if(_0x230f2b?.[_0x37ed33(0xcd)]||_0x34aeed===_0x37ed33(0xf9)){showHelp();return;}_0x34aeed!==_0x37ed33(0xe3)&&(console[_0x37ed33(0x10e)](t(_0x37ed33(0x102),{'cmd':_0x34aeed||_0x37ed33(0xce)})),console[_0x37ed33(0xf7)](t('skill.errorHint.availableCommands')),console[_0x37ed33(0xf7)](t(_0x37ed33(0xdd))),console[_0x37ed33(0xf7)](t(_0x37ed33(0xfb))),console[_0x37ed33(0xf7)](t(_0x37ed33(0xc0))),console[_0x37ed33(0xf7)](t(_0x37ed33(0xe1))),console[_0x37ed33(0xf7)](t('skill.errorHint.exampleInteractive')),console[_0x37ed33(0xf7)](t(_0x37ed33(0xd1))),logger['error'](_0x37ed33(0xea),_0x37ed33(0x108)+_0x34aeed),process[_0x37ed33(0x109)](0x1));let _0x4fc536=_0x368392?.[0x0];const _0x313af2=getAllProvidedFlags(_0x230f2b??{});_0x4fc536?.[_0x37ed33(0x103)]('--')&&(_0x4fc536=undefined),await installSkill(_0x4fc536??_0x37ed33(0xf0),_0x313af2);}async function selectIDEs(){const _0x5d9c1c=a65_0x5a5c0d;return console[_0x5d9c1c(0xf7)](t(_0x5d9c1c(0xc6))),CORE_IDE_LIST[_0x5d9c1c(0x12f)]((_0x1d79a5,_0x44135e)=>{const _0x71c6db=_0x5d9c1c;console[_0x71c6db(0xf7)]('\x20\x20'+(_0x44135e+0x1)+'.\x20'+IDE_CONFIGS[_0x1d79a5]['name']+_0x71c6db(0xf3)+IDE_CONFIGS[_0x1d79a5]['description']);}),console[_0x5d9c1c(0xf7)](_0x5d9c1c(0xc1)+t('skill.select.installAll')),console[_0x5d9c1c(0xf7)](_0x5d9c1c(0x118)+t(_0x5d9c1c(0xbe))+'\x0a'),console[_0x5d9c1c(0xf7)](t(_0x5d9c1c(0x114))),console[_0x5d9c1c(0xf7)](t(_0x5d9c1c(0x125))),new Promise(_0x287e33=>{const _0x1b2a38=_0x5d9c1c,_0x2a0bad=createInterface({'input':process[_0x1b2a38(0x101)],'output':process[_0x1b2a38(0xf2)]});_0x2a0bad[_0x1b2a38(0x10b)](t('skill.select.prompt'),_0x22285c=>{const _0x57ad2f=_0x1b2a38;_0x2a0bad[_0x57ad2f(0xe7)]();const _0x3c4b84=_0x22285c[_0x57ad2f(0x112)]()[_0x57ad2f(0xff)]();(_0x3c4b84==='q'||_0x3c4b84==='quit'||_0x3c4b84===_0x57ad2f(0x109))&&(console[_0x57ad2f(0xf7)](t('skill.select.cancelled')),process[_0x57ad2f(0x109)](0x0));if(_0x3c4b84==='0'||_0x3c4b84===_0x57ad2f(0xf8)){_0x287e33([_0x57ad2f(0xf8)]);return;}const _0x34875c=_0x3c4b84[_0x57ad2f(0xfe)](/\s+/)[_0x57ad2f(0xec)](Boolean),_0x3dcfd7=[];for(const _0x3c632e of _0x34875c){const _0x3308c1=parseInt(_0x3c632e,0xa);if(!isNaN(_0x3308c1)&&_0x3308c1>=0x1&&_0x3308c1<=CORE_IDE_LIST['length']){const _0x238c2=CORE_IDE_LIST[_0x3308c1-0x1];_0x238c2&&!_0x3dcfd7[_0x57ad2f(0xcf)](_0x238c2)&&_0x3dcfd7[_0x57ad2f(0xe2)](_0x238c2);}}_0x3dcfd7[_0x57ad2f(0xe0)]===0x0&&(console[_0x57ad2f(0xf7)](t('skill.select.noneSelected')),process[_0x57ad2f(0x109)](0x0)),_0x287e33(_0x3dcfd7);});});}function showHelp(){const _0x18d4fc=a65_0x5a5c0d;console[_0x18d4fc(0xf7)]('\x0a'+t(_0x18d4fc(0x104))+'\x0a\x0a'+t(_0x18d4fc(0xc3))+_0x18d4fc(0xdc)+t(_0x18d4fc(0x10f))+'\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t(_0x18d4fc(0x10a))+_0x18d4fc(0x129)+t(_0x18d4fc(0x119))+_0x18d4fc(0xd8)+t(_0x18d4fc(0xc4))+'\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20'+t('skill.help.installWithBff')+'\x0a\x0a'+t(_0x18d4fc(0xe9))+'\x0a'+t('skill.help.interactiveSelect')+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x0a'+t(_0x18d4fc(0xd4))+'\x0a\x0a'+t(_0x18d4fc(0xe6))+_0x18d4fc(0x130)+t('skill.help.installDirect')+_0x18d4fc(0xdf)+t(_0x18d4fc(0xc4))+_0x18d4fc(0xef)+t(_0x18d4fc(0xc4))+'\x0a\x0a'+t('skill.help.bffWorkflow')+_0x18d4fc(0x111)+t('skill.help.supportedIDEs')+_0x18d4fc(0x10c)+t(_0x18d4fc(0xf1))+'\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.allDesc')+'\x0a\x0a'+t(_0x18d4fc(0x11f))+'\x0a'+t(_0x18d4fc(0x100))+'\x0a\x0a'+t(_0x18d4fc(0xd0))+'\x0a'+t(_0x18d4fc(0xc5))+'\x0a\x0a'+t(_0x18d4fc(0xd7))+_0x18d4fc(0x115)+t(_0x18d4fc(0x11b))+_0x18d4fc(0x12c)+t(_0x18d4fc(0xd5))+'\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a'+t(_0x18d4fc(0xd3))+'\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a'+t(_0x18d4fc(0xbf))+'\x0a\x0a'+t(_0x18d4fc(0xe4))+'\x0a'+t(_0x18d4fc(0x116))+'\x0a\x0a'+t(_0x18d4fc(0x11d))+_0x18d4fc(0xcb));}async function installSkill(_0x51f979,_0x2d09dc){const _0x511045=a65_0x5a5c0d,_0x55b853=process['cwd'](),_0x130f7e=resolve(__dirname,_0x511045(0x131));let _0x48dd10=[];!_0x51f979?_0x48dd10=await selectIDEs():_0x48dd10=[_0x51f979];_0x48dd10[_0x511045(0xcf)](_0x511045(0xf8))&&(_0x48dd10=[...ALL_CORE_IDES,_0x511045(0xf0)]);const _0x3788e5=[];for(const _0x592e5e of _0x48dd10){if(_0x592e5e==='agent')_0x3788e5[_0x511045(0xe2)](_0x511045(0xf0));else{if(_0x592e5e===_0x511045(0xf8))continue;else IDE_CONFIGS[_0x592e5e]?_0x3788e5[_0x511045(0xe2)](_0x592e5e):(console[_0x511045(0xf7)](t(_0x511045(0x123),{'ide':_0x592e5e})),_0x3788e5[_0x511045(0xe2)](_0x511045(0xf0)));}}_0x3788e5['length']===0x0&&(console[_0x511045(0xf7)](t('skill.error.noValidIDE')),process[_0x511045(0x109)](0x0));const _0xb2f7d4=_0x2d09dc&&_0x2d09dc[_0x511045(0xe0)]>0x0;console['log'](_0xb2f7d4?t('skill.cdn.fetchingExtend'):t(_0x511045(0xda)));let _0x41a741;try{_0x41a741=await fetchGuidesFromCDN(_0xb2f7d4),console[_0x511045(0xf7)](t(_0x511045(0x12d),{'count':Object['keys'](_0x41a741[_0x511045(0xd2)])[_0x511045(0xe0)]}));}catch(_0x26dcd0){console[_0x511045(0xc2)](t(_0x511045(0xc7),{'error':_0x26dcd0 instanceof Error?_0x26dcd0[_0x511045(0x124)]:String(_0x26dcd0)}));}let _0x5290be=0x0;for(const _0x554160 of _0x3788e5){try{const _0x838e5c=_0x554160===_0x511045(0xf0)?t(_0x511045(0x12b)):IDE_CONFIGS[_0x554160]?.[_0x511045(0x11c)]||_0x554160;console['log'](t(_0x511045(0xde),{'name':_0x838e5c}));const _0x44414a=_0x554160===_0x511045(0xf0)?undefined:IDE_CONFIGS[_0x554160],_0x351c85=await installSingleIDE(_0x554160,_0x44414a,_0x55b853,_0x130f7e,_0x41a741,_0x2d09dc);_0x5290be+=_0x351c85;if(_0x44414a?.[_0x511045(0xe8)])for(const _0x11e89e of _0x44414a['folders']){const _0x1fef50=_0x44414a[_0x511045(0x12e)]?.['some'](_0x2a26cf=>_0x2a26cf['path'][_0x511045(0x103)](_0x11e89e+'/'))??![];_0x1fef50?console[_0x511045(0xf7)](t(_0x511045(0xed),{'path':_0x11e89e})):console[_0x511045(0xf7)](t(_0x511045(0x12a),{'path':_0x11e89e}));}if(_0x44414a?.[_0x511045(0x12e)])for(const _0x39d599 of _0x44414a['files']){console[_0x511045(0xf7)](t(_0x511045(0x12a),{'path':_0x39d599[_0x511045(0x126)]}));}}catch(_0x5a9b8e){console[_0x511045(0x10e)](t(_0x511045(0x121),{'ide':_0x554160,'error':_0x5a9b8e instanceof Error?_0x5a9b8e[_0x511045(0x124)]:String(_0x5a9b8e)}));}}_0x41a741&&writeGuidesToProject(_0x41a741,_0x55b853,_0x511045(0x11e),_0x2d09dc);const _0x1bde02={'version':'2.0.0','installedAt':new Date()['toISOString'](),'platforms':_0x3788e5},_0x168736=join(_0x55b853,_0x511045(0xf4)),_0x31f1da=join(_0x55b853,_0x511045(0x110));await copyDir(_0x31f1da,_0x31f1da),writeFileSync(_0x168736,JSON[_0x511045(0x122)](_0x1bde02,null,0x2),_0x511045(0xee)),console[_0x511045(0xf7)](t(_0x511045(0xd9))),console['log'](t('skill.done.success',{'count':_0x5290be})),console[_0x511045(0xf7)](t(_0x511045(0x105))),console[_0x511045(0xf7)](t(_0x511045(0xc8))),logger[_0x511045(0xdb)](_0x511045(0xc9),_0x511045(0x127),{'projectRoot':_0x55b853,'ides':_0x3788e5,'foldersCount':_0x5290be});}
@@ -1 +1 @@
1
- const a63_0x528d29=a63_0x259a;(function(_0x34aeec,_0x725f77){const _0x33cf40=a63_0x259a,_0x3c8234=_0x34aeec();while(!![]){try{const _0x16629c=-parseInt(_0x33cf40(0x1d2))/0x1*(parseInt(_0x33cf40(0x1ce))/0x2)+parseInt(_0x33cf40(0x1c5))/0x3*(-parseInt(_0x33cf40(0x1d8))/0x4)+-parseInt(_0x33cf40(0x1c2))/0x5+parseInt(_0x33cf40(0x1c7))/0x6*(-parseInt(_0x33cf40(0x1d3))/0x7)+-parseInt(_0x33cf40(0x1d5))/0x8+parseInt(_0x33cf40(0x1df))/0x9*(-parseInt(_0x33cf40(0x1dd))/0xa)+-parseInt(_0x33cf40(0x1d1))/0xb*(-parseInt(_0x33cf40(0x1d7))/0xc);if(_0x16629c===_0x725f77)break;else _0x3c8234['push'](_0x3c8234['shift']());}catch(_0x3fa496){_0x3c8234['push'](_0x3c8234['shift']());}}}(a63_0x1e44,0x23cf2));import{writeFileSync,existsSync,mkdirSync}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{IDE_CONFIGS}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';function a63_0x1e44(){const _0x4eda7f=['\x20失败:\x20','length','2.0.0','\x20\x20✗\x20未知的\x20IDE:\x20','setLogPath','skill-install-non-interactive','345652YbqUSN','正在从\x20CDN\x20拉取开发者指南','(含扩展)','11iBMNGN','1wGvgwm','7QRCpSk','.lovrabet/skill/.shared/guides','2025072ovDKvY','error','15128988hdoqHY','801844vNZWMj','stringify','\x20个开发者指南','\x20\x20✓\x20','message','270zunISE','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','71703UyxbaC','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','\x20\x20✗\x20安装\x20','✓\x20拉取\x20','\x20个目录','info','.lovrabet','\x0a✓\x20技能包安装成功!共安装\x20','开始安装技能包','name','cwd','534635jfwtFy','guides','log','3BfYFnW','...','993708ooRrrT'];a63_0x1e44=function(){return _0x4eda7f;};return a63_0x1e44();}const __dirname=dirname(fileURLToPath(import.meta.url));function a63_0x259a(_0x12bf0d,_0x4ae39d){_0x12bf0d=_0x12bf0d-0x1be;const _0x1e447b=a63_0x1e44();let _0x259a7d=_0x1e447b[_0x12bf0d];return _0x259a7d;}export async function installSkillsNonInteractive(_0x9877ec,_0x4f8c05,_0x50c0c7=process[a63_0x528d29(0x1c1)]()){const _0x26503e=a63_0x528d29,_0x192c24=resolve(__dirname,'../../cdn-source/skills');logger[_0x26503e(0x1cc)](_0x50c0c7),logger[_0x26503e(0x1e4)](_0x26503e(0x1cd),_0x26503e(0x1bf),{'ides':_0x9877ec});const _0x15be95=join(_0x50c0c7,_0x26503e(0x1e5));!existsSync(_0x15be95)&&mkdirSync(_0x15be95,{'recursive':!![]});const _0xa9913=_0x4f8c05&&_0x4f8c05[_0x26503e(0x1c9)]>0x0;console['log'](_0x26503e(0x1cf)+(_0xa9913?_0x26503e(0x1d0):'')+_0x26503e(0x1c6));let _0x2b7dfe;try{_0x2b7dfe=await fetchGuidesFromCDN(_0xa9913),console[_0x26503e(0x1c4)](_0x26503e(0x1e2)+Object['keys'](_0x2b7dfe[_0x26503e(0x1c3)])[_0x26503e(0x1c9)]+_0x26503e(0x1da));}catch(_0x396a97){console['warn'](_0x26503e(0x1de)+(_0x396a97 instanceof Error?_0x396a97[_0x26503e(0x1dc)]:String(_0x396a97)));}let _0x2ac606=0x0;for(const _0x2400be of _0x9877ec){try{const _0x51281d=IDE_CONFIGS[_0x2400be];if(!_0x51281d){console['warn'](_0x26503e(0x1cb)+_0x2400be);continue;}const _0x433070=await installSingleIDE(_0x2400be,_0x51281d,_0x50c0c7,_0x192c24,_0x2b7dfe,_0x4f8c05);_0x2ac606+=_0x433070,console[_0x26503e(0x1c4)](_0x26503e(0x1db)+(_0x51281d[_0x26503e(0x1c0)]||_0x2400be));}catch(_0x5d3ea7){console[_0x26503e(0x1d6)](_0x26503e(0x1e1)+_0x2400be+_0x26503e(0x1c8)+(_0x5d3ea7 instanceof Error?_0x5d3ea7[_0x26503e(0x1dc)]:String(_0x5d3ea7)));}}_0x2b7dfe&&writeGuidesToProject(_0x2b7dfe,_0x50c0c7,_0x26503e(0x1d4),_0x4f8c05);const _0x20f717={'version':_0x26503e(0x1ca),'installedAt':new Date()['toISOString'](),'platforms':_0x9877ec},_0x599e05=join(_0x50c0c7,'.lovrabet/skill-manifest.json');writeFileSync(_0x599e05,JSON[_0x26503e(0x1d9)](_0x20f717,null,0x2),'utf-8'),logger[_0x26503e(0x1e4)](_0x26503e(0x1cd),'安装成功',{'projectRoot':_0x50c0c7,'ides':_0x9877ec,'foldersCount':_0x2ac606}),console[_0x26503e(0x1c4)](_0x26503e(0x1be)+_0x2ac606+_0x26503e(0x1e3)),console[_0x26503e(0x1c4)](_0x26503e(0x1e0));}
1
+ const a66_0x50ff57=a66_0x34e4;(function(_0x1dfbcb,_0x460aae){const _0x3c4957=a66_0x34e4,_0x4399c6=_0x1dfbcb();while(!![]){try{const _0x1990f5=-parseInt(_0x3c4957(0xd1))/0x1+-parseInt(_0x3c4957(0xef))/0x2*(-parseInt(_0x3c4957(0xec))/0x3)+parseInt(_0x3c4957(0xf7))/0x4*(-parseInt(_0x3c4957(0xd2))/0x5)+parseInt(_0x3c4957(0xf3))/0x6*(-parseInt(_0x3c4957(0xe3))/0x7)+-parseInt(_0x3c4957(0xe2))/0x8+-parseInt(_0x3c4957(0xd8))/0x9*(parseInt(_0x3c4957(0xf1))/0xa)+-parseInt(_0x3c4957(0xda))/0xb*(-parseInt(_0x3c4957(0xd5))/0xc);if(_0x1990f5===_0x460aae)break;else _0x4399c6['push'](_0x4399c6['shift']());}catch(_0x39fc36){_0x4399c6['push'](_0x4399c6['shift']());}}}(a66_0x305f,0xa0983));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a66_0x305f(){const _0x97f72b=['skill.cdn.fetchSuccess','28579804fAHwiv','skill.cdn.fetching','skill.error.unknownIDE','setLogPath','stringify','info','skill-install-non-interactive','guides','4183352BnlOaZ','35IQDGvf','skill.cdn.fetchingExtend','keys','log','skill.error.installFailed','安装成功','../../cdn-source/skills','.lovrabet/skill-manifest.json','.lovrabet','386898PuqOow','toISOString','skill.done.guidesPathInline','12xjsudJ','name','100970XlApei','\x20\x20✓\x20','304224crEfWB','length','skill.cdn.fetchFailed','cwd','196036ItXgCO','226369zIgPXL','120RZOqEq','message','skill.done.success','12CsefJN','warn','error','477nnVQcY'];a66_0x305f=function(){return _0x97f72b;};return a66_0x305f();}import{logger}from'../utils/logger.js';function a66_0x34e4(_0x4e59ec,_0x56cfd9){_0x4e59ec=_0x4e59ec-0xd1;const _0x305f50=a66_0x305f();let _0x34e4e0=_0x305f50[_0x4e59ec];return _0x34e4e0;}import{IDE_CONFIGS}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a66_0x38203c from'../i18n/index.js';const t=a66_0x38203c['t']['bind'](a66_0x38203c),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x3e0ef6,_0xabb323,_0x1a253a=process[a66_0x50ff57(0xf6)]()){const _0x1cf6aa=a66_0x50ff57,_0x1775bc=resolve(__dirname,_0x1cf6aa(0xe9));logger[_0x1cf6aa(0xdd)](_0x1a253a),logger[_0x1cf6aa(0xdf)](_0x1cf6aa(0xe0),'开始安装技能包',{'ides':_0x3e0ef6});const _0x5317a8=join(_0x1a253a,_0x1cf6aa(0xeb));!existsSync(_0x5317a8)&&mkdirSync(_0x5317a8,{'recursive':!![]});const _0x4f07c8=_0xabb323&&_0xabb323[_0x1cf6aa(0xf4)]>0x0;console['log'](_0x4f07c8?t(_0x1cf6aa(0xe4)):t(_0x1cf6aa(0xdb)));let _0x4a3f57;try{_0x4a3f57=await fetchGuidesFromCDN(_0x4f07c8),console[_0x1cf6aa(0xe6)](t(_0x1cf6aa(0xd9),{'count':Object[_0x1cf6aa(0xe5)](_0x4a3f57[_0x1cf6aa(0xe1)])[_0x1cf6aa(0xf4)]}));}catch(_0x1053b7){console[_0x1cf6aa(0xd6)](t(_0x1cf6aa(0xf5),{'error':_0x1053b7 instanceof Error?_0x1053b7[_0x1cf6aa(0xd3)]:String(_0x1053b7)}));}let _0x1bd994=0x0;for(const _0x54423e of _0x3e0ef6){try{const _0x3b5d31=IDE_CONFIGS[_0x54423e];if(!_0x3b5d31){console[_0x1cf6aa(0xd6)](t(_0x1cf6aa(0xdc),{'ide':_0x54423e}));continue;}const _0x2c8576=await installSingleIDE(_0x54423e,_0x3b5d31,_0x1a253a,_0x1775bc,_0x4a3f57,_0xabb323);_0x1bd994+=_0x2c8576,console['log'](_0x1cf6aa(0xf2)+(_0x3b5d31[_0x1cf6aa(0xf0)]||_0x54423e));}catch(_0x45a5f8){console[_0x1cf6aa(0xd7)](t(_0x1cf6aa(0xe7),{'ide':_0x54423e,'error':_0x45a5f8 instanceof Error?_0x45a5f8[_0x1cf6aa(0xd3)]:String(_0x45a5f8)}));}}_0x4a3f57&&writeGuidesToProject(_0x4a3f57,_0x1a253a,'.lovrabet/skill/.shared/guides',_0xabb323);const _0x241d21={'version':'2.0.0','installedAt':new Date()[_0x1cf6aa(0xed)](),'platforms':_0x3e0ef6},_0x3f4861=join(_0x1a253a,_0x1cf6aa(0xea));writeFileSync(_0x3f4861,JSON[_0x1cf6aa(0xde)](_0x241d21,null,0x2),'utf-8'),logger[_0x1cf6aa(0xdf)]('skill-install-non-interactive',_0x1cf6aa(0xe8),{'projectRoot':_0x1a253a,'ides':_0x3e0ef6,'foldersCount':_0x1bd994}),console['log'](t(_0x1cf6aa(0xd4),{'count':_0x1bd994})),console['log'](t(_0x1cf6aa(0xee)));}
@@ -1 +1 @@
1
- (function(_0x137f9b,_0x415dd1){const _0x57150c=a64_0x2bf8,_0x5e40f6=_0x137f9b();while(!![]){try{const _0x2c2af9=parseInt(_0x57150c(0x1d7))/0x1*(parseInt(_0x57150c(0x1cb))/0x2)+-parseInt(_0x57150c(0x1df))/0x3*(-parseInt(_0x57150c(0x1de))/0x4)+parseInt(_0x57150c(0x1d1))/0x5+parseInt(_0x57150c(0x1d6))/0x6*(parseInt(_0x57150c(0x1da))/0x7)+parseInt(_0x57150c(0x1d8))/0x8*(-parseInt(_0x57150c(0x1e2))/0x9)+parseInt(_0x57150c(0x1ca))/0xa+-parseInt(_0x57150c(0x1d0))/0xb;if(_0x2c2af9===_0x415dd1)break;else _0x5e40f6['push'](_0x5e40f6['shift']());}catch(_0x43f4a3){_0x5e40f6['push'](_0x5e40f6['shift']());}}}(a64_0x16bb,0xc217a));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';function a64_0x16bb(){const _0x88357a=['8PxakeX','some','115654jNJkDU','startsWith','`\x20|\x20','|\x20`','3416sjfoaC','1071auPFww','folders','utf-8','13295988kdsXqM','path','files','guides','join','length','<!--\x20GUIDES_APPEND\x20-->','name','title','10657690TOMbtC','6hLFUYk','sort','push','indexOf','SKILL.md.tpl','14995233DvQVLI','3130450Wdifzu','\x0a<!--\x20GUIDES_APPEND\x20-->','requireFlags','template','replace','318izJBRj','254378Oyqwzl'];a64_0x16bb=function(){return _0x88357a;};return a64_0x16bb();}export async function installSingleIDE(_0x2903b2,_0x21f121,_0x403f2e,_0x3689e0,_0x120173,_0x37cd23){const _0x2f3cf7=a64_0x2bf8;let _0x3d4b00=0x0;const _0x5e4bcd=_0x21f121?.[_0x2f3cf7(0x1e0)]??['.'+_0x2903b2];for(const _0x40913f of _0x5e4bcd){const _0x29070e=join(_0x403f2e,_0x40913f),_0x476aa5=_0x21f121?.[_0x2f3cf7(0x1e4)]?.[_0x2f3cf7(0x1d9)](_0x508e42=>_0x508e42[_0x2f3cf7(0x1e3)][_0x2f3cf7(0x1db)](_0x40913f+'/'))??![];_0x476aa5?!existsSync(_0x29070e)&&(mkdirSync(_0x29070e,{'recursive':!![]}),_0x3d4b00++):!existsSync(_0x29070e)&&(writeFileSync(_0x29070e,'',_0x2f3cf7(0x1e1)),_0x3d4b00++);}if(_0x21f121?.[_0x2f3cf7(0x1e4)]){const _0x33800e=_0x21f121[_0x2f3cf7(0x1c8)]||_0x2903b2;for(const _0x33240b of _0x21f121[_0x2f3cf7(0x1e4)]){const _0x5deb57=join(_0x403f2e,_0x33240b[_0x2f3cf7(0x1e3)]);await createFileFromTemplate(_0x33240b,_0x5deb57,_0x33800e,_0x3689e0,_0x120173,_0x37cd23),_0x3d4b00++;}}return _0x3d4b00;}export async function createFileFromTemplate(_0x59a1b8,_0x3f4330,_0x14d8b1,_0xc05d22,_0x24e472,_0x4ba6b5){const _0xae62a7=a64_0x2bf8,_0x179d17=dirname(_0x3f4330);!existsSync(_0x179d17)&&mkdirSync(_0x179d17,{'recursive':!![]});const _0x12dad5=_0x59a1b8[_0xae62a7(0x1d4)]===_0xae62a7(0x1cf);if(existsSync(_0x3f4330)&&!_0x12dad5)return;if(_0x59a1b8[_0xae62a7(0x1d4)]){const _0x34d21f=join(_0xc05d22,_0x59a1b8[_0xae62a7(0x1d4)]);if(existsSync(_0x34d21f)){let _0x3c0409=readFileSync(_0x34d21f,_0xae62a7(0x1e1));_0x3c0409=_0x3c0409[_0xae62a7(0x1d5)](/\{\{IDE_NAME\}\}/g,_0x14d8b1);_0x24e472&&_0x12dad5&&(_0x3c0409=insertGuidesSection(_0x3c0409,_0x24e472,_0x4ba6b5),_0x3c0409=appendExtendContents(_0x3c0409,_0x24e472,_0x4ba6b5));writeFileSync(_0x3f4330,_0x3c0409,'utf-8');return;}if(_0x24e472&&_0x12dad5)try{writeSkillFile(_0x24e472,_0x3f4330,_0x14d8b1,_0x4ba6b5);return;}catch{}}writeFileSync(_0x3f4330,'',_0xae62a7(0x1e1));}function a64_0x2bf8(_0x1df876,_0xc9ff57){_0x1df876=_0x1df876-0x1c4;const _0x16bb23=a64_0x16bb();let _0x2bf8be=_0x16bb23[_0x1df876];return _0x2bf8be;}function insertGuidesSection(_0x22c0c4,_0xa9a3f,_0x13ea8a){const _0x16d939=a64_0x2bf8,_0x1bcd64=_0x16d939(0x1c7),_0x67eae9=_0x22c0c4[_0x16d939(0x1ce)](_0x1bcd64);if(_0x67eae9===-0x1)return _0x22c0c4;const _0x30cd0=[],_0x2cb5d1=Object['keys'](_0xa9a3f[_0x16d939(0x1c4)])[_0x16d939(0x1cc)]();for(const _0x60a92a of _0x2cb5d1){const _0x86c9fe=_0xa9a3f['guides'][_0x60a92a];if(!_0x86c9fe)continue;if(/^0[1-6]-/['test'](_0x60a92a))continue;if(_0x86c9fe['requireFlags']&&_0x86c9fe[_0x16d939(0x1d3)][_0x16d939(0x1c6)]>0x0){const _0xa838bc=_0x86c9fe['requireFlags'][_0x16d939(0x1d9)](_0xf0d47e=>_0x13ea8a?.['includes'](_0xf0d47e));if(!_0xa838bc)continue;}const _0x4a44fd=_0x86c9fe[_0x16d939(0x1e3)][_0x16d939(0x1d5)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x30cd0[_0x16d939(0x1cd)](_0x16d939(0x1dd)+_0x4a44fd+_0x16d939(0x1dc)+_0x86c9fe[_0x16d939(0x1c9)]+'\x20|');}if(_0x30cd0[_0x16d939(0x1c6)]===0x0)return _0x22c0c4[_0x16d939(0x1d5)](_0x1bcd64,'<!--\x20GUIDES_APPEND\x20-->');const _0x523cf2=_0x30cd0[_0x16d939(0x1c5)]('\x0a');return _0x22c0c4[_0x16d939(0x1d5)](_0x1bcd64,_0x523cf2+_0x16d939(0x1d2));}
1
+ function a67_0x5afd(_0xc385d1,_0x58a828){_0xc385d1=_0xc385d1-0x1ac;const _0x2a8461=a67_0x2a84();let _0x5afd1e=_0x2a8461[_0xc385d1];return _0x5afd1e;}(function(_0x22f880,_0x166e16){const _0x4e2ba4=a67_0x5afd,_0x2b1cb3=_0x22f880();while(!![]){try{const _0x2e4532=-parseInt(_0x4e2ba4(0x1b1))/0x1+-parseInt(_0x4e2ba4(0x1ac))/0x2*(-parseInt(_0x4e2ba4(0x1b4))/0x3)+-parseInt(_0x4e2ba4(0x1bd))/0x4+-parseInt(_0x4e2ba4(0x1b5))/0x5*(-parseInt(_0x4e2ba4(0x1c2))/0x6)+-parseInt(_0x4e2ba4(0x1ca))/0x7*(-parseInt(_0x4e2ba4(0x1c7))/0x8)+-parseInt(_0x4e2ba4(0x1b9))/0x9*(parseInt(_0x4e2ba4(0x1b7))/0xa)+parseInt(_0x4e2ba4(0x1c9))/0xb;if(_0x2e4532===_0x166e16)break;else _0x2b1cb3['push'](_0x2b1cb3['shift']());}catch(_0xf48b27){_0x2b1cb3['push'](_0x2b1cb3['shift']());}}}(a67_0x2a84,0xb0600));function a67_0x2a84(){const _0x3df326=['\x0a<!--\x20GUIDES_APPEND\x20-->','`\x20|\x20','name','710915lYvicH','requireFlags','push','3351IFpScQ','220655iQWefg','path','1074440zxrXPX','includes','81DPWlan','files','title','test','3746876WZIMPn','SKILL.md.tpl','keys','some','indexOf','54RBmCUr','template','<!--\x20GUIDES_APPEND\x20-->','guides','length','8aeawBz','startsWith','15147407cBHDWx','8703688eKGVNO','sort','utf-8','572xPVrCf','replace'];a67_0x2a84=function(){return _0x3df326;};return a67_0x2a84();}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0x50a502,_0x11ec5c,_0x181c94,_0xccdd2d,_0x5f0995,_0x248df3){const _0x5a2902=a67_0x5afd;let _0x5152b8=0x0;const _0x4c9097=_0x11ec5c?.['folders']??['.'+_0x50a502];for(const _0x269b31 of _0x4c9097){const _0x47cf7c=join(_0x181c94,_0x269b31),_0x2b7ffa=_0x11ec5c?.[_0x5a2902(0x1ba)]?.[_0x5a2902(0x1c0)](_0x1932fb=>_0x1932fb['path'][_0x5a2902(0x1c8)](_0x269b31+'/'))??![];_0x2b7ffa?!existsSync(_0x47cf7c)&&(mkdirSync(_0x47cf7c,{'recursive':!![]}),_0x5152b8++):!existsSync(_0x47cf7c)&&(writeFileSync(_0x47cf7c,'',_0x5a2902(0x1cc)),_0x5152b8++);}if(_0x11ec5c?.[_0x5a2902(0x1ba)]){const _0x581a7b=_0x11ec5c[_0x5a2902(0x1b0)]||_0x50a502;for(const _0x4f7e6c of _0x11ec5c[_0x5a2902(0x1ba)]){const _0x5a4981=join(_0x181c94,_0x4f7e6c[_0x5a2902(0x1b6)]);await createFileFromTemplate(_0x4f7e6c,_0x5a4981,_0x581a7b,_0xccdd2d,_0x5f0995,_0x248df3),_0x5152b8++;}}return _0x5152b8;}export async function createFileFromTemplate(_0x11f582,_0x5300a2,_0x52a4f7,_0x59172b,_0x6ec6ad,_0x55666d){const _0x4aa271=a67_0x5afd,_0xf1a1a4=dirname(_0x5300a2);!existsSync(_0xf1a1a4)&&mkdirSync(_0xf1a1a4,{'recursive':!![]});const _0x10d190=_0x11f582[_0x4aa271(0x1c3)]===_0x4aa271(0x1be);if(existsSync(_0x5300a2)&&!_0x10d190)return;if(_0x11f582[_0x4aa271(0x1c3)]){const _0x130f82=join(_0x59172b,_0x11f582[_0x4aa271(0x1c3)]);if(existsSync(_0x130f82)){let _0x43a718=readFileSync(_0x130f82,_0x4aa271(0x1cc));_0x43a718=_0x43a718[_0x4aa271(0x1ad)](/\{\{IDE_NAME\}\}/g,_0x52a4f7);_0x6ec6ad&&_0x10d190&&(_0x43a718=insertGuidesSection(_0x43a718,_0x6ec6ad,_0x55666d),_0x43a718=appendExtendContents(_0x43a718,_0x6ec6ad,_0x55666d));writeFileSync(_0x5300a2,_0x43a718,'utf-8');return;}if(_0x6ec6ad&&_0x10d190)try{writeSkillFile(_0x6ec6ad,_0x5300a2,_0x52a4f7,_0x55666d);return;}catch{}}writeFileSync(_0x5300a2,'',_0x4aa271(0x1cc));}function insertGuidesSection(_0x40ffe9,_0x3d0fd7,_0x52ed5b){const _0x4d4f02=a67_0x5afd,_0x294faf='<!--\x20GUIDES_APPEND\x20-->',_0x69d706=_0x40ffe9[_0x4d4f02(0x1c1)](_0x294faf);if(_0x69d706===-0x1)return _0x40ffe9;const _0x46bfe7=[],_0x5c6f44=Object[_0x4d4f02(0x1bf)](_0x3d0fd7[_0x4d4f02(0x1c5)])[_0x4d4f02(0x1cb)]();for(const _0x4390fd of _0x5c6f44){const _0x3ea54b=_0x3d0fd7['guides'][_0x4390fd];if(!_0x3ea54b)continue;if(/^0[1-6]-/[_0x4d4f02(0x1bc)](_0x4390fd))continue;if(_0x3ea54b['requireFlags']&&_0x3ea54b[_0x4d4f02(0x1b2)][_0x4d4f02(0x1c6)]>0x0){const _0x5f157b=_0x3ea54b[_0x4d4f02(0x1b2)]['some'](_0x4d6f35=>_0x52ed5b?.[_0x4d4f02(0x1b8)](_0x4d6f35));if(!_0x5f157b)continue;}const _0x133c85=_0x3ea54b[_0x4d4f02(0x1b6)][_0x4d4f02(0x1ad)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x46bfe7[_0x4d4f02(0x1b3)]('|\x20`'+_0x133c85+_0x4d4f02(0x1af)+_0x3ea54b[_0x4d4f02(0x1bb)]+'\x20|');}if(_0x46bfe7['length']===0x0)return _0x40ffe9[_0x4d4f02(0x1ad)](_0x294faf,_0x4d4f02(0x1c4));const _0x48b3b5=_0x46bfe7['join']('\x0a');return _0x40ffe9[_0x4d4f02(0x1ad)](_0x294faf,_0x48b3b5+_0x4d4f02(0x1ae));}
@@ -1 +1 @@
1
- function a66_0x1b05(){const _0x278c4d=['39263859qxBcYs','2eqmcTT','6450104ubnvlk','gray','8446494NfbDRY','white','cyan','899210pxfiwc','description','has','7588938nmscdk','2284aloopT','map','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20q:\x20退出\x20Enter:\x20确认','name','red','column','5589890LYXlCK','[✓]','723FPHsTX','key'];a66_0x1b05=function(){return _0x278c4d;};return a66_0x1b05();}function a66_0x5d55(_0x184fb8,_0x3deeae){_0x184fb8=_0x184fb8-0x195;const _0x1b0523=a66_0x1b05();let _0x5d55a6=_0x1b0523[_0x184fb8];return _0x5d55a6;}(function(_0x177e55,_0x4a99b4){const _0x53bb5d=a66_0x5d55,_0x173153=_0x177e55();while(!![]){try{const _0x18792b=parseInt(_0x53bb5d(0x195))/0x1*(parseInt(_0x53bb5d(0x19b))/0x2)+parseInt(_0x53bb5d(0x1a7))/0x3*(parseInt(_0x53bb5d(0x19f))/0x4)+-parseInt(_0x53bb5d(0x1a5))/0x5+-parseInt(_0x53bb5d(0x198))/0x6+-parseInt(_0x53bb5d(0x19e))/0x7+-parseInt(_0x53bb5d(0x196))/0x8+parseInt(_0x53bb5d(0x1a9))/0x9;if(_0x18792b===_0x4a99b4)break;else _0x173153['push'](_0x173153['shift']());}catch(_0x21732){_0x173153['push'](_0x173153['shift']());}}}(a66_0x1b05,0xf0134));import{jsxs as a66_0x31266c,jsx as a66_0x456131}from'react/jsx-runtime';import{Text,Box}from'ink';export function IDESelector({ideList:_0x481d19,title:_0x19a05b,selection:_0x183e1c}){const _0x29a102=a66_0x5d55,{selectedIndexes:_0x488428,highlightIndex:_0x2bb0bb,errorMsg:_0x4fe104}=_0x183e1c;return a66_0x31266c(Box,{'flexDirection':'column','marginTop':0x1,'children':[a66_0x456131(Box,{'children':a66_0x31266c(Text,{'color':_0x29a102(0x19a),'children':['*\x20',_0x19a05b]})}),_0x4fe104&&a66_0x456131(Box,{'marginTop':0x1,'children':a66_0x31266c(Text,{'color':_0x29a102(0x1a3),'children':['✗\x20',_0x4fe104]})}),a66_0x31266c(Box,{'marginTop':0x1,'flexDirection':_0x29a102(0x1a4),'children':[a66_0x456131(Text,{'bold':!![],'children':'*\x20请选择要配置的\x20IDE:'}),_0x481d19[_0x29a102(0x1a0)]((_0x934097,_0x31af1f)=>{const _0x495ce8=_0x29a102,_0x1926da=_0x2bb0bb===_0x31af1f,_0x289350=_0x488428[_0x495ce8(0x19d)](_0x31af1f);return a66_0x456131(Box,{'children':a66_0x31266c(Text,{'backgroundColor':_0x1926da?'blue':undefined,'color':_0x1926da?'white':undefined,'children':['\x20\x20',_0x289350?_0x495ce8(0x1a6):'[\x20]','\x20',_0x934097[_0x495ce8(0x1a2)],'\x20',a66_0x31266c(Text,{'color':_0x1926da?_0x495ce8(0x199):'gray','dimColor':!_0x1926da,'children':['-\x20',_0x934097[_0x495ce8(0x19c)]]})]})},_0x934097[_0x495ce8(0x1a8)]);}),a66_0x456131(Box,{'marginTop':0x1,'children':a66_0x31266c(Text,{'color':_0x29a102(0x197),'children':['\x20',_0x29a102(0x1a1)]})})]})]});}export{useIDESelection}from'./useIDESelection.js';
1
+ (function(_0x36c524,_0x29099d){const _0x2da573=a69_0x23b4,_0x29cc39=_0x36c524();while(!![]){try{const _0x45a589=parseInt(_0x2da573(0x1b5))/0x1*(-parseInt(_0x2da573(0x1bd))/0x2)+parseInt(_0x2da573(0x1b8))/0x3*(-parseInt(_0x2da573(0x1b6))/0x4)+-parseInt(_0x2da573(0x1c7))/0x5+-parseInt(_0x2da573(0x1c2))/0x6+parseInt(_0x2da573(0x1c4))/0x7+-parseInt(_0x2da573(0x1b4))/0x8*(-parseInt(_0x2da573(0x1c0))/0x9)+parseInt(_0x2da573(0x1bb))/0xa;if(_0x45a589===_0x29099d)break;else _0x29cc39['push'](_0x29cc39['shift']());}catch(_0x594e67){_0x29cc39['push'](_0x29cc39['shift']());}}}(a69_0x26e1,0x65950));function a69_0x23b4(_0x248744,_0xdb16c9){_0x248744=_0x248744-0x1b4;const _0x26e1d8=a69_0x26e1();let _0x23b458=_0x26e1d8[_0x248744];return _0x23b458;}import{jsxs as a69_0x2c076a,jsx as a69_0x4d8f9a}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x46cdd4,title:_0x1f7b5d,selection:_0x405974}){const _0x10b6d0=a69_0x23b4,{t:_0x4f15a9}=useI18n(),{selectedIndexes:_0x47f703,highlightIndex:_0xdec414,errorMsg:_0x2579ac}=_0x405974;return a69_0x2c076a(Box,{'flexDirection':_0x10b6d0(0x1bf),'marginTop':0x1,'children':[a69_0x4d8f9a(Box,{'children':a69_0x2c076a(Text,{'color':_0x10b6d0(0x1bc),'children':['*\x20',_0x1f7b5d]})}),_0x2579ac&&a69_0x4d8f9a(Box,{'marginTop':0x1,'children':a69_0x2c076a(Text,{'color':'red','children':['✗\x20',_0x2579ac]})}),a69_0x2c076a(Box,{'marginTop':0x1,'flexDirection':_0x10b6d0(0x1bf),'children':[a69_0x2c076a(Text,{'bold':!![],'children':['*\x20',_0x4f15a9(_0x10b6d0(0x1c3))]}),_0x46cdd4[_0x10b6d0(0x1c5)]((_0x2a11bc,_0x498979)=>{const _0x2ff1e0=_0x10b6d0,_0x2b7078=_0xdec414===_0x498979,_0x5705f9=_0x47f703[_0x2ff1e0(0x1c1)](_0x498979);return a69_0x4d8f9a(Box,{'children':a69_0x2c076a(Text,{'backgroundColor':_0x2b7078?'blue':undefined,'color':_0x2b7078?_0x2ff1e0(0x1ba):undefined,'children':['\x20\x20',_0x5705f9?_0x2ff1e0(0x1b7):_0x2ff1e0(0x1c8),'\x20',_0x2a11bc[_0x2ff1e0(0x1b9)],'\x20',a69_0x2c076a(Text,{'color':_0x2b7078?_0x2ff1e0(0x1ba):_0x2ff1e0(0x1c9),'dimColor':!_0x2b7078,'children':['-\x20',_0x2a11bc['description']]})]})},_0x2a11bc[_0x2ff1e0(0x1be)]);}),a69_0x4d8f9a(Box,{'marginTop':0x1,'children':a69_0x2c076a(Text,{'color':'gray','children':['\x20',_0x4f15a9(_0x10b6d0(0x1c6))]})})]})]});}export{useIDESelection}from'./useIDESelection.js';function a69_0x26e1(){const _0x553bbd=['white','6945590iKGiVd','cyan','302990ecHEyj','key','column','9lyMfhn','has','475932AYNTll','ui.ideSelector.title','1156414TTFPkG','map','ui.ideSelector.hotkeys','1046815GAfBCe','[\x20]','gray','4208848wwAazw','1AqKlOp','4zxqQnD','[✓]','1588821bLBsbQ','name'];a69_0x26e1=function(){return _0x553bbd;};return a69_0x26e1();}
@@ -1 +1 @@
1
- (function(_0x105bc0,_0x5e20ff){const _0x383317=a67_0xd5e3,_0x1d4368=_0x105bc0();while(!![]){try{const _0x38dfa1=-parseInt(_0x383317(0x1ea))/0x1+-parseInt(_0x383317(0x1da))/0x2+-parseInt(_0x383317(0x1e1))/0x3*(-parseInt(_0x383317(0x1e4))/0x4)+-parseInt(_0x383317(0x1dd))/0x5+-parseInt(_0x383317(0x1d8))/0x6+-parseInt(_0x383317(0x1db))/0x7*(-parseInt(_0x383317(0x1e9))/0x8)+-parseInt(_0x383317(0x1e8))/0x9*(-parseInt(_0x383317(0x1d9))/0xa);if(_0x38dfa1===_0x5e20ff)break;else _0x1d4368['push'](_0x1d4368['shift']());}catch(_0xf774b9){_0x1d4368['push'](_0x1d4368['shift']());}}}(a67_0x52d3,0x8914d));import{useState,useCallback}from'react';function a67_0xd5e3(_0x2a5797,_0x26f37b){_0x2a5797=_0x2a5797-0x1d8;const _0x52d3aa=a67_0x52d3();let _0xd5e31a=_0x52d3aa[_0x2a5797];return _0xd5e31a;}function a67_0x52d3(){const _0x272287=['delete','3534402lgDcvV','73420BCUMRI','2177512JBdLDs','153839gsKNFq','size','4347895mQurNF','key','from','add','17319xtFxmg','length','upArrow','460CkhbXO','has','findIndex','map','3249oyDhLB','8FuLAxR','227447ugcNDH','filter'];a67_0x52d3=function(){return _0x272287;};return a67_0x52d3();}export function useIDESelection({ideList:_0x3f2fde,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x5a5b8b=a67_0xd5e3,[_0x522049,_0x1d5a91]=useState(new Set(preselectedIDEs[_0x5a5b8b(0x1e7)](_0x26942e=>_0x3f2fde[_0x5a5b8b(0x1e6)](_0x1d8a7c=>_0x1d8a7c[_0x5a5b8b(0x1de)]===_0x26942e))[_0x5a5b8b(0x1eb)](_0x3e97ef=>_0x3e97ef>=0x0))),[_0x27cf4f,_0x3b99db]=useState(0x0),[_0x100374,_0x429078]=useState(''),_0x3a5452=useCallback(()=>{const _0x25ebf8=_0x5a5b8b;_0x3b99db(_0x4083e1=>_0x4083e1>0x0?_0x4083e1-0x1:_0x3f2fde[_0x25ebf8(0x1e2)]-0x1);},[_0x3f2fde[_0x5a5b8b(0x1e2)]]),_0x490fe6=useCallback(()=>{const _0xd99415=_0x5a5b8b;_0x3b99db(_0x469e3a=>_0x469e3a<_0x3f2fde[_0xd99415(0x1e2)]-0x1?_0x469e3a+0x1:0x0);},[_0x3f2fde['length']]),_0x5db1e2=useCallback(()=>{if(!multiSelect){_0x1d5a91(new Set([_0x27cf4f]));return;}_0x1d5a91(_0x332a3a=>{const _0x9b050e=a67_0xd5e3,_0x9aac5a=new Set(_0x332a3a);return _0x9aac5a['has'](_0x27cf4f)?_0x9aac5a[_0x9b050e(0x1ec)](_0x27cf4f):_0x9aac5a[_0x9b050e(0x1e0)](_0x27cf4f),_0x9aac5a;});},[_0x27cf4f,multiSelect]),_0x838a9d=useCallback(()=>{_0x1d5a91(new Set(_0x3f2fde['map']((_0x37bb31,_0x204954)=>_0x204954)));},[_0x3f2fde]),_0x49d244=useCallback(()=>{_0x1d5a91(_0x4f1568=>{const _0xda81fe=a67_0xd5e3,_0xbb1e35=new Set();for(let _0xb4ed1=0x0;_0xb4ed1<_0x3f2fde['length'];_0xb4ed1++){!_0x4f1568[_0xda81fe(0x1e5)](_0xb4ed1)&&_0xbb1e35['add'](_0xb4ed1);}return _0xbb1e35;});},[_0x3f2fde]),_0x3453e0=useCallback(()=>{const _0x392add=_0x5a5b8b;return Array[_0x392add(0x1df)](_0x522049)[_0x392add(0x1e7)](_0x3c6ccd=>_0x3f2fde[_0x3c6ccd]?.[_0x392add(0x1de)])[_0x392add(0x1eb)](_0xfbaea8=>_0xfbaea8!==undefined);},[_0x522049,_0x3f2fde]),_0x12a22d=useCallback(()=>{const _0x2c9ff7=_0x5a5b8b;return _0x522049[_0x2c9ff7(0x1dc)]===_0x3f2fde['length'];},[_0x522049,_0x3f2fde]),_0x24bb0d=useCallback((_0x463aba,_0x1d333a)=>{const _0x11ac2f=_0x5a5b8b;if(_0x1d333a[_0x11ac2f(0x1e3)])return _0x3a5452(),!![];if(_0x1d333a['downArrow'])return _0x490fe6(),!![];if(_0x463aba==='\x20')return _0x5db1e2(),!![];if(_0x463aba==='a'||_0x463aba==='A')return _0x838a9d(),!![];if(_0x463aba==='i'||_0x463aba==='I'||_0x463aba==='r'||_0x463aba==='R')return _0x49d244(),!![];return![];},[_0x3a5452,_0x490fe6,_0x5db1e2,_0x838a9d,_0x49d244]);return{'selectedIndexes':_0x522049,'highlightIndex':_0x27cf4f,'errorMsg':_0x100374,'setErrorMsg':_0x429078,'handleKeyDown':_0x24bb0d,'getSelectedIDEs':_0x3453e0,'isAllSelected':_0x12a22d,'toggleSelection':_0x5db1e2,'selectAll':_0x838a9d,'invertSelection':_0x49d244,'moveHighlightUp':_0x3a5452,'moveHighlightDown':_0x490fe6};}
1
+ (function(_0x51d6f9,_0x7a88a1){const _0x15b07f=a70_0xf209,_0x3fda35=_0x51d6f9();while(!![]){try{const _0x4c51a4=parseInt(_0x15b07f(0x1d6))/0x1+parseInt(_0x15b07f(0x1d1))/0x2*(parseInt(_0x15b07f(0x1d9))/0x3)+-parseInt(_0x15b07f(0x1ce))/0x4+parseInt(_0x15b07f(0x1ca))/0x5+-parseInt(_0x15b07f(0x1cf))/0x6+parseInt(_0x15b07f(0x1d4))/0x7+-parseInt(_0x15b07f(0x1d8))/0x8;if(_0x4c51a4===_0x7a88a1)break;else _0x3fda35['push'](_0x3fda35['shift']());}catch(_0x55e198){_0x3fda35['push'](_0x3fda35['shift']());}}}(a70_0x476d,0x81196));import{useState,useCallback}from'react';function a70_0x476d(){const _0x20d3f0=['from','map','68724VsoTep','3559800PeJHse','length','1131938zouPsu','has','upArrow','904687onNpVv','key','730655eihjqH','findIndex','2762960ostYjg','3SnYeyE','filter','delete','293880vumUsW','add'];a70_0x476d=function(){return _0x20d3f0;};return a70_0x476d();}function a70_0xf209(_0x2c6a62,_0x694b27){_0x2c6a62=_0x2c6a62-0x1ca;const _0x476db5=a70_0x476d();let _0xf2090e=_0x476db5[_0x2c6a62];return _0xf2090e;}export function useIDESelection({ideList:_0x26c8d7,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x18a4e0=a70_0xf209,[_0x4cb1ce,_0x1db266]=useState(new Set(preselectedIDEs['map'](_0x409b96=>_0x26c8d7[_0x18a4e0(0x1d7)](_0x1b2de0=>_0x1b2de0['key']===_0x409b96))[_0x18a4e0(0x1da)](_0x34dd13=>_0x34dd13>=0x0))),[_0x27e6db,_0x2bf967]=useState(0x0),[_0x50eac0,_0x3d70cf]=useState(''),_0x45a37d=useCallback(()=>{const _0x50d205=_0x18a4e0;_0x2bf967(_0x30073d=>_0x30073d>0x0?_0x30073d-0x1:_0x26c8d7[_0x50d205(0x1d0)]-0x1);},[_0x26c8d7[_0x18a4e0(0x1d0)]]),_0x1fc321=useCallback(()=>{const _0x1fe636=_0x18a4e0;_0x2bf967(_0x4b7ada=>_0x4b7ada<_0x26c8d7[_0x1fe636(0x1d0)]-0x1?_0x4b7ada+0x1:0x0);},[_0x26c8d7[_0x18a4e0(0x1d0)]]),_0x4cb598=useCallback(()=>{if(!multiSelect){_0x1db266(new Set([_0x27e6db]));return;}_0x1db266(_0x4cb09e=>{const _0x54ea27=a70_0xf209,_0xa18fd9=new Set(_0x4cb09e);return _0xa18fd9[_0x54ea27(0x1d2)](_0x27e6db)?_0xa18fd9[_0x54ea27(0x1db)](_0x27e6db):_0xa18fd9[_0x54ea27(0x1cb)](_0x27e6db),_0xa18fd9;});},[_0x27e6db,multiSelect]),_0x550708=useCallback(()=>{const _0x29759e=_0x18a4e0;_0x1db266(new Set(_0x26c8d7[_0x29759e(0x1cd)]((_0x531eb4,_0x1df408)=>_0x1df408)));},[_0x26c8d7]),_0x559d7b=useCallback(()=>{_0x1db266(_0x351000=>{const _0x4b4872=a70_0xf209,_0x1ed262=new Set();for(let _0x21a270=0x0;_0x21a270<_0x26c8d7[_0x4b4872(0x1d0)];_0x21a270++){!_0x351000[_0x4b4872(0x1d2)](_0x21a270)&&_0x1ed262['add'](_0x21a270);}return _0x1ed262;});},[_0x26c8d7]),_0x513cc8=useCallback(()=>{const _0x4d85ea=_0x18a4e0;return Array[_0x4d85ea(0x1cc)](_0x4cb1ce)[_0x4d85ea(0x1cd)](_0x551028=>_0x26c8d7[_0x551028]?.[_0x4d85ea(0x1d5)])[_0x4d85ea(0x1da)](_0x23cc2b=>_0x23cc2b!==undefined);},[_0x4cb1ce,_0x26c8d7]),_0x2841ce=useCallback(()=>{const _0x244045=_0x18a4e0;return _0x4cb1ce['size']===_0x26c8d7[_0x244045(0x1d0)];},[_0x4cb1ce,_0x26c8d7]),_0x4159d9=useCallback((_0x4dfffc,_0x4ab97c)=>{const _0x513446=_0x18a4e0;if(_0x4ab97c[_0x513446(0x1d3)])return _0x45a37d(),!![];if(_0x4ab97c['downArrow'])return _0x1fc321(),!![];if(_0x4dfffc==='\x20')return _0x4cb598(),!![];if(_0x4dfffc==='a'||_0x4dfffc==='A')return _0x550708(),!![];if(_0x4dfffc==='i'||_0x4dfffc==='I'||_0x4dfffc==='r'||_0x4dfffc==='R')return _0x559d7b(),!![];return![];},[_0x45a37d,_0x1fc321,_0x4cb598,_0x550708,_0x559d7b]);return{'selectedIndexes':_0x4cb1ce,'highlightIndex':_0x27e6db,'errorMsg':_0x50eac0,'setErrorMsg':_0x3d70cf,'handleKeyDown':_0x4159d9,'getSelectedIDEs':_0x513cc8,'isAllSelected':_0x2841ce,'toggleSelection':_0x4cb598,'selectAll':_0x550708,'invertSelection':_0x559d7b,'moveHighlightUp':_0x45a37d,'moveHighlightDown':_0x1fc321};}