@lovrabet/cli 1.2.5-beta.2 → 1.2.5-beta.4

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 (77) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -0
  5. package/lib/ai-setup/config.js +1 -0
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli.js +1 -1
  31. package/lib/cmd/build-watch.js +1 -1
  32. package/lib/cmd/build.js +1 -1
  33. package/lib/cmd/logs.js +1 -1
  34. package/lib/cmd/preview.js +1 -1
  35. package/lib/cmd/start.js +1 -1
  36. package/lib/config/config-help.js +1 -1
  37. package/lib/config/main.js +1 -1
  38. package/lib/constant/domain.js +1 -1
  39. package/lib/constant/env.js +1 -1
  40. package/lib/create-app/enhanced-guided-create.js +1 -1
  41. package/lib/create-app/format-elapsed.js +1 -1
  42. package/lib/create-app/main.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/init/main.js +1 -1
  52. package/lib/mcp/McpInstallUI.js +1 -0
  53. package/lib/mcp/claude.js +1 -1
  54. package/lib/mcp/cursor.js +1 -1
  55. package/lib/mcp/main.js +1 -1
  56. package/lib/skills/SkillInstallUI.js +1 -0
  57. package/lib/skills/main.js +1 -1
  58. package/lib/utils/check-sdk-version.js +1 -1
  59. package/lib/utils/config.js +1 -1
  60. package/lib/utils/copy-directory.js +1 -1
  61. package/lib/utils/http-client.js +1 -1
  62. package/lib/utils/logger.js +1 -1
  63. package/lib/utils/router-updater.js +1 -1
  64. package/lib/utils/sleep.js +1 -1
  65. package/lib/utils/template-replacer.js +1 -1
  66. package/package.json +1 -1
  67. package/templates/pages/blank/index.tsx.tpl +1 -2
  68. package/templates/pages/sdk-fetch/index.tsx.tpl +1 -2
  69. package/templates/rules/lovrabet_rules.mdc.tpl +109 -0
  70. package/templates/skills/.agent/skills/lovrabet/SKILL.md +258 -0
  71. package/templates/skills/.codebuddy/skills/lovrabet/SKILL.md +258 -0
  72. package/templates/skills/.codex/skills/lovrabet/SKILL.md +258 -0
  73. package/templates/skills/.opencode/skills/lovrabet/SKILL.md +258 -0
  74. package/templates/skills/.qoder/rules/lovrabet.md +258 -0
  75. package/templates/skills/.qoder/skills/lovrabet.md +258 -0
  76. package/templates/skills/.shared/guides/03-antd-style/guide.md +42 -0
  77. package/templates/skills/.trae/skills/lovrabet/SKILL.md +258 -0
@@ -1 +1 @@
1
- function a46_0x4bf4(_0x17d0bc,_0x1df18e){_0x17d0bc=_0x17d0bc-0x10b;const _0x1a4a9c=a46_0x1a4a();let _0x4bf4f6=_0x1a4a9c[_0x17d0bc];return _0x4bf4f6;}const a46_0x10938d=a46_0x4bf4;(function(_0x1c248d,_0x43ac74){const _0x171c39=a46_0x4bf4,_0x32ae10=_0x1c248d();while(!![]){try{const _0x300d02=parseInt(_0x171c39(0x117))/0x1*(-parseInt(_0x171c39(0x10f))/0x2)+-parseInt(_0x171c39(0x114))/0x3*(-parseInt(_0x171c39(0x11c))/0x4)+-parseInt(_0x171c39(0x119))/0x5+-parseInt(_0x171c39(0x10d))/0x6*(parseInt(_0x171c39(0x11e))/0x7)+-parseInt(_0x171c39(0x10e))/0x8*(parseInt(_0x171c39(0x11b))/0x9)+parseInt(_0x171c39(0x115))/0xa+parseInt(_0x171c39(0x10b))/0xb;if(_0x300d02===_0x43ac74)break;else _0x32ae10['push'](_0x32ae10['shift']());}catch(_0x1e5512){_0x32ae10['push'](_0x32ae10['shift']());}}}(a46_0x1a4a,0x6b0b0));function a46_0x1a4a(){const _0x17cbf4=['开始复制项目模板','resolve','error','message','17389911UydpNC','copy','30jOaDMF','8oDJSol','183230EeWPVY','dirname','info','success','项目模板复制失败','60ndFGIv','2889540CjFVsv','cwd','4VQvHkr','../../templates/projects/sub-app-react-demo','1984660DfUgxc','now','4507605RPmFQT','11412UodztZ','复制项目文件','313922mwQNWi'];a46_0x1a4a=function(){return _0x17cbf4;};return a46_0x1a4a();}import a46_0x1de3bf from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a46_0x1de3bf[a46_0x10938d(0x110)](fileURLToPath(import.meta.url)),templateDir=a46_0x1de3bf[a46_0x10938d(0x120)](__dirname,a46_0x10938d(0x118));export function useCopyProjectTemplate(){const _0x6777df=a46_0x10938d,[_0x1cf885,_0xef2ad3]=useState(![]),[_0x3a096e,_0x1b3a9c]=useState(![]),[_0x3f14b9,_0x1d7c40]=useState(''),_0x3ee31a=useCallback(async _0x371d94=>{const _0x2d4ffa=a46_0x4bf4,_0x4fe2ad=Date[_0x2d4ffa(0x11a)](),_0x5b6c70=a46_0x1de3bf[_0x2d4ffa(0x120)](process[_0x2d4ffa(0x116)](),_0x371d94);_0xef2ad3(!![]);try{logger[_0x2d4ffa(0x111)]('copy',_0x2d4ffa(0x11f),{'projectCode':_0x371d94,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5b6c70);const _0x581713=Date[_0x2d4ffa(0x11a)]()-_0x4fe2ad;logger[_0x2d4ffa(0x112)](_0x2d4ffa(0x10c),'项目模板复制完成',_0x581713,{'projectCode':_0x371d94});}catch(_0x25cc55){const _0x4fbffe=Date['now']()-_0x4fe2ad;logger[_0x2d4ffa(0x121)](_0x2d4ffa(0x10c),_0x2d4ffa(0x113),{'projectCode':_0x371d94,'error':_0x25cc55 instanceof Error?_0x25cc55[_0x2d4ffa(0x122)]:String(_0x25cc55),'duration':_0x4fbffe});throw _0x25cc55;}finally{_0xef2ad3(![]),_0x1b3a9c(!![]),_0x1d7c40(formatElapsed(_0x4fe2ad));}},[]);return{'taskName':_0x6777df(0x11d),'finished':_0x3a096e,'loading':_0x1cf885,'elapsed':_0x3f14b9,'doTask':_0x3ee31a};}
1
+ const a48_0x23c50f=a48_0x59da;(function(_0x1b8816,_0x769187){const _0x1090fd=a48_0x59da,_0x202850=_0x1b8816();while(!![]){try{const _0x92e95e=-parseInt(_0x1090fd(0xdb))/0x1*(-parseInt(_0x1090fd(0xe8))/0x2)+-parseInt(_0x1090fd(0xef))/0x3*(-parseInt(_0x1090fd(0xdd))/0x4)+-parseInt(_0x1090fd(0xe2))/0x5*(-parseInt(_0x1090fd(0xed))/0x6)+parseInt(_0x1090fd(0xdc))/0x7*(-parseInt(_0x1090fd(0xe4))/0x8)+-parseInt(_0x1090fd(0xee))/0x9*(parseInt(_0x1090fd(0xe9))/0xa)+parseInt(_0x1090fd(0xeb))/0xb*(parseInt(_0x1090fd(0xda))/0xc)+-parseInt(_0x1090fd(0xe7))/0xd;if(_0x92e95e===_0x769187)break;else _0x202850['push'](_0x202850['shift']());}catch(_0x542607){_0x202850['push'](_0x202850['shift']());}}}(a48_0x44a2,0xc39cd));import a48_0xbafde1 from'node:path';import{fileURLToPath}from'node:url';function a48_0x59da(_0xd40ae2,_0x1537be){_0xd40ae2=_0xd40ae2-0xd9;const _0x44a21d=a48_0x44a2();let _0x59da56=_0x44a21d[_0xd40ae2];return _0x59da56;}import{useCallback,useState}from'react';function a48_0x44a2(){const _0x2719e3=['项目模板复制失败','success','dirname','280815LfidFr','项目模板复制完成','59216yOMyeR','copy','开始复制项目模板','27335555EFCVnL','3026oYCHiE','50oPqZvF','复制项目文件','1011175qEgjWG','info','54ZajzmO','1586862pymTJv','3VwtzIK','now','../../templates/projects/sub-app-react-demo','168NvQxIf','902gcBGtp','70PXJdlm','2809724GpIBSv','message'];a48_0x44a2=function(){return _0x2719e3;};return a48_0x44a2();}import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a48_0xbafde1[a48_0x23c50f(0xe1)](fileURLToPath(import.meta.url)),templateDir=a48_0xbafde1['resolve'](__dirname,a48_0x23c50f(0xd9));export function useCopyProjectTemplate(){const _0x5cf27c=a48_0x23c50f,[_0xe11f03,_0x83966f]=useState(![]),[_0x2b35f7,_0x236221]=useState(![]),[_0x514b5d,_0x32f223]=useState(''),_0x54900b=useCallback(async _0x140670=>{const _0x2281cb=a48_0x59da,_0x84985c=Date[_0x2281cb(0xf0)](),_0x3e0c8e=a48_0xbafde1['resolve'](process['cwd'](),_0x140670);_0x83966f(!![]);try{logger[_0x2281cb(0xec)](_0x2281cb(0xe5),_0x2281cb(0xe6),{'projectCode':_0x140670,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3e0c8e);const _0x366e80=Date[_0x2281cb(0xf0)]()-_0x84985c;logger[_0x2281cb(0xe0)](_0x2281cb(0xe5),_0x2281cb(0xe3),_0x366e80,{'projectCode':_0x140670});}catch(_0x5a1033){const _0x1381b2=Date[_0x2281cb(0xf0)]()-_0x84985c;logger['error'](_0x2281cb(0xe5),_0x2281cb(0xdf),{'projectCode':_0x140670,'error':_0x5a1033 instanceof Error?_0x5a1033[_0x2281cb(0xde)]:String(_0x5a1033),'duration':_0x1381b2});throw _0x5a1033;}finally{_0x83966f(![]),_0x236221(!![]),_0x32f223(formatElapsed(_0x84985c));}},[]);return{'taskName':_0x5cf27c(0xea),'finished':_0x2b35f7,'loading':_0xe11f03,'elapsed':_0x514b5d,'doTask':_0x54900b};}
@@ -1 +1 @@
1
- function a47_0xee89(){const _0x3af258=['4109328yeUlZo','message','cwd','59682lvYnIc','551030EMDutr','代码格式化完成','info','now','--write','format','908612iohuIy','resolve','3696875dLSpCX','329xGiiOr','代码格式化失败','success','418952PJAmfs','prettier','开始格式化代码','1576452iEhKdJ'];a47_0xee89=function(){return _0x3af258;};return a47_0xee89();}(function(_0x505453,_0x141c6b){const _0x6b0eba=a47_0x82bc,_0x19399b=_0x505453();while(!![]){try{const _0x2fa2ea=parseInt(_0x6b0eba(0x198))/0x1+-parseInt(_0x6b0eba(0x199))/0x2+-parseInt(_0x6b0eba(0x194))/0x3+parseInt(_0x6b0eba(0x18b))/0x4+-parseInt(_0x6b0eba(0x18d))/0x5+-parseInt(_0x6b0eba(0x195))/0x6+-parseInt(_0x6b0eba(0x18e))/0x7*(-parseInt(_0x6b0eba(0x191))/0x8);if(_0x2fa2ea===_0x141c6b)break;else _0x19399b['push'](_0x19399b['shift']());}catch(_0x571ac8){_0x19399b['push'](_0x19399b['shift']());}}}(a47_0xee89,0x7faa4));import a47_0x3ec57d from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a47_0x82bc(_0x4dc3d8,_0x1e6ef1){_0x4dc3d8=_0x4dc3d8-0x18b;const _0xee893d=a47_0xee89();let _0x82bc3c=_0xee893d[_0x4dc3d8];return _0x82bc3c;}import{logger}from'../utils/logger.js';export function useFormatCode(){const [_0x57a9ce,_0x8ab1b0]=useState(![]),[_0x2ba668,_0x5abac1]=useState(![]),[_0x48abf9,_0x25bfe5]=useState(''),_0x260dda=useCallback(async _0x5a0d8e=>{const _0x1bf3ea=a47_0x82bc,_0x4d79c7=Date['now'](),_0x5bdeab=a47_0x3ec57d[_0x1bf3ea(0x18c)](process[_0x1bf3ea(0x197)](),_0x5a0d8e);_0x8ab1b0(!![]);try{logger[_0x1bf3ea(0x19b)](_0x1bf3ea(0x19e),_0x1bf3ea(0x193),{'projectCode':_0x5a0d8e}),await execa('npx',[_0x1bf3ea(0x192),_0x1bf3ea(0x19d),'.'],{'cwd':_0x5bdeab});const _0x37dc8f=Date[_0x1bf3ea(0x19c)]()-_0x4d79c7;logger[_0x1bf3ea(0x190)]('format',_0x1bf3ea(0x19a),_0x37dc8f,{'projectCode':_0x5a0d8e});}catch(_0x41ceb2){const _0x1781a5=Date[_0x1bf3ea(0x19c)]()-_0x4d79c7;logger['error']('format',_0x1bf3ea(0x18f),{'projectCode':_0x5a0d8e,'error':_0x41ceb2 instanceof Error?_0x41ceb2[_0x1bf3ea(0x196)]:String(_0x41ceb2),'duration':_0x1781a5});throw _0x41ceb2;}finally{_0x8ab1b0(![]),_0x5abac1(!![]),_0x25bfe5(formatElapsed(_0x4d79c7));}},[]);return{'taskName':'格式化代码','finished':_0x2ba668,'loading':_0x57a9ce,'elapsed':_0x48abf9,'doTask':_0x260dda};}
1
+ (function(_0x1d49c5,_0x1c45f0){const _0x1a6084=a49_0x45c9,_0x5b5548=_0x1d49c5();while(!![]){try{const _0x3939b0=parseInt(_0x1a6084(0x118))/0x1+-parseInt(_0x1a6084(0x109))/0x2+parseInt(_0x1a6084(0x114))/0x3*(-parseInt(_0x1a6084(0x10d))/0x4)+parseInt(_0x1a6084(0x113))/0x5*(parseInt(_0x1a6084(0x110))/0x6)+parseInt(_0x1a6084(0x111))/0x7*(parseInt(_0x1a6084(0x112))/0x8)+parseInt(_0x1a6084(0x10c))/0x9+-parseInt(_0x1a6084(0x10a))/0xa;if(_0x3939b0===_0x1c45f0)break;else _0x5b5548['push'](_0x5b5548['shift']());}catch(_0x5a4784){_0x5b5548['push'](_0x5b5548['shift']());}}}(a49_0x5e0b,0x666a2));import a49_0x32ba92 from'node:path';import{useCallback,useState}from'react';function a49_0x45c9(_0x2bf106,_0x64eb92){_0x2bf106=_0x2bf106-0x106;const _0x5e0b67=a49_0x5e0b();let _0x45c9fd=_0x5e0b67[_0x2bf106];return _0x45c9fd;}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a49_0x5e0b(){const _0x571ae2=['4434zDfAzr','now','message','error','521229qIszBJ','代码格式化失败','format','开始格式化代码','377384RJhrUM','9225810QNIfSV','prettier','5654421ZNvwBA','780aFHEqC','cwd','resolve','104682tSAsjP','1915711TbamBB','16XBnESK','35gvkpEX'];a49_0x5e0b=function(){return _0x571ae2;};return a49_0x5e0b();}import{logger}from'../utils/logger.js';export function useFormatCode(){const [_0x3f0d72,_0x1feadc]=useState(![]),[_0x38ea02,_0x2898b1]=useState(![]),[_0x23ff57,_0x1e2917]=useState(''),_0x58cdcd=useCallback(async _0x387c64=>{const _0x347280=a49_0x45c9,_0x10d00b=Date[_0x347280(0x115)](),_0x2a3987=a49_0x32ba92[_0x347280(0x10f)](process[_0x347280(0x10e)](),_0x387c64);_0x1feadc(!![]);try{logger['info'](_0x347280(0x107),_0x347280(0x108),{'projectCode':_0x387c64}),await execa('npx',[_0x347280(0x10b),'--write','.'],{'cwd':_0x2a3987});const _0x5e8855=Date['now']()-_0x10d00b;logger['success']('format','代码格式化完成',_0x5e8855,{'projectCode':_0x387c64});}catch(_0xca5605){const _0x1082ab=Date[_0x347280(0x115)]()-_0x10d00b;logger[_0x347280(0x117)](_0x347280(0x107),_0x347280(0x106),{'projectCode':_0x387c64,'error':_0xca5605 instanceof Error?_0xca5605[_0x347280(0x116)]:String(_0xca5605),'duration':_0x1082ab});throw _0xca5605;}finally{_0x1feadc(![]),_0x2898b1(!![]),_0x1e2917(formatElapsed(_0x10d00b));}},[]);return{'taskName':'格式化代码','finished':_0x38ea02,'loading':_0x3f0d72,'elapsed':_0x23ff57,'doTask':_0x58cdcd};}
@@ -1 +1 @@
1
- (function(_0x4ff563,_0x1eed1c){const _0x23cec3=a48_0x41f9,_0x1ccf63=_0x4ff563();while(!![]){try{const _0x42b60a=parseInt(_0x23cec3(0x170))/0x1+-parseInt(_0x23cec3(0x169))/0x2+-parseInt(_0x23cec3(0x16b))/0x3*(-parseInt(_0x23cec3(0x175))/0x4)+parseInt(_0x23cec3(0x178))/0x5+parseInt(_0x23cec3(0x177))/0x6*(parseInt(_0x23cec3(0x16c))/0x7)+parseInt(_0x23cec3(0x179))/0x8+parseInt(_0x23cec3(0x16f))/0x9*(-parseInt(_0x23cec3(0x17b))/0xa);if(_0x42b60a===_0x1eed1c)break;else _0x1ccf63['push'](_0x1ccf63['shift']());}catch(_0x47aad8){_0x1ccf63['push'](_0x1ccf63['shift']());}}}(a48_0x4cff,0x8d2d9));function a48_0x4cff(){const _0x33b9d5=['安装依赖','3784652IstmTp','npm','50412xvIJob','4691810uTCAAV','8043088oLTgnv','cwd','1413470KEvVLb','message','install','2148890oEyKJC','resolve','3jJNSxe','679lqVvyQ','error','info','189QfDyAI','916092XipWHh','开始安装依赖','now','https://registry.npmmirror.com'];a48_0x4cff=function(){return _0x33b9d5;};return a48_0x4cff();}import a48_0x2e4176 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a48_0x41f9(_0x241aa8,_0x2cc364){_0x241aa8=_0x241aa8-0x167;const _0x4cff54=a48_0x4cff();let _0x41f90f=_0x4cff54[_0x241aa8];return _0x41f90f;}export function useInstallDependencies(){const _0x4efc64=a48_0x41f9,[_0x444368,_0x225c34]=useState(![]),[_0x5d052a,_0x41df4b]=useState(![]),[_0x22a0ab,_0x29a451]=useState(''),_0x1e01a0=useCallback(async _0x102779=>{const _0x38c7cb=a48_0x41f9,_0x474ed8=Date[_0x38c7cb(0x172)](),_0x5453ee=a48_0x2e4176[_0x38c7cb(0x16a)](process[_0x38c7cb(0x17a)](),_0x102779);_0x225c34(!![]),_0x41df4b(![]);const _0x9bc011=async(_0x3b6969,_0x148662)=>{await execa(_0x3b6969,_0x148662,{'cwd':_0x5453ee});};try{logger[_0x38c7cb(0x16e)](_0x38c7cb(0x168),_0x38c7cb(0x171),{'projectCode':_0x102779,'registry':'https://registry.npmmirror.com'}),await _0x9bc011(_0x38c7cb(0x176),[_0x38c7cb(0x168),'--registry',_0x38c7cb(0x173)]);const _0x41db3d=Date[_0x38c7cb(0x172)]()-_0x474ed8;logger['success'](_0x38c7cb(0x168),'依赖安装完成',_0x41db3d,{'projectCode':_0x102779});}catch(_0x33cbdc){const _0x4b0c01=Date[_0x38c7cb(0x172)]()-_0x474ed8;logger[_0x38c7cb(0x16d)](_0x38c7cb(0x168),'依赖安装失败',{'projectCode':_0x102779,'error':_0x33cbdc instanceof Error?_0x33cbdc[_0x38c7cb(0x167)]:String(_0x33cbdc),'duration':_0x4b0c01});throw _0x33cbdc;}finally{_0x225c34(![]),_0x41df4b(!![]),_0x29a451(formatElapsed(_0x474ed8));}},[]);return{'taskName':_0x4efc64(0x174),'finished':_0x5d052a,'loading':_0x444368,'elapsed':_0x22a0ab,'doTask':_0x1e01a0};}
1
+ function a50_0x3c94(_0xf90a1c,_0x3f2a17){_0xf90a1c=_0xf90a1c-0xc7;const _0x46e349=a50_0x46e3();let _0x3c9459=_0x46e349[_0xf90a1c];return _0x3c9459;}(function(_0xeed05b,_0x38bf13){const _0x151ecc=a50_0x3c94,_0x538c4e=_0xeed05b();while(!![]){try{const _0x32e047=parseInt(_0x151ecc(0xd4))/0x1+-parseInt(_0x151ecc(0xd9))/0x2*(parseInt(_0x151ecc(0xd7))/0x3)+-parseInt(_0x151ecc(0xcc))/0x4+parseInt(_0x151ecc(0xd8))/0x5+parseInt(_0x151ecc(0xca))/0x6*(-parseInt(_0x151ecc(0xd2))/0x7)+parseInt(_0x151ecc(0xcb))/0x8+parseInt(_0x151ecc(0xd3))/0x9;if(_0x32e047===_0x38bf13)break;else _0x538c4e['push'](_0x538c4e['shift']());}catch(_0x3b06a3){_0x538c4e['push'](_0x538c4e['shift']());}}}(a50_0x46e3,0x2396f));import a50_0x57ee87 from'node:path';import{useCallback,useState}from'react';function a50_0x46e3(){const _0xa0ebb5=['6334neCvTS','cwd','now','开始安装依赖','18DPpUiY','268568bYQqfe','3156YtuDJn','install','info','https://registry.npmmirror.com','依赖安装失败','message','657475trkgPX','109926hVLfro','171193xmlneW','success','安装依赖','3buiBys','1072640mHUTTB'];a50_0x46e3=function(){return _0xa0ebb5;};return a50_0x46e3();}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x387400=a50_0x3c94,[_0x4a41a3,_0x949fc4]=useState(![]),[_0x411ecc,_0x44aad4]=useState(![]),[_0x3d5ea6,_0x43c061]=useState(''),_0x2376c3=useCallback(async _0x1fc131=>{const _0x2ae04f=a50_0x3c94,_0x56519f=Date[_0x2ae04f(0xc8)](),_0x20ca12=a50_0x57ee87['resolve'](process[_0x2ae04f(0xc7)](),_0x1fc131);_0x949fc4(!![]),_0x44aad4(![]);const _0x2bd081=async(_0x4b21c9,_0x62ec)=>{await execa(_0x4b21c9,_0x62ec,{'cwd':_0x20ca12});};try{logger[_0x2ae04f(0xce)](_0x2ae04f(0xcd),_0x2ae04f(0xc9),{'projectCode':_0x1fc131,'registry':_0x2ae04f(0xcf)}),await _0x2bd081('npm',[_0x2ae04f(0xcd),'--registry',_0x2ae04f(0xcf)]);const _0x449a22=Date[_0x2ae04f(0xc8)]()-_0x56519f;logger[_0x2ae04f(0xd5)](_0x2ae04f(0xcd),'依赖安装完成',_0x449a22,{'projectCode':_0x1fc131});}catch(_0x47ade1){const _0x4bb87e=Date['now']()-_0x56519f;logger['error']('install',_0x2ae04f(0xd0),{'projectCode':_0x1fc131,'error':_0x47ade1 instanceof Error?_0x47ade1[_0x2ae04f(0xd1)]:String(_0x47ade1),'duration':_0x4bb87e});throw _0x47ade1;}finally{_0x949fc4(![]),_0x44aad4(!![]),_0x43c061(formatElapsed(_0x56519f));}},[]);return{'taskName':_0x387400(0xd6),'finished':_0x411ecc,'loading':_0x4a41a3,'elapsed':_0x3d5ea6,'doTask':_0x2376c3};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a49_0x2f2e(){var _0xf51c33=['7ZJTjuA','10670yaJXSG','green','10kUGSHJ','200286rGewBW','查看可用命令。','46336ybRXym','267mMxphA','15273GrFVxS','1304AioYqg','12iaKyTG','1453182SbYQcf','2687971OXhXfV','lovrabet\x20--help','1321120ufLQJU','!\x20请指定一个有效的命令。'];a49_0x2f2e=function(){return _0xf51c33;};return a49_0x2f2e();}(function(_0x572544,_0x4191dd){var _0x1fb549=a49_0x1418,_0x579a09=_0x572544();while(!![]){try{var _0x2e59e=parseInt(_0x1fb549(0xc8))/0x1+-parseInt(_0x1fb549(0xc5))/0x2*(-parseInt(_0x1fb549(0xcb))/0x3)+-parseInt(_0x1fb549(0xca))/0x4*(parseInt(_0x1fb549(0xc7))/0x5)+parseInt(_0x1fb549(0xcf))/0x6*(parseInt(_0x1fb549(0xd4))/0x7)+parseInt(_0x1fb549(0xcd))/0x8*(-parseInt(_0x1fb549(0xcc))/0x9)+-parseInt(_0x1fb549(0xd2))/0xa+parseInt(_0x1fb549(0xd0))/0xb*(-parseInt(_0x1fb549(0xce))/0xc);if(_0x2e59e===_0x4191dd)break;else _0x579a09['push'](_0x579a09['shift']());}catch(_0x3fe9e7){_0x579a09['push'](_0x579a09['shift']());}}}(a49_0x2f2e,0x3ad96));import{jsx as a49_0x17d992,jsxs as a49_0x3610e6}from'react/jsx-runtime';function a49_0x1418(_0x4d6711,_0x279dde){_0x4d6711=_0x4d6711-0xc5;var _0x2f2e30=a49_0x2f2e();var _0x1418ee=_0x2f2e30[_0x4d6711];return _0x1418ee;}import{Box,Text}from'ink';export function Help(){var _0x40fa4d=a49_0x1418;return a49_0x3610e6(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a49_0x3610e6(Box,{'children':[a49_0x17d992(Box,{'width':'1'}),a49_0x17d992(Text,{'children':_0x40fa4d(0xd3)})]}),a49_0x3610e6(Box,{'marginTop':0x1,'children':[a49_0x17d992(Box,{'width':'1'}),a49_0x3610e6(Text,{'children':['\x20\x20','使用']}),a49_0x3610e6(Text,{'bold':!![],'color':_0x40fa4d(0xc6),'children':['\x20',_0x40fa4d(0xd1),'\x20']}),a49_0x17d992(Text,{'children':_0x40fa4d(0xc9)})]})]});}
1
+ function a51_0x2a24(_0xec9c3f,_0x461fdd){_0xec9c3f=_0xec9c3f-0x1de;var _0x163c83=a51_0x163c();var _0x2a240b=_0x163c83[_0xec9c3f];return _0x2a240b;}(function(_0x4a85d5,_0x25a73){var _0x3f2497=a51_0x2a24,_0x34538c=_0x4a85d5();while(!![]){try{var _0x52ecfe=-parseInt(_0x3f2497(0x1e3))/0x1*(-parseInt(_0x3f2497(0x1e6))/0x2)+-parseInt(_0x3f2497(0x1e2))/0x3+-parseInt(_0x3f2497(0x1df))/0x4+-parseInt(_0x3f2497(0x1e9))/0x5*(-parseInt(_0x3f2497(0x1de))/0x6)+parseInt(_0x3f2497(0x1e5))/0x7*(parseInt(_0x3f2497(0x1e7))/0x8)+-parseInt(_0x3f2497(0x1e0))/0x9*(parseInt(_0x3f2497(0x1e1))/0xa)+parseInt(_0x3f2497(0x1e8))/0xb;if(_0x52ecfe===_0x25a73)break;else _0x34538c['push'](_0x34538c['shift']());}catch(_0x4b72a){_0x34538c['push'](_0x34538c['shift']());}}}(a51_0x163c,0x30843));import{jsx as a51_0x5ce73f,jsxs as a51_0x4de4d5}from'react/jsx-runtime';function a51_0x163c(){var _0x306798=['1Onkrfh','green','367801YIDzgG','147094jbKDIz','8SPxNlp','4888312pmwBqS','5XXEGvt','!\x20请指定一个有效的命令。','1842276YrYZmq','831976hQDpiP','3100158SPowtM','10clBDAh','379047mKXDEa'];a51_0x163c=function(){return _0x306798;};return a51_0x163c();}import{Box,Text}from'ink';export function Help(){var _0x2011d6=a51_0x2a24;return a51_0x4de4d5(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a51_0x4de4d5(Box,{'children':[a51_0x5ce73f(Box,{'width':'1'}),a51_0x5ce73f(Text,{'children':_0x2011d6(0x1ea)})]}),a51_0x4de4d5(Box,{'marginTop':0x1,'children':[a51_0x5ce73f(Box,{'width':'1'}),a51_0x4de4d5(Text,{'children':['\x20\x20','使用']}),a51_0x4de4d5(Text,{'bold':!![],'color':_0x2011d6(0x1e4),'children':['\x20','lovrabet\x20--help','\x20']}),a51_0x5ce73f(Text,{'children':'查看可用命令。'})]})]});}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- function a50_0x26ca(){const _0x2ce860=['slice','247910pfArJd','创建配置文件失败','ctrl','7IIUrlr','应用代码只能包含字母、数字、-\x20和\x20_','stringify','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','package.json','red','test','311754YfbqJj','\x20←\x20','当前目录已存在\x20.lovrabetrc\x20文件','52ngZEAW','green','version','cwd','请输入应用代码\x20(AppCode):\x20','online','gray','AppCode:\x20','应用代码不合法','348567mjgMpk','cyan','3040776dABNIv','1161120bPjTWc','应用代码长度不能超过\x20100\x20个字符','string','return','utf8','message','11614392EILmtx','error','890000onuyvv','exit','应用代码不能为空','parse','初始化项目配置文件成功','init','length','创建配置文件失败:\x20','setLogPath','delete','toLocaleString','column','env','1.0.0'];a50_0x26ca=function(){return _0x2ce860;};return a50_0x26ca();}(function(_0x2d4518,_0xeec401){const _0x1e72fe=a50_0x192d,_0x52b515=_0x2d4518();while(!![]){try{const _0x30ef96=parseInt(_0x1e72fe(0xbe))/0x1+parseInt(_0x1e72fe(0xc6))/0x2+parseInt(_0x1e72fe(0xbb))/0x3+-parseInt(_0x1e72fe(0xe2))/0x4*(-parseInt(_0x1e72fe(0xd5))/0x5)+-parseInt(_0x1e72fe(0xdf))/0x6*(parseInt(_0x1e72fe(0xd8))/0x7)+-parseInt(_0x1e72fe(0xbd))/0x8+-parseInt(_0x1e72fe(0xc4))/0x9;if(_0x30ef96===_0xeec401)break;else _0x52b515['push'](_0x52b515['shift']());}catch(_0x47b698){_0x52b515['push'](_0x52b515['shift']());}}}(a50_0x26ca,0x9d4eb));function a50_0x192d(_0x361fc1,_0x34a3cf){_0x361fc1=_0x361fc1-0xb4;const _0x26caae=a50_0x26ca();let _0x192d88=_0x26caae[_0x361fc1];return _0x192d88;}import{jsxs as a50_0x12b968,jsx as a50_0x3559c8}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x4bce66,env:_0x27cfe4}){const _0x22a362=a50_0x192d,[_0x5a46c8,_0x3ffe3a]=useState(null),[_0x1e8e62,_0xf19e00]=useState(![]),[_0xa82fb7,_0x585e72]=useState(!_0x4bce66),[_0x3b5d32,_0x25dbc8]=useState(''),[_0x368bf0,_0x319703]=useState(''),[_0x2acca9,_0xba5edc]=useState(_0x4bce66||''),[_0x2e7fcd]=useState(_0x27cfe4);function _0x2355f5(_0x2496bd){const _0x195c69=a50_0x192d;if(_0x2496bd[_0x195c69(0xcc)]===0x0)return{'valid':![],'message':''};if(_0x2496bd[_0x195c69(0xcc)]>0x64)return{'valid':![],'message':_0x195c69(0xbf)};const _0x42462d=/^[A-Za-z0-9_-]+$/;if(!_0x42462d[_0x195c69(0xde)](_0x2496bd))return{'valid':![],'message':_0x195c69(0xd9)};return{'valid':!![]};}useInput((_0x2c4cb5,_0x12c1e8)=>{const _0x49664b=a50_0x192d;if(!_0xa82fb7)return;if(_0x12c1e8[_0x49664b(0xc1)]){if(_0x368bf0||!_0x3b5d32['trim']()){_0x319703(_0x49664b(0xc8));return;}const _0x370a87=_0x3b5d32['trim'](),{valid:_0xafd7b1,message:_0x1c684f}=_0x2355f5(_0x370a87);if(!_0xafd7b1){_0x319703(_0x1c684f||_0x49664b(0xba));return;}_0xba5edc(_0x370a87),_0x585e72(![]);}else{if(_0x12c1e8['backspace']||_0x12c1e8[_0x49664b(0xcf)])_0x25dbc8(_0x2fbf32=>{const _0x2ed4ec=_0x49664b,_0x4f5a37=_0x2fbf32[_0x2ed4ec(0xd4)](0x0,-0x1);if(_0x4f5a37[_0x2ed4ec(0xcc)]===0x0)_0x319703('');else{const {valid:_0x1ef030,message:_0x554518}=_0x2355f5(_0x4f5a37);_0x319703(_0x1ef030?'':_0x554518||'应用代码不合法');}return _0x4f5a37;});else _0x12c1e8[_0x49664b(0xd7)]&&_0x2c4cb5==='c'?process[_0x49664b(0xc7)](0x0):_0x25dbc8(_0xbf5e31=>{const _0x332cbb=_0xbf5e31+_0x2c4cb5,{valid:_0xca2979,message:_0x211bfa}=_0x2355f5(_0x332cbb);return _0x319703(_0xca2979?'':_0x211bfa||'应用代码不合法'),_0x332cbb;});}},{'isActive':_0xa82fb7}),useEffect(()=>{const _0x1fc9e3=a50_0x192d;if(!_0x2acca9||_0xa82fb7)return;const _0x1196a6=resolve(process[_0x1fc9e3(0xb5)](),'.lovrabetrc');if(existsSync(_0x1196a6)){_0x3ffe3a(_0x1fc9e3(0xe1)),setTimeout(()=>process[_0x1fc9e3(0xc7)](0x1),0x64);return;}try{const _0x4b4b2d=fileURLToPath(import.meta.url),_0x3d8c28=resolve(dirname(_0x4b4b2d),'../..'),_0x5a173b=join(_0x3d8c28,_0x1fc9e3(0xdc));let _0x29683f=_0x1fc9e3(0xd3);try{const _0x594e88=JSON[_0x1fc9e3(0xc9)](readFileSync(_0x5a173b,_0x1fc9e3(0xc2)));_0x29683f=_0x594e88[_0x1fc9e3(0xb4)]||_0x1fc9e3(0xd3);}catch(_0x1b585a){}const _0x26def3=readConfig(),_0x50a7cb=typeof _0x26def3[_0x1fc9e3(0xd2)]===_0x1fc9e3(0xc0)?_0x26def3[_0x1fc9e3(0xd2)]:undefined,{app:_0x7428a2,appcode:_0x32be9b,..._0x305ed0}=_0x26def3,_0x555c1b={..._0x305ed0,'appcode':_0x2acca9,'env':_0x2e7fcd||_0x50a7cb||_0x1fc9e3(0xb7),'createdAt':new Date()[_0x1fc9e3(0xd0)](),'version':_0x29683f};writeFileSync(_0x1196a6,JSON[_0x1fc9e3(0xda)](_0x555c1b,null,0x2),{'encoding':_0x1fc9e3(0xc2),'mode':0x180}),logger[_0x1fc9e3(0xce)](process[_0x1fc9e3(0xb5)]()),logger['info'](_0x1fc9e3(0xcb),_0x1fc9e3(0xca),{'appcode':_0x2acca9,'env':_0x555c1b[_0x1fc9e3(0xd2)],'version':_0x555c1b[_0x1fc9e3(0xb4)],'configPath':_0x1196a6}),_0xf19e00(!![]),setTimeout(()=>process[_0x1fc9e3(0xc7)](0x0),0x64);}catch(_0x383038){logger[_0x1fc9e3(0xc5)](_0x1fc9e3(0xcb),_0x1fc9e3(0xd6),{'error':_0x383038 instanceof Error?_0x383038[_0x1fc9e3(0xc3)]:String(_0x383038)}),_0x3ffe3a(_0x1fc9e3(0xcd)+(_0x383038 instanceof Error?_0x383038['message']:String(_0x383038))),setTimeout(()=>process[_0x1fc9e3(0xc7)](0x1),0x64);}},[_0x2acca9,_0xa82fb7,_0x2e7fcd]);if(_0x5a46c8)return a50_0x3559c8(Box,{'flexDirection':_0x22a362(0xd1),'children':a50_0x12b968(Text,{'color':_0x22a362(0xdd),'children':['✗\x20',_0x5a46c8]})});if(_0xa82fb7)return a50_0x12b968(Box,{'flexDirection':_0x22a362(0xd1),'children':[a50_0x12b968(Box,{'children':[a50_0x3559c8(Text,{'color':_0x22a362(0xbc),'children':_0x22a362(0xb6)}),_0x3b5d32?a50_0x3559c8(Text,{'color':_0x22a362(0xe3),'children':_0x3b5d32}):a50_0x3559c8(Text,{'color':_0x22a362(0xb8),'children':'_'}),_0x368bf0&&a50_0x12b968(Text,{'color':'red','children':[_0x22a362(0xe0),_0x368bf0]})]}),!_0x368bf0&&!_0x3b5d32&&a50_0x3559c8(Box,{'children':a50_0x3559c8(Text,{'color':_0x22a362(0xb8),'children':'应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_'})})]});if(_0x1e8e62)return a50_0x12b968(Box,{'flexDirection':_0x22a362(0xd1),'children':[a50_0x3559c8(Text,{'color':_0x22a362(0xe3),'children':_0x22a362(0xdb)}),a50_0x12b968(Text,{'color':_0x22a362(0xbc),'children':[_0x22a362(0xb9),_0x2acca9]}),a50_0x3559c8(Text,{'children':'现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了'})]});return a50_0x3559c8(Box,{'children':a50_0x3559c8(Text,{'children':'正在初始化配置文件...'})});}
1
+ function a52_0x3965(){const _0x401756=['正在初始化配置文件...','应用代码只能包含字母、数字、-\x20和\x20_','当前目录已存在\x20.lovrabetrc\x20文件','64863ilUOfR','✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件','创建配置文件失败:\x20','1432qUytuA','env','ctrl','19730rstQxJ','1461296bwPyoO','length','package.json','6766120ANlwxA','请输入应用代码\x20(AppCode):\x20','初始化项目配置文件成功','column','string','创建配置文件失败','5031300nTGLht','197qSQoou','stringify','应用代码不合法','delete','parse','gray','trim','exit','utf8','message','toLocaleString','AppCode:\x20','version','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','init','info','.lovrabetrc','red','4942434fUgQFz','应用代码不能为空','cwd','green','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','setLogPath','12HUDfEj','cyan','error','2451310VMMLqc','\x20←\x20','1.0.0','return'];a52_0x3965=function(){return _0x401756;};return a52_0x3965();}(function(_0x1d58b7,_0x1b4f4c){const _0x4d4d2a=a52_0x3289,_0x2df639=_0x1d58b7();while(!![]){try{const _0x1e1f9b=-parseInt(_0x4d4d2a(0x82))/0x1*(parseInt(_0x4d4d2a(0x77))/0x2)+parseInt(_0x4d4d2a(0x81))/0x3+parseInt(_0x4d4d2a(0x78))/0x4+parseInt(_0x4d4d2a(0x6a))/0x5*(parseInt(_0x4d4d2a(0x67))/0x6)+-parseInt(_0x4d4d2a(0x94))/0x7+-parseInt(_0x4d4d2a(0x74))/0x8*(-parseInt(_0x4d4d2a(0x71))/0x9)+-parseInt(_0x4d4d2a(0x7b))/0xa;if(_0x1e1f9b===_0x1b4f4c)break;else _0x2df639['push'](_0x2df639['shift']());}catch(_0x2a33cd){_0x2df639['push'](_0x2df639['shift']());}}}(a52_0x3965,0xf0f2a));import{jsxs as a52_0x3566f2,jsx as a52_0x497874}from'react/jsx-runtime';import{useState,useEffect}from'react';function a52_0x3289(_0x33b2e1,_0x597525){_0x33b2e1=_0x33b2e1-0x66;const _0x396572=a52_0x3965();let _0x328987=_0x396572[_0x33b2e1];return _0x328987;}import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';export function Init({appcode:_0x5210f2,env:_0x236711}){const _0x522d9e=a52_0x3289,[_0x59c55a,_0x8033bb]=useState(null),[_0x315cf2,_0x27230b]=useState(![]),[_0x12b65a,_0x40f2de]=useState(!_0x5210f2),[_0x3d5898,_0x922acc]=useState(''),[_0x2cf35d,_0x254514]=useState(''),[_0x575a24,_0x49beb9]=useState(_0x5210f2||''),[_0x6f5ec2]=useState(_0x236711);function _0x3004b0(_0x51d24d){const _0x4047fd=a52_0x3289;if(_0x51d24d[_0x4047fd(0x79)]===0x0)return{'valid':![],'message':''};if(_0x51d24d[_0x4047fd(0x79)]>0x64)return{'valid':![],'message':'应用代码长度不能超过\x20100\x20个字符'};const _0x39d04c=/^[A-Za-z0-9_-]+$/;if(!_0x39d04c['test'](_0x51d24d))return{'valid':![],'message':_0x4047fd(0x6f)};return{'valid':!![]};}useInput((_0xfc3f66,_0x41dd6f)=>{const _0x16b4b8=a52_0x3289;if(!_0x12b65a)return;if(_0x41dd6f[_0x16b4b8(0x6d)]){if(_0x2cf35d||!_0x3d5898[_0x16b4b8(0x88)]()){_0x254514(_0x16b4b8(0x95));return;}const _0x4fabbb=_0x3d5898[_0x16b4b8(0x88)](),{valid:_0x31f2bb,message:_0x2b8069}=_0x3004b0(_0x4fabbb);if(!_0x31f2bb){_0x254514(_0x2b8069||_0x16b4b8(0x84));return;}_0x49beb9(_0x4fabbb),_0x40f2de(![]);}else{if(_0x41dd6f['backspace']||_0x41dd6f[_0x16b4b8(0x85)])_0x922acc(_0x24e3a1=>{const _0x3a1892=_0x16b4b8,_0x54df9d=_0x24e3a1['slice'](0x0,-0x1);if(_0x54df9d[_0x3a1892(0x79)]===0x0)_0x254514('');else{const {valid:_0x3b541e,message:_0x31c20d}=_0x3004b0(_0x54df9d);_0x254514(_0x3b541e?'':_0x31c20d||'应用代码不合法');}return _0x54df9d;});else _0x41dd6f[_0x16b4b8(0x76)]&&_0xfc3f66==='c'?process[_0x16b4b8(0x89)](0x0):_0x922acc(_0x33ed59=>{const _0x45153d=_0x16b4b8,_0x165275=_0x33ed59+_0xfc3f66,{valid:_0x284021,message:_0x324cb3}=_0x3004b0(_0x165275);return _0x254514(_0x284021?'':_0x324cb3||_0x45153d(0x84)),_0x165275;});}},{'isActive':_0x12b65a}),useEffect(()=>{const _0x2f0039=a52_0x3289;if(!_0x575a24||_0x12b65a)return;const _0x1f3ce6=resolve(process[_0x2f0039(0x96)](),_0x2f0039(0x92));if(existsSync(_0x1f3ce6)){_0x8033bb(_0x2f0039(0x70)),setTimeout(()=>process[_0x2f0039(0x89)](0x1),0x64);return;}try{const _0x8375c6=fileURLToPath(import.meta.url),_0x4c0d3b=resolve(dirname(_0x8375c6),'../..'),_0xd4660f=join(_0x4c0d3b,_0x2f0039(0x7a));let _0x11d6d0=_0x2f0039(0x6c);try{const _0xb46de6=JSON[_0x2f0039(0x86)](readFileSync(_0xd4660f,_0x2f0039(0x8a)));_0x11d6d0=_0xb46de6[_0x2f0039(0x8e)]||_0x2f0039(0x6c);}catch(_0x527aee){}const _0x14b1d8=readConfig(),_0x1e433a=typeof _0x14b1d8[_0x2f0039(0x75)]===_0x2f0039(0x7f)?_0x14b1d8[_0x2f0039(0x75)]:undefined,{app:_0x131603,appcode:_0x25603f,..._0x127e44}=_0x14b1d8,_0x15e2dc={..._0x127e44,'appcode':_0x575a24,'env':_0x6f5ec2||_0x1e433a||'online','createdAt':new Date()[_0x2f0039(0x8c)](),'version':_0x11d6d0};writeFileSync(_0x1f3ce6,JSON[_0x2f0039(0x83)](_0x15e2dc,null,0x2),{'encoding':_0x2f0039(0x8a),'mode':0x180}),logger[_0x2f0039(0x66)](process[_0x2f0039(0x96)]()),logger[_0x2f0039(0x91)](_0x2f0039(0x90),_0x2f0039(0x7d),{'appcode':_0x575a24,'env':_0x15e2dc[_0x2f0039(0x75)],'version':_0x15e2dc['version'],'configPath':_0x1f3ce6}),_0x27230b(!![]),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x20354d){logger[_0x2f0039(0x69)](_0x2f0039(0x90),_0x2f0039(0x80),{'error':_0x20354d instanceof Error?_0x20354d['message']:String(_0x20354d)}),_0x8033bb(_0x2f0039(0x73)+(_0x20354d instanceof Error?_0x20354d[_0x2f0039(0x8b)]:String(_0x20354d))),setTimeout(()=>process[_0x2f0039(0x89)](0x1),0x64);}},[_0x575a24,_0x12b65a,_0x6f5ec2]);if(_0x59c55a)return a52_0x497874(Box,{'flexDirection':'column','children':a52_0x3566f2(Text,{'color':_0x522d9e(0x93),'children':['✗\x20',_0x59c55a]})});if(_0x12b65a)return a52_0x3566f2(Box,{'flexDirection':_0x522d9e(0x7e),'children':[a52_0x3566f2(Box,{'children':[a52_0x497874(Text,{'color':'cyan','children':_0x522d9e(0x7c)}),_0x3d5898?a52_0x497874(Text,{'color':_0x522d9e(0x97),'children':_0x3d5898}):a52_0x497874(Text,{'color':_0x522d9e(0x87),'children':'_'}),_0x2cf35d&&a52_0x3566f2(Text,{'color':_0x522d9e(0x93),'children':[_0x522d9e(0x6b),_0x2cf35d]})]}),!_0x2cf35d&&!_0x3d5898&&a52_0x497874(Box,{'children':a52_0x497874(Text,{'color':_0x522d9e(0x87),'children':_0x522d9e(0x8f)})})]});if(_0x315cf2)return a52_0x3566f2(Box,{'flexDirection':_0x522d9e(0x7e),'children':[a52_0x497874(Text,{'color':_0x522d9e(0x97),'children':_0x522d9e(0x72)}),a52_0x3566f2(Text,{'color':_0x522d9e(0x68),'children':[_0x522d9e(0x8d),_0x575a24]}),a52_0x497874(Text,{'children':_0x522d9e(0x98)})]});return a52_0x497874(Box,{'children':a52_0x497874(Text,{'children':_0x522d9e(0x6e)})});}
@@ -0,0 +1 @@
1
+ const a53_0x2c5c33=a53_0x4435;(function(_0x3d63b8,_0x4e9f9e){const _0x2e6fae=a53_0x4435,_0x509945=_0x3d63b8();while(!![]){try{const _0x573cb7=parseInt(_0x2e6fae(0x136))/0x1+parseInt(_0x2e6fae(0x127))/0x2*(-parseInt(_0x2e6fae(0x130))/0x3)+parseInt(_0x2e6fae(0x155))/0x4*(parseInt(_0x2e6fae(0x183))/0x5)+-parseInt(_0x2e6fae(0x191))/0x6+parseInt(_0x2e6fae(0x160))/0x7*(-parseInt(_0x2e6fae(0x15a))/0x8)+-parseInt(_0x2e6fae(0x18c))/0x9+-parseInt(_0x2e6fae(0x17b))/0xa*(-parseInt(_0x2e6fae(0x15e))/0xb);if(_0x573cb7===_0x4e9f9e)break;else _0x509945['push'](_0x509945['shift']());}catch(_0x530450){_0x509945['push'](_0x509945['shift']());}}}(a53_0x4ffc,0xd19d2));import{jsx as a53_0x406ca3,jsxs as a53_0xf9a21b,Fragment as a53_0x285acc}from'react/jsx-runtime';import{useState,useEffect}from'react';function a53_0x4435(_0x234b57,_0x3ae40e){_0x234b57=_0x234b57-0x126;const _0x4ffc2f=a53_0x4ffc();let _0x443590=_0x4ffc2f[_0x234b57];return _0x443590;}import{Text,Box,useInput,useApp}from'ink';function a53_0x4ffc(){const _0x4f60f0=['add','mcp.json','Cursor','21cIcpHa','from','size','join','cyan','⚠️\x20部分配置需要手动完成','523156laltrf','配置信息:','cursor','\x22:\x20{','manual','\x20\x20✗','Claude\x20Code\x20MCP\x20命令已生成','message','has','yellow',',\x20env=','.cursor','blue','error','info','app','\x20-e\x20LOVRABET_ENV=','done','delete','mcp-install','online','\x20\x20⚠️','status','claude','gray','\x20\x20\x20\x20\x22','utf-8','agents.md','配置指引已显示','\x20\x20\x20\x20\x20\x20\x20\x20\x22LOVRABET_APP_CODE\x22:\x20\x22','env','1729664ohDTOB','未找到\x20appcode\x20配置','请手动执行上述命令','创建\x20Cursor\x20Rules\x20文件','已写入\x20.cursor/mcp.json','2642504VYlNwJ','\x20\x20重启\x20Claude\x20Code\x20后生效\x0a','\x20\x20AppCode:\x20','ide','601084pKLiXj','✓\x20创建\x20Cursor\x20Rules\x20文件:\x20.cursor/rules/lovrabet_rules.mdc','14nSxDst','cwd','some','name','length','white','push','*\x20请选择要配置的\x20IDE:','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20}','red','LOVRABET_ENV','filter','return','📚\x20详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide\x0a','\x20-e\x20LOVRABET_APP_CODE=','column','配置信息:\x20appcode=','需要先配置\x20appcode','\x20\x20重启\x20Cursor\x20后生效\x0a','\x20\x20agents.md\x20已存在,跳过\x0a','configuring','npx','label','[\x20]','includes','lovrabet-dataset','430yQGddg','\x20\x20\x20\x20}','value','请至少选择一个\x20IDE','log','\x20\x20Cursor\x20Rules\x20文件已存在,跳过\x0a','../../templates/rules/lovrabet_rules.mdc.tpl','\x20\x20环境:\x20','10PxXdLu','appcode','⚠️\x20配置需要手动完成','*\x20配置\x20Lovrabet\x20MCP\x20服务器','⚠️\x20\x20未找到\x20appcode\x20配置','rules','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','Claude\x20Code\x20CLI','Cursor\x20Rules\x20模板文件不存在','4241394BSWPUF','[✓]','\x0a📋\x20请执行以下命令配置\x20Claude\x20Code\x20MCP:\x0a','mcpServers','green','8706702Phwkmq','description','\x20\x20✓','claude\x20mcp\x20add\x20','其他\x20IDE\x20配置指引','✓\x20创建\x20agents.md\x20到项目根目录\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x22LOVRABET_ENV\x22:\x20\x22','lovrabet_rules.mdc','selecting','请手动执行','agents.md\x20模板文件不存在','map','复制\x20agents.md\x20文件失败','\x20\x20\x20请先运行\x20\x27lovrabet\x20init\x20--appcode\x20<your-app-code>\x27\x20初始化项目配置\x0a','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20q:\x20退出\x20Enter:\x20确认','success','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','不支持的\x20IDE:\x20','✓\x20已写入\x20.cursor/mcp.json','84598Wqgscq','@lovrabet/dataset-mcp-server@latest','upArrow','indexOf','warn','其他\x20IDE\x20配置指引已显示'];a53_0x4ffc=function(){return _0x4f60f0;};return a53_0x4ffc();}import{existsSync,mkdirSync,writeFileSync,readFileSync,copyFileSync}from'node:fs';import{join,resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const __dirname=dirname(fileURLToPath(import.meta.url)),IDE_CONFIGS={'cursor':{'name':a53_0x2c5c33(0x12f),'description':'Cursor\x20IDE'},'claude':{'name':'Claude\x20Code','description':a53_0x2c5c33(0x18a)},'other':{'name':'其他\x20IDE','description':a53_0x2c5c33(0x195)}},IDE_LIST=[a53_0x2c5c33(0x138),a53_0x2c5c33(0x14d),'other'],MCP_SERVER_NAME=a53_0x2c5c33(0x17a),MCP_COMMAND=a53_0x2c5c33(0x176),MCP_ARGS=[a53_0x2c5c33(0x128)];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x4088f2=a53_0x2c5c33,{exit:_0x82225e}=useApp(),[_0x486441,_0x43e46a]=useState('selecting'),[_0x4b3ac,_0x3fb134]=useState(new Set(preselectedIDEs[_0x4088f2(0x19c)](_0x356b94=>IDE_LIST[_0x4088f2(0x12a)](_0x356b94))[_0x4088f2(0x16c)](_0x17fc5c=>_0x17fc5c>=0x0))),[_0x57b1c7,_0x366652]=useState(0x0),[_0x355ccc,_0x51ad5f]=useState([]),[_0x496c12,_0x1fc9fd]=useState([]),[_0x778363,_0x117ae6]=useState('');useEffect(()=>{const _0x409a4e=_0x4088f2;preselectedIDEs[_0x409a4e(0x164)]>0x0&&_0x4b3ac['size']>0x0&&_0x29dafe();},[]),useInput((_0x221bca,_0x471edc)=>{const _0x17b31e=_0x4088f2;if(_0x486441===_0x17b31e(0x199)){if(_0x471edc[_0x17b31e(0x129)]){_0x366652(_0x556f6f=>_0x556f6f>0x0?_0x556f6f-0x1:IDE_LIST[_0x17b31e(0x164)]-0x1);return;}if(_0x471edc['downArrow']){_0x366652(_0x238428=>_0x238428<IDE_LIST[_0x17b31e(0x164)]-0x1?_0x238428+0x1:0x0);return;}if(_0x221bca==='\x20'){_0x3fb134(_0x508911=>{const _0x295e35=_0x17b31e,_0x4cf846=new Set(_0x508911);return _0x4cf846[_0x295e35(0x13e)](_0x57b1c7)?_0x4cf846[_0x295e35(0x148)](_0x57b1c7):_0x4cf846['add'](_0x57b1c7),_0x4cf846;});return;}if(_0x221bca==='a'||_0x221bca==='A'){_0x3fb134(new Set(IDE_LIST[_0x17b31e(0x19c)]((_0x4b5899,_0x185b9d)=>_0x185b9d)));return;}if(_0x221bca==='i'||_0x221bca==='I'||_0x221bca==='r'||_0x221bca==='R'){_0x3fb134(_0x2a7aa4=>{const _0x8ea413=_0x17b31e,_0x43df5d=new Set();for(let _0x4b7c7a=0x0;_0x4b7c7a<IDE_LIST[_0x8ea413(0x164)];_0x4b7c7a++){!_0x2a7aa4['has'](_0x4b7c7a)&&_0x43df5d[_0x8ea413(0x12d)](_0x4b7c7a);}return _0x43df5d;});return;}if(_0x221bca==='q'||_0x221bca==='Q'){_0x82225e();return;}if(_0x471edc[_0x17b31e(0x16d)]){if(_0x4b3ac['size']===0x0){_0x117ae6(_0x17b31e(0x17e));return;}_0x29dafe();return;}}if(_0x486441===_0x17b31e(0x147)){_0x82225e();return;}});async function _0x29dafe(){const _0x2ddb78=_0x4088f2,_0x142825=Array[_0x2ddb78(0x131)](_0x4b3ac)[_0x2ddb78(0x19c)](_0x2f7ba4=>IDE_LIST[_0x2f7ba4])[_0x2ddb78(0x16c)](_0x374480=>_0x374480!==undefined);_0x51ad5f([{'label':'已选择\x20IDE','value':_0x4b3ac[_0x2ddb78(0x132)]+'\x20个'}]),_0x43e46a(_0x2ddb78(0x175));const _0x2c30cc=[];for(const _0x2bc82d of _0x142825){try{const _0x24975a=await configureMcp(_0x2bc82d),_0x3a5907=_0x24975a[_0x2ddb78(0x179)](_0x2ddb78(0x19a));_0x2c30cc[_0x2ddb78(0x166)]({'ide':IDE_CONFIGS[_0x2bc82d][_0x2ddb78(0x163)],'status':_0x3a5907?_0x2ddb78(0x13a):_0x2ddb78(0x1a0),'message':_0x24975a});}catch(_0x32634c){_0x2c30cc[_0x2ddb78(0x166)]({'ide':IDE_CONFIGS[_0x2bc82d][_0x2ddb78(0x163)],'status':_0x2ddb78(0x143),'message':_0x32634c instanceof Error?_0x32634c[_0x2ddb78(0x13d)]:String(_0x32634c)});}}_0x1fc9fd(_0x2c30cc),_0x43e46a(_0x2ddb78(0x147)),setTimeout(()=>{_0x82225e();},0x1388);}return a53_0xf9a21b(Box,{'flexDirection':_0x4088f2(0x170),'marginTop':0x1,'children':[_0x486441===_0x4088f2(0x199)&&a53_0xf9a21b(a53_0x285acc,{'children':[a53_0x406ca3(Box,{'children':a53_0x406ca3(Text,{'color':_0x4088f2(0x134),'children':_0x4088f2(0x186)})}),_0x778363&&a53_0x406ca3(Box,{'marginTop':0x1,'children':a53_0xf9a21b(Text,{'color':_0x4088f2(0x16a),'children':['✗\x20',_0x778363]})}),a53_0xf9a21b(Box,{'marginTop':0x1,'flexDirection':_0x4088f2(0x170),'children':[a53_0x406ca3(Text,{'bold':!![],'children':_0x4088f2(0x167)}),IDE_LIST[_0x4088f2(0x19c)]((_0x44eb01,_0x29e5b2)=>{const _0x154e36=_0x4088f2,_0x5a95e0=_0x57b1c7===_0x29e5b2,_0x49d565=_0x4b3ac[_0x154e36(0x13e)](_0x29e5b2);return a53_0x406ca3(Box,{'children':a53_0xf9a21b(Text,{'backgroundColor':_0x5a95e0?_0x154e36(0x142):undefined,'color':_0x5a95e0?'white':undefined,'children':['\x20\x20',_0x49d565?_0x154e36(0x18d):_0x154e36(0x178),'\x20',IDE_CONFIGS[_0x44eb01][_0x154e36(0x163)],'\x20',a53_0xf9a21b(Text,{'color':_0x5a95e0?_0x154e36(0x165):_0x154e36(0x14e),'dimColor':!_0x5a95e0,'children':['-\x20',IDE_CONFIGS[_0x44eb01][_0x154e36(0x192)]]})]})},_0x44eb01);}),a53_0x406ca3(Box,{'marginTop':0x1,'children':a53_0xf9a21b(Text,{'color':_0x4088f2(0x14e),'children':['\x20',_0x4088f2(0x19f)]})})]})]}),_0x486441===_0x4088f2(0x175)&&a53_0xf9a21b(a53_0x285acc,{'children':[_0x355ccc[_0x4088f2(0x19c)]((_0x537953,_0x49424d)=>a53_0xf9a21b(Box,{'children':[a53_0xf9a21b(Text,{'color':_0x4088f2(0x190),'children':['√\x20',_0x537953[_0x4088f2(0x177)],':\x20']}),a53_0x406ca3(Text,{'color':_0x4088f2(0x134),'children':_0x537953[_0x4088f2(0x17d)]})]},_0x49424d)),a53_0x406ca3(Box,{'marginTop':0x1,'children':a53_0x406ca3(Text,{'children':'正在配置\x20MCP\x20服务器...'})})]}),_0x486441===_0x4088f2(0x147)&&a53_0xf9a21b(a53_0x285acc,{'children':[a53_0x406ca3(Box,{'children':_0x496c12['every'](_0x220356=>_0x220356['status']===_0x4088f2(0x1a0))?a53_0x406ca3(Text,{'color':'green','children':'✓\x20MCP\x20配置完成!'}):_0x496c12[_0x4088f2(0x162)](_0x64585d=>_0x64585d[_0x4088f2(0x14c)]==='success')?a53_0x406ca3(Text,{'color':'yellow','children':_0x4088f2(0x135)}):a53_0x406ca3(Text,{'color':'yellow','children':_0x4088f2(0x185)})}),_0x496c12[_0x4088f2(0x19c)]((_0x78430e,_0x527aa3)=>a53_0xf9a21b(Box,{'children':[a53_0xf9a21b(Text,{'color':_0x78430e[_0x4088f2(0x14c)]===_0x4088f2(0x1a0)?'green':_0x78430e[_0x4088f2(0x14c)]===_0x4088f2(0x13a)?_0x4088f2(0x13f):_0x4088f2(0x16a),'children':[_0x78430e[_0x4088f2(0x14c)]===_0x4088f2(0x1a0)?_0x4088f2(0x193):_0x78430e['status']===_0x4088f2(0x13a)?_0x4088f2(0x14b):_0x4088f2(0x13b),'\x20',_0x78430e[_0x4088f2(0x15d)],':','\x20']}),a53_0x406ca3(Text,{'color':_0x78430e['status']==='success'?'white':_0x78430e[_0x4088f2(0x14c)]===_0x4088f2(0x13a)?_0x4088f2(0x13f):_0x4088f2(0x16a),'children':_0x78430e[_0x4088f2(0x13d)]})]},_0x527aa3)),a53_0x406ca3(Box,{'marginTop':0x1,'children':a53_0x406ca3(Text,{'color':_0x4088f2(0x14e),'children':'按任意键退出...'})})]})]});}async function configureMcp(_0x413a2e){const _0x16baea=a53_0x2c5c33;switch(_0x413a2e){case _0x16baea(0x138):return await configureCursorMcp();case _0x16baea(0x14d):return await configureClaudeMcp();case'other':return await showOtherGuide();default:throw new Error(_0x16baea(0x1a2)+_0x413a2e);}}async function configureCursorMcp(){const _0x31f5e3=a53_0x2c5c33,_0x33ae0e=readConfig(),_0x554838=_0x33ae0e[_0x31f5e3(0x184)]||_0x33ae0e[_0x31f5e3(0x145)],_0x14b5b5=_0x33ae0e[_0x31f5e3(0x154)]||'online';if(!_0x554838)return console[_0x31f5e3(0x17f)](_0x31f5e3(0x187)),console[_0x31f5e3(0x17f)]('\x20\x20\x20请先运行\x20\x27lovrabet\x20init\x20--appcode\x20<your-app-code>\x27\x20初始化项目配置\x0a'),logger[_0x31f5e3(0x12b)](_0x31f5e3(0x149),_0x31f5e3(0x156)),_0x31f5e3(0x172);const _0x5e5fcb={'LOVRABET_APP_CODE':String(_0x554838)};_0x14b5b5!==_0x31f5e3(0x14a)&&(_0x5e5fcb[_0x31f5e3(0x16b)]=String(_0x14b5b5));const _0x59ecd2={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0x5e5fcb},_0x1e30ed=join(process[_0x31f5e3(0x161)](),_0x31f5e3(0x141),_0x31f5e3(0x12e)),_0x4506c1=join(process['cwd'](),'.cursor');!existsSync(_0x4506c1)&&mkdirSync(_0x4506c1,{'recursive':!![]});let _0x25c096={'mcpServers':{}};if(existsSync(_0x1e30ed))try{const _0x27263b=readFileSync(_0x1e30ed,'utf-8');_0x25c096=JSON['parse'](_0x27263b);}catch{}(!_0x25c096['mcpServers']||typeof _0x25c096[_0x31f5e3(0x18f)]!=='object')&&(_0x25c096[_0x31f5e3(0x18f)]={});_0x25c096['mcpServers'][MCP_SERVER_NAME]=_0x59ecd2,writeFileSync(_0x1e30ed,JSON['stringify'](_0x25c096,null,0x2),_0x31f5e3(0x150)),logger[_0x31f5e3(0x144)]('mcp-install','Cursor\x20MCP\x20配置成功',{'appcode':_0x554838,'env':_0x14b5b5,'path':_0x1e30ed}),console[_0x31f5e3(0x17f)](_0x31f5e3(0x126)),console[_0x31f5e3(0x17f)](_0x31f5e3(0x15c)+_0x554838);_0x14b5b5!=='online'&&console[_0x31f5e3(0x17f)](_0x31f5e3(0x182)+_0x14b5b5);console[_0x31f5e3(0x17f)](_0x31f5e3(0x173));const _0x3acbad=join(_0x4506c1,_0x31f5e3(0x188)),_0x3946cc=join(_0x3acbad,_0x31f5e3(0x198));if(!existsSync(_0x3946cc))try{!existsSync(_0x3acbad)&&mkdirSync(_0x3acbad,{'recursive':!![]});const _0x5997c9=resolve(__dirname,_0x31f5e3(0x181));existsSync(_0x5997c9)?(copyFileSync(_0x5997c9,_0x3946cc),logger[_0x31f5e3(0x144)](_0x31f5e3(0x149),_0x31f5e3(0x158),{'from':_0x5997c9,'to':_0x3946cc}),console[_0x31f5e3(0x17f)](_0x31f5e3(0x15f))):logger['warn'](_0x31f5e3(0x149),_0x31f5e3(0x18b),{'templatePath':_0x5997c9});}catch(_0x5a23cb){logger[_0x31f5e3(0x143)](_0x31f5e3(0x149),'复制\x20Cursor\x20Rules\x20文件失败',{'error':_0x5a23cb instanceof Error?_0x5a23cb[_0x31f5e3(0x13d)]:String(_0x5a23cb)});}else console[_0x31f5e3(0x17f)](_0x31f5e3(0x180));return _0x31f5e3(0x159);}async function configureClaudeMcp(){const _0xad6858=a53_0x2c5c33,_0x4feba0=readConfig(),_0x2ccee4=_0x4feba0['appcode']||_0x4feba0[_0xad6858(0x145)],_0x123486=_0x4feba0['env']||'online';if(!_0x2ccee4)return console[_0xad6858(0x17f)]('⚠️\x20\x20未找到\x20appcode\x20配置'),console['log'](_0xad6858(0x19e)),logger[_0xad6858(0x12b)](_0xad6858(0x149),_0xad6858(0x156)),_0xad6858(0x172);let _0x109eac=_0xad6858(0x194)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0xad6858(0x133)]('\x20')+_0xad6858(0x16f)+_0x2ccee4;_0x123486!==_0xad6858(0x14a)&&(_0x109eac+=_0xad6858(0x146)+_0x123486);console[_0xad6858(0x17f)](_0xad6858(0x18e)),console[_0xad6858(0x17f)]('\x20\x20'+_0x109eac+'\x0a'),console['log'](_0xad6858(0x137)),console[_0xad6858(0x17f)](_0xad6858(0x15c)+_0x2ccee4);_0x123486!==_0xad6858(0x14a)&&console[_0xad6858(0x17f)](_0xad6858(0x182)+_0x123486);console[_0xad6858(0x17f)](_0xad6858(0x15b)),logger[_0xad6858(0x144)](_0xad6858(0x149),_0xad6858(0x13c),{'command':_0x109eac,'appcode':_0x2ccee4,'env':_0x123486});const _0x10b66c=join(process[_0xad6858(0x161)](),_0xad6858(0x151));if(!existsSync(_0x10b66c))try{const _0x3bc00b=resolve(__dirname,_0xad6858(0x181));if(existsSync(_0x3bc00b)){const _0x3a7c80=readFileSync(_0x3bc00b,_0xad6858(0x150));writeFileSync(_0x10b66c,_0x3a7c80,_0xad6858(0x150)),logger[_0xad6858(0x144)](_0xad6858(0x149),'创建\x20agents.md\x20文件',{'from':_0x3bc00b,'to':_0x10b66c}),console[_0xad6858(0x17f)](_0xad6858(0x196));}else logger[_0xad6858(0x12b)](_0xad6858(0x149),_0xad6858(0x19b),{'templatePath':_0x3bc00b});}catch(_0x1d76bc){logger[_0xad6858(0x143)](_0xad6858(0x149),_0xad6858(0x19d),{'error':_0x1d76bc instanceof Error?_0x1d76bc[_0xad6858(0x13d)]:String(_0x1d76bc)});}else console['log'](_0xad6858(0x174));return _0xad6858(0x157);}async function showOtherGuide(){const _0x1b76b7=a53_0x2c5c33,_0x3429af=readConfig(),_0x1c48a0=_0x3429af[_0x1b76b7(0x184)]||_0x3429af[_0x1b76b7(0x145)],_0x3fda50=_0x3429af[_0x1b76b7(0x154)]||_0x1b76b7(0x14a);if(!_0x1c48a0)return console[_0x1b76b7(0x17f)](_0x1b76b7(0x187)),console['log'](_0x1b76b7(0x19e)),logger[_0x1b76b7(0x12b)]('mcp-install',_0x1b76b7(0x156)),_0x1b76b7(0x172);return console[_0x1b76b7(0x17f)]('\x0a📋\x20Lovrabet\x20MCP\x20服务器配置\x0a'),console[_0x1b76b7(0x17f)](_0x1b76b7(0x171)+_0x1c48a0+_0x1b76b7(0x140)+_0x3fda50+'\x0a'),console['log']('{'),console[_0x1b76b7(0x17f)](_0x1b76b7(0x168)),console[_0x1b76b7(0x17f)](_0x1b76b7(0x14f)+MCP_SERVER_NAME+_0x1b76b7(0x139)),console['log']('\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22'+MCP_COMMAND+'\x22,'),console['log'](_0x1b76b7(0x1a1)+MCP_ARGS['map'](_0x1ec53a=>'\x22'+_0x1ec53a+'\x22')['join'](',\x20')+'],'),console['log'](_0x1b76b7(0x189)),console[_0x1b76b7(0x17f)](_0x1b76b7(0x153)+_0x1c48a0+'\x22,'),_0x3fda50!==_0x1b76b7(0x14a)&&console[_0x1b76b7(0x17f)](_0x1b76b7(0x197)+_0x3fda50+'\x22,'),console[_0x1b76b7(0x17f)]('\x20\x20\x20\x20\x20\x20}'),console['log'](_0x1b76b7(0x17c)),console[_0x1b76b7(0x17f)](_0x1b76b7(0x169)),console[_0x1b76b7(0x17f)]('}\x0a'),console[_0x1b76b7(0x17f)](_0x1b76b7(0x16e)),logger[_0x1b76b7(0x144)]('mcp-install',_0x1b76b7(0x12c),{'appcode':_0x1c48a0,'env':_0x3fda50}),_0x1b76b7(0x152);}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- function a51_0x4ae5(){const _0x4faaa7=['2465MmUWRw','4680024kpDtFB','mcp-claude','online','-e\x20LOVRABET_APP_CODE=','2423368tkpmgq','生成\x20claude\x20MCP\x20配置命令','error','配置完成后:\x0a','trim','app','675119xXgyRR','错误:\x20未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','daily','-e\x20LOVRABET_ENV=daily','2aBCjbo','exit','7015960ukGgrP','\x20\x20-\x20AppCode:\x20','\x20\x20-\x20环境:\x20','message','733512nhfrCS','info','5960vVFWJV','5514966mVwcgk','未找到\x20appcode\x20配置','\x20\x202.\x20在\x20claude\x20code\x20中确认\x20lovrabet-dataset\x20MCP\x20服务器已加载\x0a','配置信息:','appcode','log','错误:\x20配置失败\x20-\x20','\x20\x201.\x20重启\x20claude\x20code'];a51_0x4ae5=function(){return _0x4faaa7;};return a51_0x4ae5();}(function(_0x1f1c96,_0x22519c){const _0x6cf6e6=a51_0x5f2e,_0x1dd42b=_0x1f1c96();while(!![]){try{const _0x6d479=-parseInt(_0x6cf6e6(0xe7))/0x1*(parseInt(_0x6cf6e6(0xcb))/0x2)+parseInt(_0x6cf6e6(0xd1))/0x3+-parseInt(_0x6cf6e6(0xd3))/0x4*(-parseInt(_0x6cf6e6(0xdc))/0x5)+-parseInt(_0x6cf6e6(0xdd))/0x6+parseInt(_0x6cf6e6(0xcd))/0x7+-parseInt(_0x6cf6e6(0xe1))/0x8+parseInt(_0x6cf6e6(0xd4))/0x9;if(_0x6d479===_0x22519c)break;else _0x1dd42b['push'](_0x1dd42b['shift']());}catch(_0x5e63f1){_0x1dd42b['push'](_0x1dd42b['shift']());}}}(a51_0x4ae5,0xcc1f4));function a51_0x5f2e(_0x5ba1b0,_0x264ebc){_0x5ba1b0=_0x5ba1b0-0xc9;const _0x4ae53c=a51_0x4ae5();let _0x5f2ed7=_0x4ae53c[_0x5ba1b0];return _0x5f2ed7;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';export async function configureClaudeMcp(){const _0x48de02=a51_0x5f2e;try{const _0x26fcb8=readConfig(),_0x52e082=_0x26fcb8[_0x48de02(0xd8)]||_0x26fcb8[_0x48de02(0xe6)],_0xc977cb=_0x26fcb8['env']||_0x48de02(0xdf);!_0x52e082&&(console[_0x48de02(0xe3)](_0x48de02(0xe8)),logger[_0x48de02(0xe3)](_0x48de02(0xde),_0x48de02(0xd5)),process[_0x48de02(0xcc)](0x1));console['log'](_0x48de02(0xd7)),console[_0x48de02(0xd9)](_0x48de02(0xce)+_0x52e082),console[_0x48de02(0xd9)](_0x48de02(0xcf)+_0xc977cb+'\x0a');const _0x4f6fe5='claude\x20mcp\x20add\x20lovrabet-dataset\x20npx\x20@lovrabet/dataset-mcp-server@latest',_0x40455a=_0x48de02(0xe0)+_0x52e082,_0xce5079=_0xc977cb===_0x48de02(0xc9)?_0x48de02(0xca):'',_0x402348=(_0x4f6fe5+'\x20'+_0x40455a+'\x20'+_0xce5079)[_0x48de02(0xe5)]();console[_0x48de02(0xd9)]('请在终端中执行以下命令来配置\x20claude\x20code\x20MCP:\x0a'),console[_0x48de02(0xd9)]('\x20\x20'+_0x402348+'\x0a'),console['log'](_0x48de02(0xe4)),console[_0x48de02(0xd9)](_0x48de02(0xdb)),console[_0x48de02(0xd9)](_0x48de02(0xd6)),logger[_0x48de02(0xd2)](_0x48de02(0xde),_0x48de02(0xe2),{'appcode':_0x52e082,'env':_0xc977cb}),process[_0x48de02(0xcc)](0x0);}catch(_0x398389){logger['error']('mcp-claude','配置失败',{'error':_0x398389 instanceof Error?_0x398389[_0x48de02(0xd0)]:String(_0x398389)}),console['error'](_0x48de02(0xda)+(_0x398389 instanceof Error?_0x398389[_0x48de02(0xd0)]:String(_0x398389))),process[_0x48de02(0xcc)](0x1);}}
1
+ function a54_0x3528(){const _0x1e0c81=['30WKfgfe','未找到\x20appcode\x20配置','错误:\x20配置失败\x20-\x20','1171880FtHRvj','\x20\x20-\x20AppCode:\x20','-e\x20LOVRABET_ENV=daily','1174030YXxvvq','info','\x20\x201.\x20重启\x20claude\x20code','222707fFFhXP','\x20\x20-\x20环境:\x20','exit','571720fJIaDM','配置失败','22IeytvP','daily','app','error','trim','log','env','\x20\x202.\x20在\x20claude\x20code\x20中确认\x20lovrabet-dataset\x20MCP\x20服务器已加载\x0a','27vsSXuq','配置信息:','18ZdpAZg','appcode','mcp-claude','message','📋\x20请执行以下命令配置\x20Claude\x20Code\x20MCP:\x0a','1022860pwdaFl','18616HVDpMl','68446YxiozV'];a54_0x3528=function(){return _0x1e0c81;};return a54_0x3528();}function a54_0x52a0(_0x30fde1,_0x49cb91){_0x30fde1=_0x30fde1-0x15b;const _0x352850=a54_0x3528();let _0x52a008=_0x352850[_0x30fde1];return _0x52a008;}(function(_0x1af297,_0x22c2f4){const _0x54ba1c=a54_0x52a0,_0x2d0176=_0x1af297();while(!![]){try{const _0x2b28ad=parseInt(_0x54ba1c(0x15e))/0x1+-parseInt(_0x54ba1c(0x173))/0x2*(-parseInt(_0x54ba1c(0x16b))/0x3)+-parseInt(_0x54ba1c(0x172))/0x4+parseInt(_0x54ba1c(0x161))/0x5+-parseInt(_0x54ba1c(0x175))/0x6*(-parseInt(_0x54ba1c(0x174))/0x7)+-parseInt(_0x54ba1c(0x178))/0x8*(parseInt(_0x54ba1c(0x16d))/0x9)+parseInt(_0x54ba1c(0x15b))/0xa*(parseInt(_0x54ba1c(0x163))/0xb);if(_0x2b28ad===_0x22c2f4)break;else _0x2d0176['push'](_0x2d0176['shift']());}catch(_0x43f0d4){_0x2d0176['push'](_0x2d0176['shift']());}}}(a54_0x3528,0x260ba));import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';export async function configureClaudeMcp(){const _0x2001c6=a54_0x52a0;try{const _0x242545=readConfig(),_0x146dae=_0x242545[_0x2001c6(0x16e)]||_0x242545[_0x2001c6(0x165)],_0x614dc2=_0x242545[_0x2001c6(0x169)]||'online';!_0x146dae&&(console[_0x2001c6(0x166)]('错误:\x20未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置'),logger['error'](_0x2001c6(0x16f),_0x2001c6(0x176)),process['exit'](0x1));console[_0x2001c6(0x168)](_0x2001c6(0x16c)),console[_0x2001c6(0x168)](_0x2001c6(0x179)+_0x146dae),console[_0x2001c6(0x168)](_0x2001c6(0x15f)+_0x614dc2+'\x0a');const _0x3438c8='claude\x20mcp\x20add\x20lovrabet-dataset\x20npx\x20@lovrabet/dataset-mcp-server@latest',_0x4a8da9='-e\x20LOVRABET_APP_CODE='+_0x146dae,_0x27dcc5=_0x614dc2===_0x2001c6(0x164)?_0x2001c6(0x17a):'',_0x214d47=(_0x3438c8+'\x20'+_0x4a8da9+'\x20'+_0x27dcc5)[_0x2001c6(0x167)]();console['log'](_0x2001c6(0x171)),console[_0x2001c6(0x168)]('\x20\x20'+_0x214d47+'\x0a'),console[_0x2001c6(0x168)]('配置完成后:\x0a'),console[_0x2001c6(0x168)](_0x2001c6(0x15d)),console[_0x2001c6(0x168)](_0x2001c6(0x16a)),logger[_0x2001c6(0x15c)]('mcp-claude','生成配置命令',{'appcode':_0x146dae,'env':_0x614dc2}),process[_0x2001c6(0x160)](0x0);}catch(_0x471621){logger[_0x2001c6(0x166)](_0x2001c6(0x16f),_0x2001c6(0x162),{'error':_0x471621 instanceof Error?_0x471621[_0x2001c6(0x170)]:String(_0x471621)}),console['error'](_0x2001c6(0x177)+(_0x471621 instanceof Error?_0x471621[_0x2001c6(0x170)]:String(_0x471621))),process[_0x2001c6(0x160)](0x1);}}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4d3070,_0x44f688){const _0x45cbc7=a52_0x2019,_0x2ce6f1=_0x4d3070();while(!![]){try{const _0x16db1b=-parseInt(_0x45cbc7(0xad))/0x1+parseInt(_0x45cbc7(0xb8))/0x2+parseInt(_0x45cbc7(0x97))/0x3*(parseInt(_0x45cbc7(0xbf))/0x4)+parseInt(_0x45cbc7(0xbb))/0x5+parseInt(_0x45cbc7(0x9e))/0x6*(-parseInt(_0x45cbc7(0x8f))/0x7)+parseInt(_0x45cbc7(0xa6))/0x8*(parseInt(_0x45cbc7(0x9d))/0x9)+-parseInt(_0x45cbc7(0xb5))/0xa;if(_0x16db1b===_0x44f688)break;else _0x2ce6f1['push'](_0x2ce6f1['shift']());}catch(_0x1520fc){_0x2ce6f1['push'](_0x2ce6f1['shift']());}}}(a52_0x343e,0xc7631));function a52_0x343e(){const _0x2bdf0e=['exit','更新现有\x20mcp.json\x20配置','8XqWQmS','env','mcp-cursor','\x0a配置信息:','配置\x20Cursor\x20MCP\x20成功','21IATjwX','\x20\x20-\x20配置文件:\x20','\x20\x20-\x20AppCode:\x20','\x0a现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','info','npx','error','错误:\x20配置失败:\x20','1607286AalwYS','@lovrabet/dataset-mcp-server','Cursor\x20Rules\x20文件已存在,跳过','warn','复制\x20Cursor\x20Rules\x20文件','错误:\x20未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','92610GJShoz','2807394bNLIVJ','message','✓\x20创建\x20Cursor\x20Rules\x20文件:\x20.cursor/rules/lovrabet_rules.mdc','lovrabet_rules.mdc','mcp.json','配置\x20Cursor\x20MCP\x20失败','\x20\x20-\x20环境:\x20','警告:\x20复制\x20Cursor\x20Rules\x20文件失败:\x20','1184aYdvwD','创建\x20.cursor/rules\x20目录','未找到\x20appcode\x20配置','rules','✓\x20更新\x20mcp.json\x20配置','创建\x20.cursor\x20目录','mcpServers','336889TZorzx','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','\x0a✓\x20Cursor\x20MCP\x20配置成功!','utf8','log','Cursor\x20Rules\x20模板文件不存在','online','!\x20Cursor\x20Rules\x20文件已存在,跳过创建,如需重新创建,请删除\x20.cursor/rules/lovrabet_rules.mdc\x20文件','18390860oWQlSR','错误:\x20解析现有\x20mcp.json\x20失败:\x20','stringify','812236ggrVcB','lovrabet-dataset','.cursor','6978995YTbWnL','✓\x20创建\x20.cursor\x20目录:\x20'];a52_0x343e=function(){return _0x2bdf0e;};return a52_0x343e();}function a52_0x2019(_0x4c5b8b,_0x114b6d){_0x4c5b8b=_0x4c5b8b-0x8e;const _0x343e50=a52_0x343e();let _0x201937=_0x343e50[_0x4c5b8b];return _0x201937;}import{existsSync,mkdirSync,writeFileSync,readFileSync,copyFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';export async function configureCursorMcp(){const _0x171312=a52_0x2019;try{const _0x298d54=process['cwd'](),_0x40626e=resolve(_0x298d54,_0x171312(0xba)),_0x52b114=resolve(_0x40626e,_0x171312(0xa2)),_0x4d9308=readConfig(),_0x5a5fb9=_0x4d9308['appcode']||_0x4d9308['app'],_0x410109=_0x4d9308[_0x171312(0xc0)]||_0x171312(0xb3);!_0x5a5fb9&&(console[_0x171312(0x95)](_0x171312(0x9c)),logger[_0x171312(0x95)]('mcp-cursor',_0x171312(0xa8)),process[_0x171312(0xbd)](0x1));!existsSync(_0x40626e)&&(mkdirSync(_0x40626e,{'recursive':!![]}),logger[_0x171312(0x93)](_0x171312(0xc1),_0x171312(0xab),{'path':_0x40626e}),console['log'](_0x171312(0xbc)+_0x40626e));const _0x589035={'command':_0x171312(0x94),'args':['-y',_0x171312(0x98)],'env':{'LOVRABET_APP_CODE':String(_0x5a5fb9),'LOVRABET_ENV':String(_0x410109)}};let _0x530e72;if(existsSync(_0x52b114))try{const _0x1203bf=readFileSync(_0x52b114,'utf8');_0x530e72=JSON['parse'](_0x1203bf),!_0x530e72[_0x171312(0xac)]&&(_0x530e72[_0x171312(0xac)]={}),_0x530e72[_0x171312(0xac)][_0x171312(0xb9)]=_0x589035,logger[_0x171312(0x93)](_0x171312(0xc1),_0x171312(0xbe),{'path':_0x52b114,'appcode':_0x5a5fb9,'env':_0x410109}),console[_0x171312(0xb1)](_0x171312(0xaa));}catch(_0x343f75){logger[_0x171312(0x95)](_0x171312(0xc1),'解析现有\x20mcp.json\x20失败',{'error':_0x343f75 instanceof Error?_0x343f75['message']:String(_0x343f75)}),console[_0x171312(0x95)](_0x171312(0xb6)+(_0x343f75 instanceof Error?_0x343f75[_0x171312(0x9f)]:String(_0x343f75))),process[_0x171312(0xbd)](0x1);}else _0x530e72={'mcpServers':{'lovrabet-dataset':_0x589035}},logger[_0x171312(0x93)](_0x171312(0xc1),'创建新的\x20mcp.json\x20配置',{'path':_0x52b114,'appcode':_0x5a5fb9,'env':_0x410109}),console[_0x171312(0xb1)]('✓\x20创建\x20mcp.json\x20配置文件');writeFileSync(_0x52b114,JSON[_0x171312(0xb7)](_0x530e72,null,0x2),{'encoding':_0x171312(0xb0)});const _0xe91aa7=resolve(_0x40626e,_0x171312(0xa9)),_0x2678ef=resolve(_0xe91aa7,_0x171312(0xa1));if(!existsSync(_0x2678ef))try{!existsSync(_0xe91aa7)&&(mkdirSync(_0xe91aa7,{'recursive':!![]}),logger['info'](_0x171312(0xc1),_0x171312(0xa7),{'path':_0xe91aa7}));const _0x28d38d=fileURLToPath(import.meta.url),_0x4f08ad=dirname(_0x28d38d),_0x5993a7=resolve(_0x4f08ad,'../../templates/rules/lovrabet_rules.mdc.tpl');existsSync(_0x5993a7)?(copyFileSync(_0x5993a7,_0x2678ef),logger[_0x171312(0x93)](_0x171312(0xc1),_0x171312(0x9b),{'from':_0x5993a7,'to':_0x2678ef}),console[_0x171312(0xb1)](_0x171312(0xa0))):logger[_0x171312(0x9a)](_0x171312(0xc1),_0x171312(0xb2),{'templatePath':_0x5993a7});}catch(_0x18f259){logger[_0x171312(0x95)](_0x171312(0xc1),'复制\x20Cursor\x20Rules\x20文件失败',{'error':_0x18f259 instanceof Error?_0x18f259['message']:String(_0x18f259)}),console[_0x171312(0x9a)](_0x171312(0xa5)+(_0x18f259 instanceof Error?_0x18f259['message']:String(_0x18f259)));}else console[_0x171312(0xb1)](_0x171312(0xb4)),logger['info'](_0x171312(0xc1),_0x171312(0x99),{'path':_0x2678ef});console['log'](_0x171312(0xaf)),console[_0x171312(0xb1)](_0x171312(0xc2)),console[_0x171312(0xb1)](_0x171312(0x91)+_0x5a5fb9),console[_0x171312(0xb1)](_0x171312(0xa4)+_0x410109),console[_0x171312(0xb1)](_0x171312(0x90)+_0x52b114),console[_0x171312(0xb1)](_0x171312(0x92)),console[_0x171312(0xb1)](_0x171312(0xae)),logger[_0x171312(0x93)](_0x171312(0xc1),_0x171312(0x8e),{'appcode':_0x5a5fb9,'env':_0x410109,'configPath':_0x52b114}),process[_0x171312(0xbd)](0x0);}catch(_0x417a49){logger['error'](_0x171312(0xc1),_0x171312(0xa3),{'error':_0x417a49 instanceof Error?_0x417a49[_0x171312(0x9f)]:String(_0x417a49)}),console[_0x171312(0x95)](_0x171312(0x96)+(_0x417a49 instanceof Error?_0x417a49['message']:String(_0x417a49))),process[_0x171312(0xbd)](0x1);}}
1
+ (function(_0x3f25dc,_0x545b95){const _0x3199bf=a55_0xe87e,_0x441525=_0x3f25dc();while(!![]){try{const _0x21b0e4=-parseInt(_0x3199bf(0x110))/0x1+parseInt(_0x3199bf(0x11a))/0x2+parseInt(_0x3199bf(0x102))/0x3*(-parseInt(_0x3199bf(0x132))/0x4)+parseInt(_0x3199bf(0x104))/0x5+parseInt(_0x3199bf(0x118))/0x6*(-parseInt(_0x3199bf(0x10a))/0x7)+parseInt(_0x3199bf(0x122))/0x8*(parseInt(_0x3199bf(0x10b))/0x9)+parseInt(_0x3199bf(0x127))/0xa*(-parseInt(_0x3199bf(0x124))/0xb);if(_0x21b0e4===_0x545b95)break;else _0x441525['push'](_0x441525['shift']());}catch(_0x985a1f){_0x441525['push'](_0x441525['shift']());}}}(a55_0x4dc7,0xd60a4));import{existsSync,mkdirSync,writeFileSync,readFileSync,copyFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';export async function configureCursorMcp(){const _0x3114dc=a55_0xe87e;try{const _0x451834=process[_0x3114dc(0x11d)](),_0x1be3b7=resolve(_0x451834,_0x3114dc(0x107)),_0x21fc6e=resolve(_0x1be3b7,'mcp.json'),_0x2c45e2=readConfig(),_0x8281=_0x2c45e2[_0x3114dc(0x103)]||_0x2c45e2[_0x3114dc(0x119)],_0x3ed5e1=_0x2c45e2['env']||_0x3114dc(0x125);!_0x8281&&(console['error'](_0x3114dc(0x121)),logger[_0x3114dc(0x113)](_0x3114dc(0xff),'未找到\x20appcode\x20配置'),process[_0x3114dc(0x116)](0x1));!existsSync(_0x1be3b7)&&(mkdirSync(_0x1be3b7,{'recursive':!![]}),logger[_0x3114dc(0x12c)]('mcp-cursor',_0x3114dc(0x115),{'path':_0x1be3b7}),console['log'](_0x3114dc(0x11c)+_0x1be3b7));const _0x5c6a1f={'command':_0x3114dc(0x123),'args':['-y','@lovrabet/dataset-mcp-server'],'env':{'LOVRABET_APP_CODE':String(_0x8281),'LOVRABET_ENV':String(_0x3ed5e1)}};let _0x689e29;if(existsSync(_0x21fc6e))try{const _0x4efa4f=readFileSync(_0x21fc6e,_0x3114dc(0x11f));_0x689e29=JSON['parse'](_0x4efa4f),!_0x689e29[_0x3114dc(0x12f)]&&(_0x689e29[_0x3114dc(0x12f)]={}),_0x689e29[_0x3114dc(0x12f)]['lovrabet-dataset']=_0x5c6a1f,logger[_0x3114dc(0x12c)](_0x3114dc(0xff),_0x3114dc(0x100),{'path':_0x21fc6e,'appcode':_0x8281,'env':_0x3ed5e1}),console['log'](_0x3114dc(0x12b));}catch(_0x57c002){logger[_0x3114dc(0x113)](_0x3114dc(0xff),_0x3114dc(0x111),{'error':_0x57c002 instanceof Error?_0x57c002[_0x3114dc(0x10f)]:String(_0x57c002)}),console['error'](_0x3114dc(0x10d)+(_0x57c002 instanceof Error?_0x57c002[_0x3114dc(0x10f)]:String(_0x57c002))),process[_0x3114dc(0x116)](0x1);}else _0x689e29={'mcpServers':{'lovrabet-dataset':_0x5c6a1f}},logger[_0x3114dc(0x12c)](_0x3114dc(0xff),_0x3114dc(0x10c),{'path':_0x21fc6e,'appcode':_0x8281,'env':_0x3ed5e1}),console[_0x3114dc(0x126)](_0x3114dc(0x12a));writeFileSync(_0x21fc6e,JSON[_0x3114dc(0x117)](_0x689e29,null,0x2),{'encoding':_0x3114dc(0x11f)});const _0x27171e=resolve(_0x1be3b7,_0x3114dc(0x129)),_0x4dae4e=resolve(_0x27171e,_0x3114dc(0x108));if(!existsSync(_0x4dae4e))try{!existsSync(_0x27171e)&&(mkdirSync(_0x27171e,{'recursive':!![]}),logger['info']('mcp-cursor',_0x3114dc(0x112),{'path':_0x27171e}));const _0x456c82=fileURLToPath(import.meta.url),_0x4dc925=dirname(_0x456c82),_0x4228a6=resolve(_0x4dc925,_0x3114dc(0x131));existsSync(_0x4228a6)?(copyFileSync(_0x4228a6,_0x4dae4e),logger[_0x3114dc(0x12c)]('mcp-cursor','复制\x20Cursor\x20Rules\x20文件',{'from':_0x4228a6,'to':_0x4dae4e}),console[_0x3114dc(0x126)](_0x3114dc(0x128))):logger[_0x3114dc(0x114)](_0x3114dc(0xff),_0x3114dc(0x101),{'templatePath':_0x4228a6});}catch(_0x4d075a){logger['error']('mcp-cursor','复制\x20Cursor\x20Rules\x20文件失败',{'error':_0x4d075a instanceof Error?_0x4d075a['message']:String(_0x4d075a)}),console[_0x3114dc(0x114)](_0x3114dc(0x106)+(_0x4d075a instanceof Error?_0x4d075a[_0x3114dc(0x10f)]:String(_0x4d075a)));}else console['log'](_0x3114dc(0x12d)),logger['info']('mcp-cursor',_0x3114dc(0x120),{'path':_0x4dae4e});console[_0x3114dc(0x126)]('\x0a✓\x20Cursor\x20MCP\x20配置成功!'),console[_0x3114dc(0x126)](_0x3114dc(0x12e)),console[_0x3114dc(0x126)](_0x3114dc(0x11b)+_0x8281),console[_0x3114dc(0x126)](_0x3114dc(0xfe)+_0x3ed5e1),console['log'](_0x3114dc(0x11e)+_0x21fc6e),console['log'](_0x3114dc(0x109)),console[_0x3114dc(0x126)](_0x3114dc(0x130)),logger['info']('mcp-cursor','配置\x20Cursor\x20MCP\x20成功',{'appcode':_0x8281,'env':_0x3ed5e1,'configPath':_0x21fc6e}),process['exit'](0x0);}catch(_0x61bf07){logger[_0x3114dc(0x113)](_0x3114dc(0xff),_0x3114dc(0x105),{'error':_0x61bf07 instanceof Error?_0x61bf07[_0x3114dc(0x10f)]:String(_0x61bf07)}),console[_0x3114dc(0x113)](_0x3114dc(0x10e)+(_0x61bf07 instanceof Error?_0x61bf07['message']:String(_0x61bf07))),process['exit'](0x1);}}function a55_0xe87e(_0x23ba8d,_0x16ad9a){_0x23ba8d=_0x23ba8d-0xfe;const _0x4dc7fd=a55_0x4dc7();let _0xe87e90=_0x4dc7fd[_0x23ba8d];return _0xe87e90;}function a55_0x4dc7(){const _0x1fde93=['\x0a配置信息:','mcpServers','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','../../templates/rules/lovrabet_rules.mdc.tpl','16620ckpcHp','\x20\x20-\x20环境:\x20','mcp-cursor','更新现有\x20mcp.json\x20配置','Cursor\x20Rules\x20模板文件不存在','135oTBmiw','appcode','8263680vrKFzc','配置\x20Cursor\x20MCP\x20失败','警告:\x20复制\x20Cursor\x20Rules\x20文件失败:\x20','.cursor','lovrabet_rules.mdc','\x0a现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','7LLiHTM','11212254Jfglrk','创建新的\x20mcp.json\x20配置','错误:\x20解析现有\x20mcp.json\x20失败:\x20','错误:\x20配置失败:\x20','message','157829JkLJqb','解析现有\x20mcp.json\x20失败','创建\x20.cursor/rules\x20目录','error','warn','创建\x20.cursor\x20目录','exit','stringify','6221166DAdDjp','app','1818410yuCtLy','\x20\x20-\x20AppCode:\x20','✓\x20创建\x20.cursor\x20目录:\x20','cwd','\x20\x20-\x20配置文件:\x20','utf8','Cursor\x20Rules\x20文件已存在,跳过','错误:\x20未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','8MuXhpZ','npx','11aSzhSn','online','log','15493740knWEZl','✓\x20创建\x20Cursor\x20Rules\x20文件:\x20.cursor/rules/lovrabet_rules.mdc','rules','✓\x20创建\x20mcp.json\x20配置文件','✓\x20更新\x20mcp.json\x20配置','info','!\x20Cursor\x20Rules\x20文件已存在,跳过创建,如需重新创建,请删除\x20.cursor/rules/lovrabet_rules.mdc\x20文件'];a55_0x4dc7=function(){return _0x1fde93;};return a55_0x4dc7();}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- const a53_0x3c6f9c=a53_0x2910;function a53_0x2910(_0x1596ba,_0x595c97){_0x1596ba=_0x1596ba-0xed;const _0x1a6de6=a53_0x1a6d();let _0x2910f7=_0x1a6de6[_0x1596ba];return _0x2910f7;}(function(_0x2df091,_0x5b8854){const _0x5b8cd4=a53_0x2910,_0x3fea49=_0x2df091();while(!![]){try{const _0x5e9fc7=parseInt(_0x5b8cd4(0xfa))/0x1+-parseInt(_0x5b8cd4(0x10e))/0x2+-parseInt(_0x5b8cd4(0xed))/0x3*(-parseInt(_0x5b8cd4(0x10b))/0x4)+parseInt(_0x5b8cd4(0x100))/0x5*(parseInt(_0x5b8cd4(0x10f))/0x6)+parseInt(_0x5b8cd4(0xf1))/0x7+-parseInt(_0x5b8cd4(0x10d))/0x8*(parseInt(_0x5b8cd4(0x103))/0x9)+parseInt(_0x5b8cd4(0x102))/0xa*(-parseInt(_0x5b8cd4(0x112))/0xb);if(_0x5e9fc7===_0x5b8854)break;else _0x3fea49['push'](_0x3fea49['shift']());}catch(_0x3b0020){_0x3fea49['push'](_0x3fea49['shift']());}}}(a53_0x1a6d,0x69dd2));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';const IDE_CONFIGS={'cursor':{'name':a53_0x3c6f9c(0xfd),'description':a53_0x3c6f9c(0xf5)},'claude':{'name':a53_0x3c6f9c(0x101),'description':a53_0x3c6f9c(0x101)}};function a53_0x1a6d(){const _0x19c463=['\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','\x20\x20lovrabet\x20mcp\x20install\x20claude\x20\x20\x20\x20#\x20claude\x20code\x0a','3355618cCQEQz','\x0a📦\x20正在配置\x20','\x0a可用命令:','log','Cursor\x20IDE','cwd','错误:\x20不支持的平台:\x20','\x0a请指定要配置的平台:\x0a','配置失败','215224lnEwOz','install','(空)','Cursor','错误:\x20不支持的命令:\x20','message','125QaJUPe','claude\x20code','5570NyuFaE','66339TiSEkj','\x20\x20cursor\x20\x20\x20-\x20Cursor\x20IDE','help','claude','\x20MCP...\x0a','name','error','setLogPath','1667732xagWic','支持的平台:','536rdsofk','719964PhQdig','116076weGAzy','mcp','\x20\x20claude\x20\x20\x20-\x20claude\x20code\x0a','14311neDsqg','cursor','6qVjZoC','exit'];a53_0x1a6d=function(){return _0x19c463;};return a53_0x1a6d();}export async function mcpCommand(_0x557f76,_0xeb8bb2,_0x125830){const _0x561469=a53_0x3c6f9c;logger[_0x561469(0x10a)](process[_0x561469(0xf6)]());if(_0x125830?.[_0x561469(0x105)]||_0x557f76==='--help'){showHelp();return;}_0x557f76!==_0x561469(0xfb)&&(console['error'](_0x561469(0xfe)+(_0x557f76||_0x561469(0xfc))),console['log'](_0x561469(0xf3)),console['log']('\x20\x20lovrabet\x20mcp\x20install\x20<ide>\x20\x20\x20\x20#\x20安装\x20MCP\x20配置'),console[_0x561469(0xf4)](_0x561469(0xef)),console[_0x561469(0xf4)](_0x561469(0x10c)),console[_0x561469(0xf4)](_0x561469(0x104)),console[_0x561469(0xf4)](_0x561469(0x111)),logger[_0x561469(0x109)](_0x561469(0x110),'不支持的命令:\x20'+_0x557f76),process[_0x561469(0xee)](0x1)),await installMcp(_0xeb8bb2?.[0x0]);}function showHelp(){console['log']('\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\x0a安装\x20MCP\x20配置:\x0a\x20\x20lovrabet\x20mcp\x20install\x20<ide>\x20\x20\x20\x20\x20\x20\x20安装\x20MCP\x20配置到\x20IDE\x0a\x0a支持的平台:\x0a\x20\x20cursor\x20\x20\x20-\x20Cursor\x20IDE\x0a\x20\x20\x20\x20└──\x20自动配置\x20.cursor/mcp.json\x0a\x0a\x20\x20claude\x20\x20\x20-\x20claude\x20code\x0a\x20\x20\x20\x20└──\x20输出手动配置命令(需手动执行)\x0a\x0a示例:\x0a\x20\x20lovrabet\x20mcp\x20install\x20cursor\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor\x20的\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20claude\x20\x20\x20\x20\x20\x20\x20#\x20输出\x20claude\x20code\x20的\x20MCP\x20配置命令\x0a\x0a配置后:\x0a\x20\x20-\x20Cursor:\x20重启\x20IDE\x20即可使用\x0a\x20\x20-\x20claude\x20code:\x20手动执行输出的命令\x0a');}async function installMcp(_0x549104){const _0x11f9e7=a53_0x3c6f9c;!_0x549104&&(console[_0x11f9e7(0xf4)](_0x11f9e7(0xf8)),console[_0x11f9e7(0xf4)]('\x20\x20lovrabet\x20mcp\x20install\x20cursor\x20\x20\x20\x20#\x20Cursor\x20IDE'),console[_0x11f9e7(0xf4)](_0x11f9e7(0xf0)),process[_0x11f9e7(0xee)](0x1));const _0x11d944=_0x549104['toLowerCase']();!IDE_CONFIGS[_0x11d944]&&(console['error'](_0x11f9e7(0xf7)+_0x549104),console['log']('\x0a支持的平台:\x20cursor,\x20claude\x0a'),process[_0x11f9e7(0xee)](0x1));try{console[_0x11f9e7(0xf4)](_0x11f9e7(0xf2)+IDE_CONFIGS[_0x11d944][_0x11f9e7(0x108)]+_0x11f9e7(0x107));switch(_0x11d944){case _0x11f9e7(0x113):await configureCursorMcp();break;case _0x11f9e7(0x106):await configureClaudeMcp();break;}}catch(_0x4ffa36){logger[_0x11f9e7(0x109)]('mcp-install',_0x11f9e7(0xf9),{'error':_0x4ffa36 instanceof Error?_0x4ffa36[_0x11f9e7(0xff)]:String(_0x4ffa36)}),console[_0x11f9e7(0x109)]('\x0a错误:\x20配置失败\x20-\x20'+(_0x4ffa36 instanceof Error?_0x4ffa36[_0x11f9e7(0xff)]:String(_0x4ffa36))+'\x0a'),process[_0x11f9e7(0xee)](0x1);}}
1
+ const a56_0x58da98=a56_0x24b4;(function(_0x12c4a4,_0x21456f){const _0x56e130=a56_0x24b4,_0x1efdc2=_0x12c4a4();while(!![]){try{const _0x4d6058=-parseInt(_0x56e130(0x77))/0x1*(parseInt(_0x56e130(0x8a))/0x2)+parseInt(_0x56e130(0x7b))/0x3*(parseInt(_0x56e130(0x93))/0x4)+-parseInt(_0x56e130(0x8c))/0x5+parseInt(_0x56e130(0x9d))/0x6+parseInt(_0x56e130(0x96))/0x7*(-parseInt(_0x56e130(0x7d))/0x8)+-parseInt(_0x56e130(0x90))/0x9+-parseInt(_0x56e130(0x84))/0xa*(-parseInt(_0x56e130(0x94))/0xb);if(_0x4d6058===_0x21456f)break;else _0x1efdc2['push'](_0x1efdc2['shift']());}catch(_0xb8a695){_0x1efdc2['push'](_0x1efdc2['shift']());}}}(a56_0x4200,0x190d3));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';const IDE_CONFIGS={'cursor':{'name':a56_0x58da98(0x8e),'description':a56_0x58da98(0x8f)},'claude':{'name':'claude\x20code','description':'claude\x20code'}};export async function mcpCommand(_0xc127a3,_0x18893e,_0x5378a9){const _0x14ea29=a56_0x58da98;logger['setLogPath'](process[_0x14ea29(0x86)]());if(_0x5378a9?.[_0x14ea29(0x9c)]||_0xc127a3===_0x14ea29(0x79)){showHelp();return;}_0xc127a3!==_0x14ea29(0x95)&&(console[_0x14ea29(0x87)](_0x14ea29(0x81)+(_0xc127a3||_0x14ea29(0x9b))),console[_0x14ea29(0x75)](_0x14ea29(0x88)),console[_0x14ea29(0x75)](_0x14ea29(0x98)),console['log'](_0x14ea29(0x8d)),console[_0x14ea29(0x75)](_0x14ea29(0x7e)),console['log'](_0x14ea29(0x9f)),console[_0x14ea29(0x75)](_0x14ea29(0x7a)),logger['error']('mcp',_0x14ea29(0x76)+_0xc127a3),process[_0x14ea29(0x8b)](0x1)),await installMcp(_0x18893e?.[0x0]);}function showHelp(){const _0x469bda=a56_0x58da98;console[_0x469bda(0x75)](_0x469bda(0x83));}async function installMcp(_0x489538){const _0x3d3424=a56_0x58da98;!_0x489538&&(console[_0x3d3424(0x75)](_0x3d3424(0x91)),console[_0x3d3424(0x75)](_0x3d3424(0x9a)),console[_0x3d3424(0x75)](_0x3d3424(0x74)),process[_0x3d3424(0x8b)](0x1));const _0x43dbdf=_0x489538[_0x3d3424(0x85)]();!IDE_CONFIGS[_0x43dbdf]&&(console[_0x3d3424(0x87)](_0x3d3424(0x89)+_0x489538),console['log'](_0x3d3424(0x82)),process[_0x3d3424(0x8b)](0x1));try{console[_0x3d3424(0x75)](_0x3d3424(0x80)+IDE_CONFIGS[_0x43dbdf][_0x3d3424(0x7c)]+_0x3d3424(0x78));switch(_0x43dbdf){case _0x3d3424(0x7f):await configureCursorMcp();break;case'claude':await configureClaudeMcp();break;}}catch(_0x5d70c9){logger[_0x3d3424(0x87)](_0x3d3424(0x97),_0x3d3424(0x99),{'error':_0x5d70c9 instanceof Error?_0x5d70c9[_0x3d3424(0x92)]:String(_0x5d70c9)}),console['error'](_0x3d3424(0x9e)+(_0x5d70c9 instanceof Error?_0x5d70c9[_0x3d3424(0x92)]:String(_0x5d70c9))+'\x0a'),process[_0x3d3424(0x8b)](0x1);}}function a56_0x24b4(_0x759eca,_0x11c5c1){_0x759eca=_0x759eca-0x74;const _0x4200d7=a56_0x4200();let _0x24b40f=_0x4200d7[_0x759eca];return _0x24b40f;}function a56_0x4200(){const _0x5030ce=['\x20\x20lovrabet\x20mcp\x20install\x20cursor\x20\x20\x20\x20#\x20Cursor\x20IDE','(空)','help','230802svYtzy','\x0a错误:\x20配置失败\x20-\x20','\x20\x20cursor\x20\x20\x20-\x20Cursor\x20IDE','\x20\x20lovrabet\x20mcp\x20install\x20claude\x20\x20\x20\x20#\x20claude\x20code\x0a','log','不支持的命令:\x20','1lyhWNq','\x20MCP...\x0a','--help','\x20\x20claude\x20\x20\x20-\x20claude\x20code\x0a','27LpocEg','name','87680lvOYaN','支持的平台:','cursor','\x0a📦\x20正在配置\x20','错误:\x20不支持的命令:\x20','\x0a支持的平台:\x20cursor,\x20claude\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\x20\x20lovrabet\x20mcp\x20install\x20--other\x20\x20\x20\x20\x20显示其他\x20IDE\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\x20mcp\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--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--cursor\x20--claude\x20\x20#\x20配置多个\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--other\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示其他\x20IDE\x20配置指引\x0a\x0a支持的\x20IDE:\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20\x20\x20\x20\x20-\x20自动写入\x20.cursor/mcp.json,重启\x20IDE\x20后生效\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20-\x20输出配置命令供手动执行\x0a\x20\x20--other\x20\x20\x20\x20\x20\x20\x20\x20其他\x20IDE\x20\x20\x20\x20-\x20显示各\x20IDE\x20的配置指引(Antigravity/Codex/Copilot/OpenCode/Qoder/Windsurf\x20等)\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\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x0a\x20\x20\x20\x20→\x20输出\x20Claude\x20Code\x20MCP\x20配置命令\x0a\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x20--other\x0a\x20\x20\x20\x20→\x20显示其他\x20IDE\x20的配置指引\x0a\x0a配置指南:\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','790dJAjNi','toLowerCase','cwd','error','\x0a可用命令:','错误:\x20不支持的平台:\x20','388588wKPmAa','exit','76950kOcWKy','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','Cursor','Cursor\x20IDE','504810eiBtSY','\x0a请指定要配置的平台:\x0a','message','53752xyASeL','30624jteTVi','install','7uRkubv','mcp-install','\x20\x20lovrabet\x20mcp\x20install\x20<ide>\x20\x20\x20\x20#\x20安装\x20MCP\x20配置','配置失败'];a56_0x4200=function(){return _0x5030ce;};return a56_0x4200();}
@@ -0,0 +1 @@
1
+ const a57_0x3f831d=a57_0x8cfa;(function(_0xc855c6,_0x105b1d){const _0x213dfd=a57_0x8cfa,_0x545079=_0xc855c6();while(!![]){try{const _0x556dfb=parseInt(_0x213dfd(0x188))/0x1*(-parseInt(_0x213dfd(0x151))/0x2)+-parseInt(_0x213dfd(0x177))/0x3+parseInt(_0x213dfd(0x183))/0x4*(parseInt(_0x213dfd(0x17b))/0x5)+-parseInt(_0x213dfd(0x169))/0x6*(parseInt(_0x213dfd(0x181))/0x7)+-parseInt(_0x213dfd(0x19d))/0x8+-parseInt(_0x213dfd(0x178))/0x9*(parseInt(_0x213dfd(0x150))/0xa)+parseInt(_0x213dfd(0x19c))/0xb;if(_0x556dfb===_0x105b1d)break;else _0x545079['push'](_0x545079['shift']());}catch(_0x51f597){_0x545079['push'](_0x545079['shift']());}}}(a57_0x47ee,0xec09c));function a57_0x8cfa(_0x362238,_0x303dc0){_0x362238=_0x362238-0x147;const _0x47ee3b=a57_0x47ee();let _0x8cfade=_0x47ee3b[_0x362238];return _0x8cfade;}import{jsx as a57_0x203c53,jsxs as a57_0x1937e0,Fragment as a57_0x27a5db}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';function a57_0x47ee(){const _0xe8d753=['../../templates/skills','value','upArrow','agent','.lovrabet','codebuddy','opencode','1022142rtuSuy','9146484mSqWal','[\x20]','\x20\x20✓\x20','4735345FJYBiR','OpenCode','name','info','\x20失败:\x20','.codebuddy','7RnoGlI','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20q:\x20退出\x20Enter:\x20确认','4wfnpos','请至少选择一个\x20IDE','Trae','Windsurf\x20IDE\x20(.windsurf/workflows/)','column','961yhQGXv','cursor','按任意键退出...','error','green','size','downArrow','from','antigravity','CodeBuddy','.agent','return','Claude\x20Code','gray','blue','cwd','.opencode','通用模板\x20(.agent/skills/)\x20-\x20兜底方案','.lovrabet/skill/.shared','installing','32035553afSPdv','2680816fdnRwn','has','Windsurf','\x20\x20✗\x20安装\x20','white','已安装\x20','delete','codex','Claude\x20Code\x20(.claude/skills/)','.lovrabet/skill-manifest.json','skill-install','.trae','10QgRDvg','1910mLWJQS','Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)','windsurf','\x20个目录','OpenCode\x20IDE\x20(.opencode/skills/)','2.0.0','map','Trae\x20IDE\x20(.trae/skills/)','CodeBuddy\x20IDE\x20(.codebuddy/skills/)','.windsurf','add','label','length','Cursor','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','claude','.codex','正在安装技能包...','cyan','selecting','done','isDirectory','folders','toISOString','1696398rIFwoP','Codex\x20IDE\x20(.codex/skills/)','Codex','Antigravity\x20IDE\x20(.agent/skills/)','indexOf','.qoder','其他\x20(通用模板)'];a57_0x47ee=function(){return _0xe8d753;};return a57_0x47ee();}import{existsSync,mkdirSync,writeFileSync,copyFileSync,readdirSync,statSync}from'node:fs';import{resolve,dirname,join}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';const __dirname=dirname(fileURLToPath(import.meta.url)),IDE_CONFIGS={'cursor':{'name':a57_0x3f831d(0x15e),'description':a57_0x3f831d(0x152),'folders':['.cursorrules','.cursor']},'windsurf':{'name':a57_0x3f831d(0x19f),'description':a57_0x3f831d(0x186),'folders':[a57_0x3f831d(0x15a)]},'claude':{'name':a57_0x3f831d(0x194),'description':a57_0x3f831d(0x14c),'folders':['.claude']},'codex':{'name':a57_0x3f831d(0x16b),'description':a57_0x3f831d(0x16a),'folders':[a57_0x3f831d(0x161)]},'opencode':{'name':a57_0x3f831d(0x17c),'description':a57_0x3f831d(0x155),'folders':[a57_0x3f831d(0x198)]},'qoder':{'name':'Qoder','description':'Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)','folders':[a57_0x3f831d(0x16e)]},'codebuddy':{'name':a57_0x3f831d(0x191),'description':a57_0x3f831d(0x159),'folders':[a57_0x3f831d(0x180)]},'trae':{'name':a57_0x3f831d(0x185),'description':a57_0x3f831d(0x158),'folders':[a57_0x3f831d(0x14f)]},'agent':{'name':a57_0x3f831d(0x16f),'description':a57_0x3f831d(0x199),'folders':[a57_0x3f831d(0x192)]},'antigravity':{'name':'Antigravity','description':a57_0x3f831d(0x16c),'folders':[a57_0x3f831d(0x192)]}},IDE_LIST=[a57_0x3f831d(0x190),a57_0x3f831d(0x160),a57_0x3f831d(0x175),a57_0x3f831d(0x14b),a57_0x3f831d(0x189),a57_0x3f831d(0x176),'qoder','trae',a57_0x3f831d(0x153),a57_0x3f831d(0x173)];export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x43f7f6=a57_0x3f831d,{exit:_0x268608}=useApp(),[_0x1b71a7,_0x25af7c]=useState(_0x43f7f6(0x164)),[_0x2219d5,_0x4eb260]=useState(new Set(preselectedIDEs['map'](_0x399d12=>IDE_LIST[_0x43f7f6(0x16d)](_0x399d12))['filter'](_0x4ddb0e=>_0x4ddb0e>=0x0))),[_0x3bbaec,_0x3a2205]=useState(0x0),[_0x3fb6b5,_0x330649]=useState([]),[_0x31a5c6,_0x46e43e]=useState([]),[_0x3f1f10,_0x3f5d56]=useState(0x0),[_0xf60ed,_0x2239cd]=useState('');useEffect(()=>{const _0x88c34d=_0x43f7f6;preselectedIDEs[_0x88c34d(0x15d)]>0x0&&_0x2219d5[_0x88c34d(0x18d)]>0x0&&_0xdbb1b4();},[]),useInput((_0x24085c,_0x2acb32)=>{const _0x2372f1=_0x43f7f6;if(_0x1b71a7==='selecting'){if(_0x2acb32[_0x2372f1(0x172)]){_0x3a2205(_0x4a67be=>_0x4a67be>0x0?_0x4a67be-0x1:IDE_LIST[_0x2372f1(0x15d)]-0x1);return;}if(_0x2acb32[_0x2372f1(0x18e)]){_0x3a2205(_0x2e2a36=>_0x2e2a36<IDE_LIST['length']-0x1?_0x2e2a36+0x1:0x0);return;}if(_0x24085c==='\x20'){_0x4eb260(_0x392b53=>{const _0x38b8ad=_0x2372f1,_0x2d397b=new Set(_0x392b53);return _0x2d397b[_0x38b8ad(0x19e)](_0x3bbaec)?_0x2d397b[_0x38b8ad(0x14a)](_0x3bbaec):_0x2d397b[_0x38b8ad(0x15b)](_0x3bbaec),_0x2d397b;});return;}if(_0x24085c==='a'||_0x24085c==='A'){const _0x1c127d=new Set(IDE_LIST[_0x2372f1(0x157)]((_0x3cff6e,_0x23f4b1)=>_0x23f4b1));_0x4eb260(_0x1c127d);return;}if(_0x24085c==='i'||_0x24085c==='I'||_0x24085c==='r'||_0x24085c==='R'){_0x4eb260(_0x46bc67=>{const _0x5b2a64=_0x2372f1,_0x5598f2=new Set();for(let _0x47436b=0x0;_0x47436b<IDE_LIST['length'];_0x47436b++){!_0x46bc67[_0x5b2a64(0x19e)](_0x47436b)&&_0x5598f2['add'](_0x47436b);}return _0x5598f2;});return;}if(_0x24085c==='q'||_0x24085c==='Q'){_0x268608();return;}if(_0x2acb32[_0x2372f1(0x193)]){if(_0x2219d5['size']===0x0){_0x2239cd(_0x2372f1(0x184));return;}_0xdbb1b4();return;}}if(_0x1b71a7==='done'){_0x268608();return;}});async function _0xdbb1b4(){const _0x39817a=_0x43f7f6,_0x3cf7e8=Array[_0x39817a(0x18f)](_0x2219d5)[_0x39817a(0x157)](_0x2bfc76=>IDE_LIST[_0x2bfc76])['filter'](_0xf5872=>_0xf5872!==undefined);_0x46e43e(_0x3cf7e8),_0x330649([{'label':'已选择\x20IDE','value':_0x2219d5[_0x39817a(0x18d)]+'\x20个'}]),_0x25af7c('installing'),await _0x53beae(_0x3cf7e8);}async function _0x53beae(_0x378ae4){const _0x2672cd=_0x43f7f6,_0x245a71=process[_0x2672cd(0x197)](),_0x1b13c4=resolve(__dirname,_0x2672cd(0x170));logger['setLogPath'](_0x245a71);const _0xfc8a94=join(_0x1b13c4,'.shared'),_0x2f254a=join(_0x245a71,_0x2672cd(0x19a));existsSync(_0xfc8a94)&&await copyDir(_0xfc8a94,_0x2f254a);let _0x455d42=0x1;for(const _0x59c264 of _0x378ae4){try{const _0x5a6f00=await installSingleIDE(_0x59c264,_0x245a71,_0x1b13c4);_0x455d42+=_0x5a6f00,_0x3f5d56(_0x455d42);}catch(_0x4dbb6e){console[_0x2672cd(0x18b)](_0x2672cd(0x147)+_0x59c264+_0x2672cd(0x17f)+(_0x4dbb6e instanceof Error?_0x4dbb6e['message']:String(_0x4dbb6e)));}}const _0x4840d4={'version':_0x2672cd(0x156),'installedAt':new Date()[_0x2672cd(0x168)](),'platforms':_0x378ae4},_0x39a4ca=join(_0x245a71,_0x2672cd(0x14d));!existsSync(join(_0x245a71,_0x2672cd(0x174)))&&mkdirSync(join(_0x245a71,'.lovrabet'),{'recursive':!![]}),writeFileSync(_0x39a4ca,JSON['stringify'](_0x4840d4,null,0x2),'utf-8'),logger[_0x2672cd(0x17e)](_0x2672cd(0x14e),'安装成功',{'projectRoot':_0x245a71,'ides':_0x378ae4,'foldersCount':_0x455d42}),_0x25af7c('done'),setTimeout(()=>{_0x268608();},0x3e8);}return a57_0x1937e0(Box,{'flexDirection':_0x43f7f6(0x187),'marginTop':0x1,'children':[_0x1b71a7==='selecting'&&a57_0x1937e0(a57_0x27a5db,{'children':[a57_0x203c53(Box,{'children':a57_0x203c53(Text,{'color':_0x43f7f6(0x163),'children':'*\x20安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE'})}),_0xf60ed&&a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x1937e0(Text,{'color':'red','children':['✗\x20',_0xf60ed]})}),a57_0x1937e0(Box,{'marginTop':0x1,'flexDirection':'column','children':[a57_0x203c53(Text,{'bold':!![],'children':'*\x20请选择要安装的\x20IDE:'}),IDE_LIST['map']((_0xa3a5e3,_0x3286ce)=>{const _0x31e2c4=_0x43f7f6,_0x230ce3=_0x3bbaec===_0x3286ce,_0x5554fe=_0x2219d5['has'](_0x3286ce);return a57_0x203c53(Box,{'children':a57_0x1937e0(Text,{'backgroundColor':_0x230ce3?_0x31e2c4(0x196):undefined,'color':_0x230ce3?_0x31e2c4(0x148):undefined,'children':['\x20\x20',_0x5554fe?'[✓]':_0x31e2c4(0x179),'\x20',IDE_CONFIGS[_0xa3a5e3][_0x31e2c4(0x17d)],'\x20',a57_0x1937e0(Text,{'color':_0x230ce3?_0x31e2c4(0x148):_0x31e2c4(0x195),'dimColor':!_0x230ce3,'children':['-\x20',IDE_CONFIGS[_0xa3a5e3]['description']]})]})},_0xa3a5e3);}),a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x1937e0(Text,{'color':_0x43f7f6(0x195),'children':['\x20',_0x43f7f6(0x182)]})})]})]}),_0x1b71a7===_0x43f7f6(0x19b)&&a57_0x1937e0(a57_0x27a5db,{'children':[_0x3fb6b5['map']((_0x2d6ffe,_0x5bdae9)=>a57_0x1937e0(Box,{'children':[a57_0x1937e0(Text,{'color':'green','children':['√\x20',_0x2d6ffe[_0x43f7f6(0x15c)],':\x20']}),a57_0x203c53(Text,{'color':'cyan','children':_0x2d6ffe[_0x43f7f6(0x171)]})]},_0x5bdae9)),a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x203c53(Text,{'children':_0x43f7f6(0x162)})}),_0x31a5c6[_0x43f7f6(0x157)](_0x263dad=>a57_0x1937e0(Box,{'children':[a57_0x203c53(Text,{'color':_0x43f7f6(0x18c),'children':_0x43f7f6(0x17a)}),a57_0x203c53(Text,{'children':IDE_CONFIGS[_0x263dad]?.[_0x43f7f6(0x17d)]||_0x263dad})]},_0x263dad)),a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x1937e0(Text,{'color':'gray','children':[_0x43f7f6(0x149),_0x3f1f10,'\x20个目录']})})]}),_0x1b71a7===_0x43f7f6(0x165)&&a57_0x1937e0(a57_0x27a5db,{'children':[a57_0x203c53(Box,{'children':a57_0x1937e0(Text,{'color':_0x43f7f6(0x18c),'children':['✓\x20技能包安装成功!共安装\x20',_0x3f1f10,_0x43f7f6(0x154)]})}),a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x203c53(Text,{'color':_0x43f7f6(0x195),'children':_0x43f7f6(0x15f)})}),a57_0x203c53(Box,{'marginTop':0x1,'children':a57_0x203c53(Text,{'color':_0x43f7f6(0x195),'children':_0x43f7f6(0x18a)})})]})]});}async function copyDir(_0x5228d0,_0x1caeee){const _0x102080=a57_0x3f831d,_0x455d19=statSync(_0x5228d0);if(_0x455d19[_0x102080(0x166)]()){!existsSync(_0x1caeee)&&mkdirSync(_0x1caeee,{'recursive':!![]});const _0x21b92a=readdirSync(_0x5228d0);for(const _0x299556 of _0x21b92a){await copyDir(join(_0x5228d0,_0x299556),join(_0x1caeee,_0x299556));}}else copyFileSync(_0x5228d0,_0x1caeee);}async function installSingleIDE(_0x2378b3,_0x5cbe7e,_0x1a9dd7){const _0x7030e6=a57_0x3f831d,_0x4285b4=_0x2378b3!=='agent'&&IDE_CONFIGS[_0x2378b3]!==undefined,_0x1fb675=_0x2378b3===_0x7030e6(0x173)||!_0x4285b4,_0x3339fb=_0x1fb675?[_0x7030e6(0x192)]:_0x4285b4?IDE_CONFIGS[_0x2378b3][_0x7030e6(0x167)]:[_0x7030e6(0x192)];let _0x2f314d=0x0;for(const _0x2756b9 of _0x3339fb){const _0x5e6bcf=join(_0x1a9dd7,_0x2756b9),_0x4368e3=join(_0x5cbe7e,_0x2756b9);if(!existsSync(_0x5e6bcf))continue;await copyDir(_0x5e6bcf,_0x4368e3),_0x2f314d++;}return _0x2f314d;}
@@ -1 +1 @@
1
- const a54_0x48f2fa=a54_0x59dc;function a54_0x59dc(_0x1f33e9,_0x5900a6){_0x1f33e9=_0x1f33e9-0x10f;const _0x195159=a54_0x1951();let _0x59dcfc=_0x195159[_0x1f33e9];return _0x59dcfc;}(function(_0x19da05,_0x3c3138){const _0x59ba2d=a54_0x59dc,_0x52f06b=_0x19da05();while(!![]){try{const _0x37a34f=-parseInt(_0x59ba2d(0x12a))/0x1+-parseInt(_0x59ba2d(0x119))/0x2+-parseInt(_0x59ba2d(0x111))/0x3*(parseInt(_0x59ba2d(0x114))/0x4)+parseInt(_0x59ba2d(0x127))/0x5+-parseInt(_0x59ba2d(0x142))/0x6*(parseInt(_0x59ba2d(0x126))/0x7)+parseInt(_0x59ba2d(0x139))/0x8+-parseInt(_0x59ba2d(0x115))/0x9*(-parseInt(_0x59ba2d(0x12e))/0xa);if(_0x37a34f===_0x3c3138)break;else _0x52f06b['push'](_0x52f06b['shift']());}catch(_0x52294e){_0x52f06b['push'](_0x52f06b['shift']());}}}(a54_0x1951,0xeb0f8));function a54_0x1951(){const _0x1f02fe=['Windsurf','安装失败','.windsurf','\x20\x20lovrabet\x20skill\x20install\x20cursor\x20\x20\x20#\x20Cursor\x20IDE','claude\x20code','message','支持的平台:','\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','toISOString','--help','5415GJVIxd','skill','.lovrabet','3188LPNxHl','145836tnqWsZ','\x0a✓\x20技能包安装成功!\x0a','\x20\x20-\x20在\x20claude\x20code\x20设置中添加此技能,即可使用\x0a','\x20\x20-\x20.windsurf/workflows/lovrabet.md\x20文件已安装\x0a','2430184rKiFFf','claude\x20code\x20(.claude/skills/)','\x20\x20-\x20.claude/skills/lovrabet/SKILL.md\x20文件已安装','error','\x20\x20windsurf\x20-\x20Windsurf\x20IDE','cursor','utf-8','isDirectory','setLogPath','错误:\x20不支持的平台:\x20','cwd','Windsurf\x20使用说明:','\x20\x20lovrabet\x20skill\x20install\x20claude\x20\x20\x20#\x20claude\x20code\x0a','4543iMDDae','251530DJmukA','Cursor','skill-install','69349AXHNxL','warn','\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显示帮助信息\x0a\x0a安装技能包:\x0a\x20\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20安装技能包到项目\x0a\x0a支持的平台:\x0a\x20\x20cursor\x20\x20\x20-\x20Cursor\x20IDE\x0a\x20\x20\x20\x20└──\x20安装\x20.cursorrules\x20和\x20.cursor/commands/\x0a\x0a\x20\x20windsurf\x20-\x20Windsurf\x20IDE\x0a\x20\x20\x20\x20└──\x20安装\x20.windsurf/workflows/\x0a\x0a\x20\x20claude\x20\x20\x20-\x20claude\x20code\x0a\x20\x20\x20\x20└──\x20安装\x20.claude/skills/\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\x0a示例:\x0a\x20\x20lovrabet\x20skill\x20install\x20cursor\x20\x20\x20#\x20安装\x20Cursor\x20规则\x0a\x20\x20lovrabet\x20skill\x20install\x20windsurf\x20#\x20安装\x20Windsurf\x20规则\x0a\x20\x20lovrabet\x20skill\x20install\x20claude\x20\x20\x20#\x20安装\x20claude\x20code\x20规则\x0a\x0a安装后会在项目中创建:\x0a\x20\x20-\x20.cursorrules\x20或\x20.windsurf/workflows/\x20或\x20.claude/skills/\x0a\x20\x20-\x20.lovrabet/skill/.shared/guides/\x20\x20-\x20开发者技能指南\x0a\x0a开发者指南位置:\x0a\x20\x20.lovrabet/skill/.shared/guides/01-filter-query/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/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','log','1430pBaxkS','../../templates/skills','Cursor\x20使用说明:','错误:\x20不支持的命令:\x20','Windsurf\x20IDE\x20(.windsurf/workflows/)','.cursor','exit','windsurf','install','\x20\x20claude\x20\x20\x20-\x20claude\x20code\x0a','.lovrabet/skill-manifest.json','10552040yqSCGm','\x20\x20-\x20.lovrabet/skill/.shared/guides/\x20-\x20详细开发指南\x0a','✓\x20复制\x20.lovrabet/skill/.shared/','\x0a📦\x20正在安装\x20Lovrabet\x20技能包...\x0a','.lovrabet/skill/.shared','folders','安装成功','\x0a可用命令:','开发者指南位置:','6uolafy','\x0a支持的平台:\x20cursor,\x20windsurf,\x20claude\x0a'];a54_0x1951=function(){return _0x1f02fe;};return a54_0x1951();}import{existsSync,mkdirSync,writeFileSync,copyFileSync,readdirSync,statSync}from'node:fs';import{resolve,dirname,join}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';const __dirname=dirname(fileURLToPath(import.meta.url)),IDE_CONFIGS={'cursor':{'name':a54_0x48f2fa(0x128),'description':'Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)','folders':['.cursorrules',a54_0x48f2fa(0x133)]},'windsurf':{'name':a54_0x48f2fa(0x144),'description':a54_0x48f2fa(0x132),'folders':[a54_0x48f2fa(0x146)]},'claude':{'name':a54_0x48f2fa(0x148),'description':a54_0x48f2fa(0x11a),'folders':['.claude']}};export async function skillsCommand(_0x28aec0,_0x4313aa,_0x7daac){const _0x1c4dad=a54_0x48f2fa;logger[_0x1c4dad(0x121)](process['cwd']());if(_0x7daac?.['help']||_0x28aec0===_0x1c4dad(0x110)){showHelp();return;}_0x28aec0!==_0x1c4dad(0x136)&&(console[_0x1c4dad(0x11c)](_0x1c4dad(0x131)+(_0x28aec0||'(空)')),console[_0x1c4dad(0x12d)](_0x1c4dad(0x140)),console[_0x1c4dad(0x12d)]('\x20\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20#\x20安装技能包到项目'),console[_0x1c4dad(0x12d)](_0x1c4dad(0x14b)),console[_0x1c4dad(0x12d)](_0x1c4dad(0x14a)),console[_0x1c4dad(0x12d)]('\x20\x20cursor\x20\x20\x20-\x20Cursor\x20IDE'),console[_0x1c4dad(0x12d)](_0x1c4dad(0x11d)),console['log'](_0x1c4dad(0x137)),logger[_0x1c4dad(0x11c)](_0x1c4dad(0x112),'不支持的命令:\x20'+_0x28aec0),process[_0x1c4dad(0x134)](0x1)),await installSkill(_0x4313aa?.[0x0]);}function showHelp(){const _0x3ad10d=a54_0x48f2fa;console['log'](_0x3ad10d(0x12c));}async function copyDir(_0x5b89e7,_0x1492b4){const _0x32f1fc=a54_0x48f2fa,_0x52166e=statSync(_0x5b89e7);if(_0x52166e[_0x32f1fc(0x120)]()){!existsSync(_0x1492b4)&&mkdirSync(_0x1492b4,{'recursive':!![]});const _0x57c66c=readdirSync(_0x5b89e7);for(const _0x36a0cd of _0x57c66c){await copyDir(join(_0x5b89e7,_0x36a0cd),join(_0x1492b4,_0x36a0cd));}}else copyFileSync(_0x5b89e7,_0x1492b4);}async function installSkill(_0x567b5a){const _0x366b28=a54_0x48f2fa,_0xa241a7=process[_0x366b28(0x123)]();!_0x567b5a&&(console[_0x366b28(0x12d)]('\x0a请指定要安装的平台:\x0a'),console[_0x366b28(0x12d)](_0x366b28(0x147)),console['log']('\x20\x20lovrabet\x20skill\x20install\x20windsurf\x20#\x20Windsurf\x20IDE'),console['log'](_0x366b28(0x125)),process[_0x366b28(0x134)](0x1));!IDE_CONFIGS[_0x567b5a]&&(console[_0x366b28(0x11c)](_0x366b28(0x122)+_0x567b5a),console['log'](_0x366b28(0x143)),process[_0x366b28(0x134)](0x1));try{console[_0x366b28(0x12d)](_0x366b28(0x13c)),console[_0x366b28(0x12d)]('目标平台:\x20'+IDE_CONFIGS[_0x567b5a]['name']+'\x0a');const _0x5a628e=resolve(__dirname,_0x366b28(0x12f));let _0x4971f7=0x0;for(const _0x3bbbc5 of IDE_CONFIGS[_0x567b5a][_0x366b28(0x13e)]){const _0x2d0fc4=join(_0x5a628e,_0x3bbbc5),_0x53b503=join(_0xa241a7,_0x3bbbc5);if(!existsSync(_0x2d0fc4)){logger[_0x366b28(0x12b)]('skill-install','模板不存在:\x20'+_0x2d0fc4);continue;}await copyDir(_0x2d0fc4,_0x53b503),_0x4971f7++,console[_0x366b28(0x12d)]('✓\x20复制\x20'+_0x3bbbc5+'/');}const _0x354845=join(_0x5a628e,'.shared'),_0x33e132=join(_0xa241a7,_0x366b28(0x13d));existsSync(_0x354845)&&(await copyDir(_0x354845,_0x33e132),_0x4971f7++,console[_0x366b28(0x12d)](_0x366b28(0x13b)));const _0x5b0b71={'version':'2.0.0','installedAt':new Date()[_0x366b28(0x10f)](),'platform':_0x567b5a},_0x3648ef=join(_0xa241a7,_0x366b28(0x138));!existsSync(join(_0xa241a7,_0x366b28(0x113)))&&mkdirSync(join(_0xa241a7,_0x366b28(0x113)),{'recursive':!![]});writeFileSync(_0x3648ef,JSON['stringify'](_0x5b0b71,null,0x2),_0x366b28(0x11f)),console[_0x366b28(0x12d)]('✓\x20创建\x20.lovrabet/skill-manifest.json'),console[_0x366b28(0x12d)](_0x366b28(0x116));switch(_0x567b5a){case _0x366b28(0x11e):console[_0x366b28(0x12d)](_0x366b28(0x130)),console[_0x366b28(0x12d)]('\x20\x20-\x20.cursorrules\x20文件已创建,Cursor\x20会自动读取'),console[_0x366b28(0x12d)]('\x20\x20-\x20.cursor/commands/lovrabet.md\x20也已安装,可通过\x20@lovrabet\x20直接调用\x0a'),console[_0x366b28(0x12d)](_0x366b28(0x141)),console['log']('\x20\x20-\x20.lovrabet/skill/.shared/guides/\x20-\x20详细开发指南\x0a');break;case _0x366b28(0x135):console[_0x366b28(0x12d)](_0x366b28(0x124)),console[_0x366b28(0x12d)](_0x366b28(0x118)),console[_0x366b28(0x12d)]('开发者指南位置:'),console['log'](_0x366b28(0x13a));break;case'claude':console[_0x366b28(0x12d)]('claude\x20code\x20使用说明:'),console[_0x366b28(0x12d)](_0x366b28(0x11b)),console[_0x366b28(0x12d)](_0x366b28(0x117)),console[_0x366b28(0x12d)]('开发者指南位置:'),console[_0x366b28(0x12d)](_0x366b28(0x13a));break;}logger['info'](_0x366b28(0x129),_0x366b28(0x13f),{'projectRoot':_0xa241a7,'ide':_0x567b5a,'foldersCount':_0x4971f7});}catch(_0xdab6e4){logger['error']('skill-install',_0x366b28(0x145),{'error':_0xdab6e4 instanceof Error?_0xdab6e4[_0x366b28(0x149)]:String(_0xdab6e4)}),console[_0x366b28(0x11c)]('\x0a错误:\x20安装失败\x20-\x20'+(_0xdab6e4 instanceof Error?_0xdab6e4[_0x366b28(0x149)]:String(_0xdab6e4))+'\x0a'),process[_0x366b28(0x134)](0x1);}}
1
+ const a58_0x2c6c58=a58_0x40cc;function a58_0x40cc(_0x8bf14a,_0x3b8fbd){_0x8bf14a=_0x8bf14a-0xa1;const _0xaebbd9=a58_0xaebb();let _0x40cc43=_0xaebbd9[_0x8bf14a];return _0x40cc43;}(function(_0x3f37ea,_0x2cd5fa){const _0x272808=a58_0x40cc,_0x5efbb3=_0x3f37ea();while(!![]){try{const _0x336b26=parseInt(_0x272808(0xb3))/0x1+parseInt(_0x272808(0x104))/0x2*(parseInt(_0x272808(0xed))/0x3)+-parseInt(_0x272808(0xdd))/0x4+-parseInt(_0x272808(0xff))/0x5*(parseInt(_0x272808(0xd7))/0x6)+parseInt(_0x272808(0xa5))/0x7+parseInt(_0x272808(0xb6))/0x8+-parseInt(_0x272808(0xc5))/0x9*(parseInt(_0x272808(0xd5))/0xa);if(_0x336b26===_0x2cd5fa)break;else _0x5efbb3['push'](_0x5efbb3['shift']());}catch(_0x1cad71){_0x5efbb3['push'](_0x5efbb3['shift']());}}}(a58_0xaebb,0xf0696));import{existsSync,mkdirSync,writeFileSync,copyFileSync,readdirSync,statSync}from'node:fs';import{resolve,dirname,join}from'node:path';function a58_0xaebb(){const _0x18439c=['.opencode','.agent','10754360wEmwtr','toISOString','.codex','\x0a未选择任何\x20IDE,安装取消\x0a','\x0a📦\x20正在安装\x20','codebuddy','stdout','filter','输入\x200\x20安装所有\x20IDE,输入\x20q\x20取消\x0a','.windsurf','\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','skill-install','description','agent','使用示例:','63tFiVkg','isDirectory','setLogPath','\x20\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20#\x20直接安装指定\x20IDE\x20的技能包','.cursor','通用模板','Qoder','\x20\x20q.\x20取消\x0a','close','question','(空)','\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显示帮助信息\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并安装技能包\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20直接安装指定\x20IDE\x20的技能包\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\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支持的\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--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-\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\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--all\x0a\x20\x20\x20\x20→\x20安装所有\x20IDE\x20技能包\x0a\x0a安装后会在项目中创建:\x0a\x20\x20-\x20IDE\x20特定配置文件\x20(.cursorrules,\x20.windsurf/,\x20.claude/,\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-filter-query/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/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',',使用通用模板','.lovrabet/skill/.shared/','--help','help','2671630epNWmN','exit','6306AMpNoJ','install','Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)','Trae','\x20-\x20','.lovrabet/skill-manifest.json','6106412EGKvxw','includes','OpenCode\x20IDE\x20(.opencode/skills/)','cursor','quit','toLowerCase','Trae\x20IDE\x20(.trae/skills/)','log','claude\x20code\x20(.claude/skills/)','安装成功','\x0a✓\x20技能包安装成功!共安装\x20','name','OpenCode','all','\x20\x20✗\x20安装\x20','push','5173107WOQXqJ','folders','Windsurf\x20IDE\x20(.windsurf/workflows/)','cwd','错误:\x20不支持的命令:\x20','codex','\x0a错误:\x20安装失败\x20-\x20','\x20个目录\x0a','\x0a已取消安装\x0a','CodeBuddy\x20IDE\x20(.codebuddy/skills/)','stringify','opencode','输入格式:\x20输入编号,用空格分隔\x20(例如:\x201\x203\x205)','...\x0a','utf-8','✓\x20创建\x20.lovrabet/skill-manifest.json','.lovrabet/skill/.shared','Codex\x20IDE\x20(.codex/skills/)','3085QXwoEz','请选择:\x20','windsurf','trim','\x20失败:\x20','2xZFENa','length','2.0.0','✓\x20复制\x20.lovrabet/skill/.shared/','.qoder','7148687LIJNRF','.claude','安装失败','skill','\x20\x20.lovrabet/skill/.shared/guides/\x20-\x20详细开发指南\x0a','error','.cursorrules','.lovrabet','message','.shared','不支持的命令:\x20','claude','\x0a可用命令:','Cursor','940032LliGhH'];a58_0xaebb=function(){return _0x18439c;};return a58_0xaebb();}import{fileURLToPath}from'node:url';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';const __dirname=dirname(fileURLToPath(import.meta.url)),IDE_CONFIGS={'cursor':{'name':a58_0x2c6c58(0xb2),'description':a58_0x2c6c58(0xd9),'folders':[a58_0x2c6c58(0xab),a58_0x2c6c58(0xc9)]},'windsurf':{'name':'Windsurf','description':a58_0x2c6c58(0xef),'folders':[a58_0x2c6c58(0xbf)]},'claude':{'name':'claude\x20code','description':a58_0x2c6c58(0xe5),'folders':[a58_0x2c6c58(0xa6)]},'codex':{'name':'Codex','description':a58_0x2c6c58(0xfe),'folders':[a58_0x2c6c58(0xb8)]},'opencode':{'name':a58_0x2c6c58(0xe9),'description':a58_0x2c6c58(0xdf),'folders':[a58_0x2c6c58(0xb4)]},'qoder':{'name':a58_0x2c6c58(0xcb),'description':'Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)','folders':[a58_0x2c6c58(0xa4)]},'codebuddy':{'name':'CodeBuddy','description':a58_0x2c6c58(0xf6),'folders':['.codebuddy']},'trae':{'name':a58_0x2c6c58(0xda),'description':a58_0x2c6c58(0xe3),'folders':['.trae']}};export async function skillsCommand(_0x6c5d33,_0x24a157,_0x451bee){const _0x1aeac6=a58_0x2c6c58;logger[_0x1aeac6(0xc7)](process['cwd']());if(_0x451bee?.[_0x1aeac6(0xd4)]||_0x6c5d33===_0x1aeac6(0xd3)){showHelp();return;}_0x6c5d33!==_0x1aeac6(0xd8)&&(console[_0x1aeac6(0xaa)](_0x1aeac6(0xf1)+(_0x6c5d33||_0x1aeac6(0xcf))),console[_0x1aeac6(0xe4)](_0x1aeac6(0xb1)),console[_0x1aeac6(0xe4)]('\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并安装技能包'),console[_0x1aeac6(0xe4)](_0x1aeac6(0xc8)),console['log'](_0x1aeac6(0xc0)),console[_0x1aeac6(0xe4)](_0x1aeac6(0xc4)),console[_0x1aeac6(0xe4)]('\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择\x20IDE'),console[_0x1aeac6(0xe4)]('\x20\x20lovrabet\x20skill\x20install\x20cursor\x20\x20\x20\x20#\x20直接安装\x20Cursor\x20技能包\x0a'),logger[_0x1aeac6(0xaa)](_0x1aeac6(0xa8),_0x1aeac6(0xaf)+_0x6c5d33),process[_0x1aeac6(0xd6)](0x1)),await installSkill(_0x24a157?.[0x0]);}async function selectIDEs(){const _0x4004c6=a58_0x2c6c58,_0x382e1b=['cursor',_0x4004c6(0x101),_0x4004c6(0xb0),_0x4004c6(0xf2),_0x4004c6(0xf8),'qoder',_0x4004c6(0xbb),'trae'];return console[_0x4004c6(0xe4)]('\x0a请选择要安装技能包的\x20IDE\x20(可多选):\x0a'),_0x382e1b['forEach']((_0x30d2e6,_0xdfa144)=>{const _0x56e9d8=_0x4004c6;console[_0x56e9d8(0xe4)]('\x20\x20'+(_0xdfa144+0x1)+'.\x20'+IDE_CONFIGS[_0x30d2e6][_0x56e9d8(0xe8)]+_0x56e9d8(0xdb)+IDE_CONFIGS[_0x30d2e6][_0x56e9d8(0xc2)]);}),console['log']('\x20\x200.\x20全部安装'),console[_0x4004c6(0xe4)](_0x4004c6(0xcc)),console[_0x4004c6(0xe4)](_0x4004c6(0xf9)),console['log'](_0x4004c6(0xbe)),new Promise(_0x150b26=>{const _0x2ba211=_0x4004c6,_0x275c3b=createInterface({'input':process['stdin'],'output':process[_0x2ba211(0xbc)]});_0x275c3b[_0x2ba211(0xce)](_0x2ba211(0x100),_0x9d5101=>{const _0x1555a2=_0x2ba211;_0x275c3b[_0x1555a2(0xcd)]();const _0x414235=_0x9d5101[_0x1555a2(0x102)]()[_0x1555a2(0xe2)]();(_0x414235==='q'||_0x414235===_0x1555a2(0xe1)||_0x414235===_0x1555a2(0xd6))&&(console['log'](_0x1555a2(0xf5)),process['exit'](0x0));if(_0x414235==='0'||_0x414235==='all'){_0x150b26([_0x1555a2(0xea)]);return;}const _0x39523b=_0x414235['split'](/\s+/)[_0x1555a2(0xbd)](Boolean),_0x4641d2=[];for(const _0x53c01b of _0x39523b){const _0x30567b=parseInt(_0x53c01b,0xa);if(!isNaN(_0x30567b)&&_0x30567b>=0x1&&_0x30567b<=_0x382e1b[_0x1555a2(0xa1)]){const _0x482c5f=_0x382e1b[_0x30567b-0x1];_0x482c5f&&!_0x4641d2[_0x1555a2(0xde)](_0x482c5f)&&_0x4641d2['push'](_0x482c5f);}}_0x4641d2[_0x1555a2(0xa1)]===0x0&&(console['log'](_0x1555a2(0xb9)),process[_0x1555a2(0xd6)](0x0)),_0x150b26(_0x4641d2);});});}function showHelp(){const _0x2778d7=a58_0x2c6c58;console['log'](_0x2778d7(0xd0));}async function copyDir(_0x3aa335,_0x572c25){const _0x45697=a58_0x2c6c58,_0x31b3e1=statSync(_0x3aa335);if(_0x31b3e1[_0x45697(0xc6)]()){!existsSync(_0x572c25)&&mkdirSync(_0x572c25,{'recursive':!![]});const _0x4a7dfc=readdirSync(_0x3aa335);for(const _0x44dea6 of _0x4a7dfc){await copyDir(join(_0x3aa335,_0x44dea6),join(_0x572c25,_0x44dea6));}}else copyFileSync(_0x3aa335,_0x572c25);}async function installSingleIDE(_0xd42776,_0xc4195e,_0x2175af){const _0x5ef2d4=a58_0x2c6c58,_0x52d90c=_0xd42776!==_0x5ef2d4(0xc3)&&IDE_CONFIGS[_0xd42776]!==undefined,_0x205975=_0xd42776==='agent'||!_0x52d90c,_0x3943ee=_0x205975?_0x5ef2d4(0xca):_0x52d90c?IDE_CONFIGS[_0xd42776][_0x5ef2d4(0xe8)]:_0xd42776;console['log'](_0x5ef2d4(0xba)+_0x3943ee+_0x5ef2d4(0xfa));let _0x3c7902=0x0;const _0x4d167c=_0x205975?[_0x5ef2d4(0xb5)]:_0x52d90c?IDE_CONFIGS[_0xd42776][_0x5ef2d4(0xee)]:[_0x5ef2d4(0xb5)];for(const _0x47064a of _0x4d167c){const _0x597044=join(_0x2175af,_0x47064a),_0x5249fa=join(_0xc4195e,_0x47064a);if(!existsSync(_0x597044)){logger['warn']('skill-install','模板不存在:\x20'+_0x597044);continue;}await copyDir(_0x597044,_0x5249fa),_0x3c7902++,console[_0x5ef2d4(0xe4)]('\x20\x20✓\x20复制\x20'+_0x47064a+'/');}return _0x3c7902;}async function installSkill(_0x29ed15){const _0x5dd3e4=a58_0x2c6c58,_0x47a94e=process[_0x5dd3e4(0xf0)](),_0xbb48ac=resolve(__dirname,'../../templates/skills');let _0x205432=[];!_0x29ed15?_0x205432=await selectIDEs():_0x205432=[_0x29ed15];_0x205432[_0x5dd3e4(0xde)]('all')&&(_0x205432=[_0x5dd3e4(0xe0),'windsurf','claude',_0x5dd3e4(0xf2),_0x5dd3e4(0xf8),'qoder','codebuddy','trae',_0x5dd3e4(0xc3)]);const _0x3553ff=[];for(const _0x4f6edd of _0x205432){if(_0x4f6edd===_0x5dd3e4(0xc3))_0x3553ff[_0x5dd3e4(0xec)](_0x5dd3e4(0xc3));else{if(_0x4f6edd==='all')continue;else IDE_CONFIGS[_0x4f6edd]?_0x3553ff[_0x5dd3e4(0xec)](_0x4f6edd):(console[_0x5dd3e4(0xe4)]('⚠️\x20\x20未知的平台:\x20'+_0x4f6edd+_0x5dd3e4(0xd1)),_0x3553ff[_0x5dd3e4(0xec)](_0x5dd3e4(0xc3)));}}_0x3553ff[_0x5dd3e4(0xa1)]===0x0&&(console[_0x5dd3e4(0xe4)]('\x0a没有有效的\x20IDE\x20需要安装\x0a'),process[_0x5dd3e4(0xd6)](0x0));const _0xee4aca=join(_0xbb48ac,_0x5dd3e4(0xae)),_0x32a812=join(_0x47a94e,_0x5dd3e4(0xfd));existsSync(_0xee4aca)&&(await copyDir(_0xee4aca,_0x32a812),console['log']('✓\x20复制\x20.lovrabet/skill/.shared/'));let _0x4fb05b=0x0;for(const _0x3b3650 of _0x3553ff){try{const _0x103055=await installSingleIDE(_0x3b3650,_0x47a94e,_0xbb48ac);_0x4fb05b+=_0x103055;}catch(_0x4ed40c){console['error'](_0x5dd3e4(0xeb)+_0x3b3650+_0x5dd3e4(0x103)+(_0x4ed40c instanceof Error?_0x4ed40c[_0x5dd3e4(0xad)]:String(_0x4ed40c)));}}const _0x4187b0={'version':_0x5dd3e4(0xa2),'installedAt':new Date()[_0x5dd3e4(0xb7)](),'platforms':_0x3553ff};try{const _0x5882ff=join(_0xbb48ac,_0x5dd3e4(0xae)),_0x5c47ac=join(_0x47a94e,_0x5dd3e4(0xd2));existsSync(_0x5882ff)&&(await copyDir(_0x5882ff,_0x5c47ac),console[_0x5dd3e4(0xe4)](_0x5dd3e4(0xa3)));let _0x64234d=0x0;for(const _0x45b28a of _0x3553ff){try{const _0x361b16=await installSingleIDE(_0x45b28a,_0x47a94e,_0xbb48ac);_0x64234d+=_0x361b16;}catch(_0x4c8d5f){console[_0x5dd3e4(0xaa)](_0x5dd3e4(0xeb)+_0x45b28a+_0x5dd3e4(0x103)+(_0x4c8d5f instanceof Error?_0x4c8d5f[_0x5dd3e4(0xad)]:String(_0x4c8d5f)));}}const _0x16c1d1={'version':_0x5dd3e4(0xa2),'installedAt':new Date()[_0x5dd3e4(0xb7)](),'platforms':_0x3553ff},_0xdd6bf5=join(_0x47a94e,_0x5dd3e4(0xdc));!existsSync(join(_0x47a94e,_0x5dd3e4(0xac)))&&mkdirSync(join(_0x47a94e,'.lovrabet'),{'recursive':!![]}),writeFileSync(_0xdd6bf5,JSON[_0x5dd3e4(0xf7)](_0x16c1d1,null,0x2),_0x5dd3e4(0xfb)),console['log'](_0x5dd3e4(0xfc)),console['log'](_0x5dd3e4(0xe7)+_0x64234d+_0x5dd3e4(0xf4)),console[_0x5dd3e4(0xe4)]('开发者指南位置:'),console[_0x5dd3e4(0xe4)](_0x5dd3e4(0xa9)),logger['info'](_0x5dd3e4(0xc1),_0x5dd3e4(0xe6),{'projectRoot':_0x47a94e,'ides':_0x3553ff,'foldersCount':_0x64234d});}catch(_0x33515b){logger[_0x5dd3e4(0xaa)](_0x5dd3e4(0xc1),_0x5dd3e4(0xa7),{'error':_0x33515b instanceof Error?_0x33515b['message']:String(_0x33515b)}),console[_0x5dd3e4(0xaa)](_0x5dd3e4(0xf3)+(_0x33515b instanceof Error?_0x33515b[_0x5dd3e4(0xad)]:String(_0x33515b))+'\x0a'),process[_0x5dd3e4(0xd6)](0x1);}}
@@ -1 +1 @@
1
- function a56_0x423e(){const _0x3d8aaf=['45hZfbMV','⚠️\x20\x20SDK\x20版本不兼容','935544fpQDfl','\x1b[1m','759190SaVmwi','227839HlKZfR','existsSync','@lovrabet/sdk','2WNDBUG','\x20或更高版本:','minVersion','parse','560903FUZLUs','log','readFileSync','1311088uyRwfE','\x20\x20\x20请升级\x20SDK\x20至\x20','1486050kiXNuP','\x20\x20\x20当前\x20CLI\x20版本已升级模型注册协议,但检测到您的\x20@lovrabet/sdk\x20版本\x20','25452216QWvNqM','devDependencies','3XjFWIi','\x20\x20\x20npm\x20install\x20@lovrabet/sdk@latest','\x20不支持新协议。','\x20\x20\x20查看最新版本:\x20https://www.npmjs.com/package/@lovrabet/sdk','\x1b[0m','1.2.0','package.json','33QDtbgf','6FktEio','dependencies'];a56_0x423e=function(){return _0x3d8aaf;};return a56_0x423e();}const a56_0x5ab83=a56_0x5cef;(function(_0x26e9b0,_0x5917e5){const _0x5c1654=a56_0x5cef,_0x112f68=_0x26e9b0();while(!![]){try{const _0x2b50aa=-parseInt(_0x5c1654(0xe7))/0x1*(parseInt(_0x5c1654(0xea))/0x2)+parseInt(_0x5c1654(0xf7))/0x3*(-parseInt(_0x5c1654(0xf1))/0x4)+-parseInt(_0x5c1654(0xe6))/0x5+parseInt(_0x5c1654(0xe0))/0x6*(parseInt(_0x5c1654(0xee))/0x7)+-parseInt(_0x5c1654(0xe4))/0x8*(parseInt(_0x5c1654(0xe2))/0x9)+-parseInt(_0x5c1654(0xf3))/0xa*(parseInt(_0x5c1654(0xdf))/0xb)+parseInt(_0x5c1654(0xf5))/0xc;if(_0x2b50aa===_0x5917e5)break;else _0x112f68['push'](_0x112f68['shift']());}catch(_0x437741){_0x112f68['push'](_0x112f68['shift']());}}}(a56_0x423e,0x71140));import a56_0x48bc80 from'node:fs';import a56_0x29cbe5 from'node:path';import a56_0x1b58df from'semver';const MIN_SDK_VERSION=a56_0x5ab83(0xfc);export function checkSdkVersion(_0x81958c){const _0xc56182=a56_0x5ab83,_0x24c229=a56_0x29cbe5['join'](_0x81958c,_0xc56182(0xde));if(!a56_0x48bc80[_0xc56182(0xe8)](_0x24c229))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};try{const _0x270dfe=JSON[_0xc56182(0xed)](a56_0x48bc80[_0xc56182(0xf0)](_0x24c229,'utf8')),_0xb4fceb=_0x270dfe[_0xc56182(0xe1)]||{},_0x5d2ffa=_0x270dfe[_0xc56182(0xf6)]||{},_0x10996c=_0xb4fceb[_0xc56182(0xe9)]||_0x5d2ffa[_0xc56182(0xe9)];if(!_0x10996c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};const _0x38428d=a56_0x1b58df['coerce'](_0x10996c),_0x36fffe=_0x38428d?a56_0x1b58df['lt'](_0x38428d,MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x10996c,'needsUpgrade':_0x36fffe,'minVersion':MIN_SDK_VERSION};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};}}function a56_0x5cef(_0x392c06,_0x5bc009){_0x392c06=_0x392c06-0xde;const _0x423eb7=a56_0x423e();let _0x5cef93=_0x423eb7[_0x392c06];return _0x5cef93;}export function printSdkUpgradeWarning(_0x1374b7){const _0xf19b0a=a56_0x5ab83;if(!_0x1374b7['needsUpgrade'])return;const _0x34e5a7='\x1b[33m',_0x319d5e=_0xf19b0a(0xfb),_0x5e5cf9=_0xf19b0a(0xe5);console[_0xf19b0a(0xef)](),console[_0xf19b0a(0xef)](''+_0x34e5a7+_0x5e5cf9+_0xf19b0a(0xe3)+_0x319d5e),console[_0xf19b0a(0xef)](_0x34e5a7+_0xf19b0a(0xf4)+_0x1374b7['version']+_0xf19b0a(0xf9)+_0x319d5e),console['log'](_0x34e5a7+_0xf19b0a(0xf2)+_0x1374b7[_0xf19b0a(0xec)]+_0xf19b0a(0xeb)+_0x319d5e),console[_0xf19b0a(0xef)](_0x34e5a7+_0xf19b0a(0xf8)+_0x319d5e),console[_0xf19b0a(0xef)](_0x34e5a7+_0xf19b0a(0xfa)+_0x319d5e),console[_0xf19b0a(0xef)]();}
1
+ const a60_0x39d9ad=a60_0x3749;function a60_0x48cc(){const _0x470db3=['1.2.0','2330415smwmMb','12GVoqnJ','join','parse','12pTYfqm','94moMthB','minVersion','existsSync','\x20\x20\x20请升级\x20SDK\x20至\x20','readFileSync','@lovrabet/sdk','package.json','12rxxcnz','⚠️\x20\x20SDK\x20版本不兼容','4947467nrZdfM','61589307OVCFKK','version','\x1b[1m','\x20\x20\x20查看最新版本:\x20https://www.npmjs.com/package/@lovrabet/sdk','utf8','839931OktZQz','\x1b[0m','11LuGesn','\x20\x20\x20当前\x20CLI\x20版本已升级模型注册协议,但检测到您的\x20@lovrabet/sdk\x20版本\x20','dependencies','18cjRLJz','log','coerce','4190944DyFedn','737540wJfavg','\x20或更高版本:','84030Nshdcv','devDependencies'];a60_0x48cc=function(){return _0x470db3;};return a60_0x48cc();}(function(_0x1dca9e,_0x3cefc1){const _0x4bfe1e=a60_0x3749,_0x80ecc2=_0x1dca9e();while(!![]){try{const _0x2daafc=-parseInt(_0x4bfe1e(0xbb))/0x1+parseInt(_0x4bfe1e(0xac))/0x2*(-parseInt(_0x4bfe1e(0xc6))/0x3)+-parseInt(_0x4bfe1e(0xca))/0x4*(parseInt(_0x4bfe1e(0xc9))/0x5)+parseInt(_0x4bfe1e(0xb3))/0x6*(-parseInt(_0x4bfe1e(0xb5))/0x7)+parseInt(_0x4bfe1e(0xc3))/0x8*(parseInt(_0x4bfe1e(0xc0))/0x9)+-parseInt(_0x4bfe1e(0xc4))/0xa*(parseInt(_0x4bfe1e(0xbd))/0xb)+parseInt(_0x4bfe1e(0xab))/0xc*(parseInt(_0x4bfe1e(0xb6))/0xd);if(_0x2daafc===_0x3cefc1)break;else _0x80ecc2['push'](_0x80ecc2['shift']());}catch(_0xc1b5bf){_0x80ecc2['push'](_0x80ecc2['shift']());}}}(a60_0x48cc,0xb57f1));import a60_0x196550 from'node:fs';import a60_0x53d5b8 from'node:path';import a60_0x49b93d from'semver';const MIN_SDK_VERSION=a60_0x39d9ad(0xc8);export function checkSdkVersion(_0x30fc8e){const _0x4d6ec6=a60_0x39d9ad,_0x117fd8=a60_0x53d5b8[_0x4d6ec6(0xcb)](_0x30fc8e,_0x4d6ec6(0xb2));if(!a60_0x196550[_0x4d6ec6(0xae)](_0x117fd8))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};try{const _0x108779=JSON[_0x4d6ec6(0xcc)](a60_0x196550[_0x4d6ec6(0xb0)](_0x117fd8,_0x4d6ec6(0xba))),_0x57ba09=_0x108779[_0x4d6ec6(0xbf)]||{},_0x31b827=_0x108779[_0x4d6ec6(0xc7)]||{},_0xc365f5=_0x57ba09[_0x4d6ec6(0xb1)]||_0x31b827['@lovrabet/sdk'];if(!_0xc365f5)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};const _0x8f64b4=a60_0x49b93d[_0x4d6ec6(0xc2)](_0xc365f5),_0x1c2096=_0x8f64b4?a60_0x49b93d['lt'](_0x8f64b4,MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xc365f5,'needsUpgrade':_0x1c2096,'minVersion':MIN_SDK_VERSION};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};}}function a60_0x3749(_0x2c1fe9,_0x46dacb){_0x2c1fe9=_0x2c1fe9-0xab;const _0x48ccb4=a60_0x48cc();let _0x3749b0=_0x48ccb4[_0x2c1fe9];return _0x3749b0;}export function printSdkUpgradeWarning(_0x2df487){const _0x3211f8=a60_0x39d9ad;if(!_0x2df487['needsUpgrade'])return;const _0x3414f8='\x1b[33m',_0x5c3a50=_0x3211f8(0xbc),_0xb3f0d=_0x3211f8(0xb8);console[_0x3211f8(0xc1)](),console[_0x3211f8(0xc1)](''+_0x3414f8+_0xb3f0d+_0x3211f8(0xb4)+_0x5c3a50),console[_0x3211f8(0xc1)](_0x3414f8+_0x3211f8(0xbe)+_0x2df487[_0x3211f8(0xb7)]+'\x20不支持新协议。'+_0x5c3a50),console[_0x3211f8(0xc1)](_0x3414f8+_0x3211f8(0xaf)+_0x2df487[_0x3211f8(0xad)]+_0x3211f8(0xc5)+_0x5c3a50),console[_0x3211f8(0xc1)](_0x3414f8+'\x20\x20\x20npm\x20install\x20@lovrabet/sdk@latest'+_0x5c3a50),console[_0x3211f8(0xc1)](_0x3414f8+_0x3211f8(0xb9)+_0x5c3a50),console[_0x3211f8(0xc1)]();}
@@ -1 +1 @@
1
- const a57_0x249959=a57_0x68a8;(function(_0x21730e,_0x34becf){const _0x403370=a57_0x68a8,_0x44d2a3=_0x21730e();while(!![]){try{const _0x1075bb=parseInt(_0x403370(0x17f))/0x1+-parseInt(_0x403370(0x176))/0x2*(-parseInt(_0x403370(0x178))/0x3)+-parseInt(_0x403370(0x17a))/0x4+parseInt(_0x403370(0x172))/0x5*(-parseInt(_0x403370(0x179))/0x6)+-parseInt(_0x403370(0x181))/0x7+parseInt(_0x403370(0x17c))/0x8+-parseInt(_0x403370(0x17e))/0x9*(-parseInt(_0x403370(0x17b))/0xa);if(_0x1075bb===_0x34becf)break;else _0x44d2a3['push'](_0x44d2a3['shift']());}catch(_0x2e728a){_0x44d2a3['push'](_0x44d2a3['shift']());}}}(a57_0x3d08,0x57ae4));import{existsSync,readFileSync}from'node:fs';function a57_0x68a8(_0x3b32de,_0x576c05){_0x3b32de=_0x3b32de-0x172;const _0x3d0843=a57_0x3d08();let _0x68a8bf=_0x3d0843[_0x3b32de];return _0x68a8bf;}import{resolve}from'node:path';function a57_0x3d08(){const _0x269956=['appcode','parse','app','2CvdjnQ','utf8','1213047VJhdqT','654dppuli','2106828YWjNsA','1320630DUHOgg','3837392VjuVPU','trim','45NeFedQ','481893UsbCkv','.lovrabetrc','4794874ROyUHD','20890PCzOWq'];a57_0x3d08=function(){return _0x269956;};return a57_0x3d08();}import{homedir}from'node:os';export const projectConfigPath=resolve(process['cwd'](),a57_0x249959(0x180));export const globalConfigPath=resolve(homedir(),a57_0x249959(0x180));export function readConfig(){const _0xd7e39f=a57_0x249959;let _0x35ee9f={};try{if(existsSync(globalConfigPath)){const _0x1fe780=readFileSync(globalConfigPath,{'encoding':_0xd7e39f(0x177)});_0x1fe780&&(_0x35ee9f=JSON['parse'](_0x1fe780));}}catch(_0x232e1e){}try{if(existsSync(projectConfigPath)){const _0x2e057f=readFileSync(projectConfigPath,{'encoding':_0xd7e39f(0x177)});if(_0x2e057f){const _0x1ff76f=JSON[_0xd7e39f(0x174)](_0x2e057f);_0x35ee9f={..._0x35ee9f,..._0x1ff76f};}}}catch(_0x2d4e41){}return _0x35ee9f;}export function getConfigAppCode(){const _0x5f53e6=a57_0x249959;let _0x2397c7={},_0x42a249={};try{if(existsSync(globalConfigPath)){const _0x163735=readFileSync(globalConfigPath,{'encoding':_0x5f53e6(0x177)});_0x163735&&(_0x42a249=JSON[_0x5f53e6(0x174)](_0x163735));}}catch(_0x530b07){}try{if(existsSync(projectConfigPath)){const _0x280186=readFileSync(projectConfigPath,{'encoding':_0x5f53e6(0x177)});_0x280186&&(_0x2397c7=JSON[_0x5f53e6(0x174)](_0x280186));}}catch(_0xc49ba){}let _0x3b4bee;if(_0x5f53e6(0x173)in _0x2397c7)_0x3b4bee=_0x2397c7[_0x5f53e6(0x173)];else{if(_0x5f53e6(0x175)in _0x2397c7)_0x3b4bee=_0x2397c7[_0x5f53e6(0x175)];else{if(_0x5f53e6(0x173)in _0x42a249)_0x3b4bee=_0x42a249[_0x5f53e6(0x173)];else _0x5f53e6(0x175)in _0x42a249&&(_0x3b4bee=_0x42a249[_0x5f53e6(0x175)]);}}if(typeof _0x3b4bee!=='string'||_0x3b4bee[_0x5f53e6(0x17d)]()==='')return undefined;return _0x3b4bee;}export function isInProject(){return existsSync(projectConfigPath);}
1
+ const a61_0x7a12c7=a61_0x2e51;(function(_0x2af4ba,_0x43d4ea){const _0x4a30c5=a61_0x2e51,_0x3174d1=_0x2af4ba();while(!![]){try{const _0x40ee17=-parseInt(_0x4a30c5(0x1b9))/0x1*(-parseInt(_0x4a30c5(0x1b2))/0x2)+-parseInt(_0x4a30c5(0x1bc))/0x3+-parseInt(_0x4a30c5(0x1b4))/0x4+-parseInt(_0x4a30c5(0x1bb))/0x5+-parseInt(_0x4a30c5(0x1bd))/0x6+parseInt(_0x4a30c5(0x1b5))/0x7+parseInt(_0x4a30c5(0x1b8))/0x8*(parseInt(_0x4a30c5(0x1b3))/0x9);if(_0x40ee17===_0x43d4ea)break;else _0x3174d1['push'](_0x3174d1['shift']());}catch(_0x4e3e55){_0x3174d1['push'](_0x3174d1['shift']());}}}(a61_0x58d3,0xf1a37));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';function a61_0x58d3(){const _0x5ee5d9=['6444318leVbMU','.lovrabetrc','string','app','parse','2734598ibOoov','5823AQorcw','2378624HprDEi','8709610xCKmhX','appcode','cwd','37272OqwctK','1cFdQQe','utf8','9622570aRuBuE','3128784tkfGvE'];a61_0x58d3=function(){return _0x5ee5d9;};return a61_0x58d3();}import{homedir}from'node:os';export const projectConfigPath=resolve(process[a61_0x7a12c7(0x1b7)](),a61_0x7a12c7(0x1be));function a61_0x2e51(_0x5ac97c,_0x5f5b97){_0x5ac97c=_0x5ac97c-0x1b0;const _0x58d3f8=a61_0x58d3();let _0x2e516a=_0x58d3f8[_0x5ac97c];return _0x2e516a;}export const globalConfigPath=resolve(homedir(),a61_0x7a12c7(0x1be));export function readConfig(_0x491fb5){const _0xdb14e7=a61_0x7a12c7;let _0x384546={};try{if(existsSync(globalConfigPath)){const _0x4e704e=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x4e704e&&(_0x384546=JSON[_0xdb14e7(0x1b1)](_0x4e704e));}}catch(_0x499309){}try{const _0x5c78f6=_0x491fb5?resolve(_0x491fb5,_0xdb14e7(0x1be)):projectConfigPath;if(existsSync(_0x5c78f6)){const _0x2ba46a=readFileSync(_0x5c78f6,{'encoding':_0xdb14e7(0x1ba)});if(_0x2ba46a){const _0x105492=JSON[_0xdb14e7(0x1b1)](_0x2ba46a);_0x384546={..._0x384546,..._0x105492};}}}catch(_0x31b689){}return _0x384546;}export function getConfigAppCode(){const _0x2722c0=a61_0x7a12c7;let _0x1d5843={},_0x2ca804={};try{if(existsSync(globalConfigPath)){const _0x459f66=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x459f66&&(_0x2ca804=JSON[_0x2722c0(0x1b1)](_0x459f66));}}catch(_0x3d89f0){}try{if(existsSync(projectConfigPath)){const _0x2af9ba=readFileSync(projectConfigPath,{'encoding':_0x2722c0(0x1ba)});_0x2af9ba&&(_0x1d5843=JSON[_0x2722c0(0x1b1)](_0x2af9ba));}}catch(_0x4a2865){}let _0x309b46;if(_0x2722c0(0x1b6)in _0x1d5843)_0x309b46=_0x1d5843[_0x2722c0(0x1b6)];else{if(_0x2722c0(0x1b0)in _0x1d5843)_0x309b46=_0x1d5843['app'];else{if(_0x2722c0(0x1b6)in _0x2ca804)_0x309b46=_0x2ca804['appcode'];else _0x2722c0(0x1b0)in _0x2ca804&&(_0x309b46=_0x2ca804[_0x2722c0(0x1b0)]);}}if(typeof _0x309b46!==_0x2722c0(0x1bf)||_0x309b46['trim']()==='')return undefined;return _0x309b46;}export function isInProject(){return existsSync(projectConfigPath);}
@@ -1 +1 @@
1
- (function(_0x15bd63,_0x3f2674){const _0x4b3419=a58_0x4340,_0x198430=_0x15bd63();while(!![]){try{const _0x339bc5=-parseInt(_0x4b3419(0x16a))/0x1*(parseInt(_0x4b3419(0x16e))/0x2)+-parseInt(_0x4b3419(0x169))/0x3*(parseInt(_0x4b3419(0x16b))/0x4)+-parseInt(_0x4b3419(0x16f))/0x5+parseInt(_0x4b3419(0x15e))/0x6+parseInt(_0x4b3419(0x164))/0x7*(parseInt(_0x4b3419(0x162))/0x8)+parseInt(_0x4b3419(0x165))/0x9+parseInt(_0x4b3419(0x161))/0xa*(parseInt(_0x4b3419(0x15f))/0xb);if(_0x339bc5===_0x3f2674)break;else _0x198430['push'](_0x198430['shift']());}catch(_0x27aa3d){_0x198430['push'](_0x198430['shift']());}}}(a58_0x5db5,0x49369));import a58_0x5f070a from'node:path';function a58_0x4340(_0x323509,_0x2f46ad){_0x323509=_0x323509-0x15e;const _0x5db5b1=a58_0x5db5();let _0x43409f=_0x5db5b1[_0x323509];return _0x43409f;}import a58_0x25397f from'node:fs';export async function copyDirectory(_0x56e740,_0x42edd8){const _0x8188f8=a58_0x4340;try{const _0x26e5ba=a58_0x25397f[_0x8188f8(0x168)](_0x56e740,{'withFileTypes':!![]});a58_0x25397f[_0x8188f8(0x166)](_0x42edd8,{'recursive':!![]});for(const _0x2a17e5 of _0x26e5ba){const _0x160c37=a58_0x5f070a['join'](_0x56e740,_0x2a17e5[_0x8188f8(0x167)]),_0x2bdf7a=a58_0x5f070a[_0x8188f8(0x16c)](_0x42edd8,_0x2a17e5[_0x8188f8(0x167)]);_0x2a17e5['isDirectory']()?await copyDirectory(_0x160c37,_0x2bdf7a):a58_0x25397f[_0x8188f8(0x16d)](_0x160c37,_0x2bdf7a);}}catch(_0x7f6635){console[_0x8188f8(0x163)](_0x8188f8(0x160),_0x7f6635);}}function a58_0x5db5(){const _0x37f7aa=['readdirSync','261807ljqIRm','79537YpgvcR','12HIXoid','join','copyFileSync','2VfheFY','1442685OCrXHz','1231500TrOSGM','3407129jAYlUa','复制目录时出错:','10hNeLIF','9096qlNRWa','error','1022QJOons','2238939EFquWh','mkdirSync','name'];a58_0x5db5=function(){return _0x37f7aa;};return a58_0x5db5();}
1
+ (function(_0x56a667,_0x1117ed){const _0x16dcbb=a62_0x1993,_0x1da45e=_0x56a667();while(!![]){try{const _0x3f2770=-parseInt(_0x16dcbb(0x11e))/0x1+-parseInt(_0x16dcbb(0x11a))/0x2+parseInt(_0x16dcbb(0x11d))/0x3*(-parseInt(_0x16dcbb(0x117))/0x4)+parseInt(_0x16dcbb(0x121))/0x5+parseInt(_0x16dcbb(0x122))/0x6+parseInt(_0x16dcbb(0x11c))/0x7*(parseInt(_0x16dcbb(0x115))/0x8)+-parseInt(_0x16dcbb(0x123))/0x9*(-parseInt(_0x16dcbb(0x124))/0xa);if(_0x3f2770===_0x1117ed)break;else _0x1da45e['push'](_0x1da45e['shift']());}catch(_0x5e3267){_0x1da45e['push'](_0x1da45e['shift']());}}}(a62_0x3b2b,0x7d184));import a62_0x19276e from'node:path';function a62_0x1993(_0x12a6d6,_0x2414d4){_0x12a6d6=_0x12a6d6-0x115;const _0x3b2b63=a62_0x3b2b();let _0x199340=_0x3b2b63[_0x12a6d6];return _0x199340;}import a62_0x31bd14 from'node:fs';export async function copyDirectory(_0x3ff81e,_0x4b3397){const _0x45bda7=a62_0x1993;try{const _0x932c5e=a62_0x31bd14[_0x45bda7(0x11b)](_0x3ff81e,{'withFileTypes':!![]});a62_0x31bd14[_0x45bda7(0x120)](_0x4b3397,{'recursive':!![]});for(const _0x5e20ad of _0x932c5e){const _0x15ef22=a62_0x19276e[_0x45bda7(0x118)](_0x3ff81e,_0x5e20ad[_0x45bda7(0x116)]),_0x3f691c=a62_0x19276e[_0x45bda7(0x118)](_0x4b3397,_0x5e20ad[_0x45bda7(0x116)]);_0x5e20ad[_0x45bda7(0x119)]()?await copyDirectory(_0x15ef22,_0x3f691c):a62_0x31bd14['copyFileSync'](_0x15ef22,_0x3f691c);}}catch(_0x542031){console[_0x45bda7(0x11f)]('复制目录时出错:',_0x542031);}}function a62_0x3b2b(){const _0x326f40=['4104636bvVrqp','7596ijDfhF','1490kzSwvX','2733712cDDmTc','name','1108SgfSyT','join','isDirectory','1686318cHSZKj','readdirSync','7sVbmyT','654eyihaP','246246eQtzFM','error','mkdirSync','2553015BuaDAn'];a62_0x3b2b=function(){return _0x326f40;};return a62_0x3b2b();}
@@ -1 +1 @@
1
- (function(_0x36a6b6,_0x502ce0){const _0x570f43=a59_0x2da4,_0x240f17=_0x36a6b6();while(!![]){try{const _0x292bc4=-parseInt(_0x570f43(0x1f8))/0x1+parseInt(_0x570f43(0x1fd))/0x2+-parseInt(_0x570f43(0x1f6))/0x3+parseInt(_0x570f43(0x1fb))/0x4*(-parseInt(_0x570f43(0x203))/0x5)+parseInt(_0x570f43(0x209))/0x6*(-parseInt(_0x570f43(0x1f7))/0x7)+parseInt(_0x570f43(0x200))/0x8*(-parseInt(_0x570f43(0x1ff))/0x9)+parseInt(_0x570f43(0x20b))/0xa;if(_0x292bc4===_0x502ce0)break;else _0x240f17['push'](_0x240f17['shift']());}catch(_0x409c69){_0x240f17['push'](_0x240f17['shift']());}}}(a59_0x3c5a,0x9432c));export async function httpRequest(_0x23948e,_0xf3cfe4={}){const _0x5afe85=a59_0x2da4,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xf3cfe4;let _0x438bf=null;for(let _0x449331=0x0;_0x449331<=retries;_0x449331++){try{const _0x3ae00b=new AbortController(),_0x5ae2c9=setTimeout(()=>_0x3ae00b[_0x5afe85(0x1fe)](),timeout),_0x3979ab=await fetch(_0x23948e,{'headers':headers,'signal':_0x3ae00b[_0x5afe85(0x1f0)]});clearTimeout(_0x5ae2c9);let _0x59769f;const _0x26246f=_0x3979ab[_0x5afe85(0x1f9)][_0x5afe85(0x205)](_0x5afe85(0x20c));return _0x26246f?.[_0x5afe85(0x1f3)](_0x5afe85(0x20e))?_0x59769f=await _0x3979ab['json']():_0x59769f=await _0x3979ab[_0x5afe85(0x1fc)](),{'ok':_0x3979ab['ok'],'status':_0x3979ab['status'],'statusText':_0x3979ab[_0x5afe85(0x201)],'data':_0x59769f,'headers':_0x3979ab[_0x5afe85(0x1f9)],'url':_0x3979ab[_0x5afe85(0x1f2)],'text':()=>_0x3979ab['text']()};}catch(_0x50fa43){_0x438bf=_0x50fa43 instanceof Error?_0x50fa43:new Error(String(_0x50fa43));if(_0x449331===retries)break;if(shouldRetry(_0x50fa43)){console[_0x5afe85(0x207)](_0x5afe85(0x20d)+retryDelay+_0x5afe85(0x1fa)+(_0x449331+0x1)+_0x5afe85(0x202)),await sleep(retryDelay);continue;}else break;}}throw _0x438bf||new Error(_0x5afe85(0x20a));}function shouldRetry(_0x68326a){const _0x4235c0=a59_0x2da4;if(_0x68326a instanceof Error){if(_0x68326a[_0x4235c0(0x208)]===_0x4235c0(0x204))return![];if(_0x68326a['name']===_0x4235c0(0x1f1)&&_0x68326a[_0x4235c0(0x206)][_0x4235c0(0x1f3)](_0x4235c0(0x1f5)))return!![];if(_0x68326a[_0x4235c0(0x206)][_0x4235c0(0x1f3)](_0x4235c0(0x1f4)))return!![];if(_0x68326a[_0x4235c0(0x206)]['includes'](_0x4235c0(0x20f)))return![];}return![];}function sleep(_0x26a449){return new Promise(_0x4b597e=>setTimeout(_0x4b597e,_0x26a449));}function a59_0x2da4(_0x1b3fe8,_0x2edd8a){_0x1b3fe8=_0x1b3fe8-0x1f0;const _0x3c5aa9=a59_0x3c5a();let _0x2da4a1=_0x3c5aa9[_0x1b3fe8];return _0x2da4a1;}export function validateUrl(_0x38ca84){try{return new URL(_0x38ca84),!![];}catch{return![];}}function a59_0x3c5a(){const _0xac2f68=['message','log','name','4596qMnPHX','Request\x20failed','27866520CmefEI','content-type','*\x20请求失败,','application/json','ENOTFOUND','signal','TypeError','url','includes','ECONNRESET','fetch','592599hjJqSH','4186IUOnkY','1189630eyOpmp','headers','ms\x20后进行第\x20','2872SAAsLl','text','1300258hcbYay','abort','417456HkKxIK','56JfjFdo','statusText','\x20次重试...','4595AZftmm','AbortError','get'];a59_0x3c5a=function(){return _0xac2f68;};return a59_0x3c5a();}
1
+ (function(_0x47b436,_0x222f32){const _0xcdc024=a63_0x3f9c,_0x30bc8e=_0x47b436();while(!![]){try{const _0x5468dc=parseInt(_0xcdc024(0xb5))/0x1+parseInt(_0xcdc024(0xba))/0x2*(parseInt(_0xcdc024(0xbd))/0x3)+parseInt(_0xcdc024(0xa5))/0x4+-parseInt(_0xcdc024(0xa3))/0x5+-parseInt(_0xcdc024(0xb1))/0x6+parseInt(_0xcdc024(0xab))/0x7+parseInt(_0xcdc024(0xa6))/0x8*(parseInt(_0xcdc024(0xae))/0x9);if(_0x5468dc===_0x222f32)break;else _0x30bc8e['push'](_0x30bc8e['shift']());}catch(_0x2165dd){_0x30bc8e['push'](_0x30bc8e['shift']());}}}(a63_0x2d18,0x3f04e));function a63_0x3f9c(_0x5df391,_0x1e1cac){_0x5df391=_0x5df391-0xa2;const _0x2d1874=a63_0x2d18();let _0x3f9c77=_0x2d1874[_0x5df391];return _0x3f9c77;}export async function httpRequest(_0x1b37e5,_0x284af0={}){const _0x55d194=a63_0x3f9c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x284af0;let _0x406121=null;for(let _0x22722c=0x0;_0x22722c<=retries;_0x22722c++){try{const _0x356035=new AbortController(),_0x15093d=setTimeout(()=>_0x356035[_0x55d194(0xb8)](),timeout),_0x2e13e5=await fetch(_0x1b37e5,{'headers':headers,'signal':_0x356035[_0x55d194(0xac)]});clearTimeout(_0x15093d);let _0x4af9f7;const _0x4e199d=_0x2e13e5['headers'][_0x55d194(0xaa)]('content-type');return _0x4e199d?.[_0x55d194(0xb0)](_0x55d194(0xa9))?_0x4af9f7=await _0x2e13e5[_0x55d194(0xbe)]():_0x4af9f7=await _0x2e13e5[_0x55d194(0xbb)](),{'ok':_0x2e13e5['ok'],'status':_0x2e13e5[_0x55d194(0xbf)],'statusText':_0x2e13e5['statusText'],'data':_0x4af9f7,'headers':_0x2e13e5[_0x55d194(0xa4)],'url':_0x2e13e5[_0x55d194(0xb4)],'text':()=>_0x2e13e5[_0x55d194(0xbb)]()};}catch(_0x19e197){_0x406121=_0x19e197 instanceof Error?_0x19e197:new Error(String(_0x19e197));if(_0x22722c===retries)break;if(shouldRetry(_0x19e197)){console[_0x55d194(0xaf)](_0x55d194(0xb3)+retryDelay+_0x55d194(0xb9)+(_0x22722c+0x1)+_0x55d194(0xad)),await sleep(retryDelay);continue;}else break;}}throw _0x406121||new Error(_0x55d194(0xb6));}function shouldRetry(_0x569c29){const _0x3f3689=a63_0x3f9c;if(_0x569c29 instanceof Error){if(_0x569c29['name']===_0x3f3689(0xb7))return![];if(_0x569c29[_0x3f3689(0xa7)]===_0x3f3689(0xa8)&&_0x569c29[_0x3f3689(0xbc)][_0x3f3689(0xb0)](_0x3f3689(0xb2)))return!![];if(_0x569c29[_0x3f3689(0xbc)][_0x3f3689(0xb0)]('ECONNRESET'))return!![];if(_0x569c29[_0x3f3689(0xbc)][_0x3f3689(0xb0)](_0x3f3689(0xa2)))return![];}return![];}function sleep(_0x469ab0){return new Promise(_0x13d336=>setTimeout(_0x13d336,_0x469ab0));}function a63_0x2d18(){const _0x2daeaf=['abort','ms\x20后进行第\x20','2DXOrst','text','message','288696WwLUmC','json','status','ENOTFOUND','1736305JWEZyB','headers','752964HjHtdV','11768IjyIyf','name','TypeError','application/json','get','2253195RRLkue','signal','\x20次重试...','477tLpOKJ','log','includes','631392itRocr','fetch','*\x20请求失败,','url','26298QIiUVI','Request\x20failed','AbortError'];a63_0x2d18=function(){return _0x2daeaf;};return a63_0x2d18();}export function validateUrl(_0x55b7ef){try{return new URL(_0x55b7ef),!![];}catch{return![];}}