@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(_0x4c12fd,_0x4a801e){const _0x4e965d=a0_0x4014,_0x3c6c24=_0x4c12fd();while(!![]){try{const _0x71b5c4=parseInt(_0x4e965d(0x165))/0x1+parseInt(_0x4e965d(0x16e))/0x2+parseInt(_0x4e965d(0x173))/0x3*(-parseInt(_0x4e965d(0x17d))/0x4)+-parseInt(_0x4e965d(0x17a))/0x5*(parseInt(_0x4e965d(0x169))/0x6)+-parseInt(_0x4e965d(0x182))/0x7+parseInt(_0x4e965d(0x174))/0x8*(-parseInt(_0x4e965d(0x167))/0x9)+parseInt(_0x4e965d(0x177))/0xa*(parseInt(_0x4e965d(0x16d))/0xb);if(_0x71b5c4===_0x4a801e)break;else _0x3c6c24['push'](_0x3c6c24['shift']());}catch(_0x3d5ef5){_0x3c6c24['push'](_0x3c6c24['shift']());}}}(a0_0x5ab6,0x32380));import{jsx as a0_0x428ee5,jsxs as a0_0x541140}from'react/jsx-runtime';import{useState}from'react';function a0_0x5ab6(){const _0x1fe983=['312xYCGPT','21456uNKKmU','gray','endsWith','90sZjrOt','页面路由地址:\x20','my-page','15GNJhHi','length','split','7688cirkYl','路径中的每个段只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','column','\x20直接回车确认,或输入自定义路由地址','test','2513525BTptjY','\x20已存在,请使用其他路径','includes','33545tBjgVU','slice','702cAFSDE','return','132420YeZaqy','trim','路径不能包含连续的\x20/','页面路径长度不能超过\x20100\x20个字符','952853KxBNex','453826UHzTaH','路径不能以\x20/\x20开头或结尾','\x20←\x20','delete','existsSync'];a0_0x5ab6=function(){return _0x1fe983;};return a0_0x5ab6();}import{Text,Box,useInput}from'ink';function a0_0x4014(_0x1e0566,_0xb9ac86){_0x1e0566=_0x1e0566-0x165;const _0x5ab6c3=a0_0x5ab6();let _0x40146d=_0x5ab6c3[_0x1e0566];return _0x40146d;}import a0_0x473d9d from'node:fs';export function InputProjectCode(_0x269a7f){const _0x36feb5=a0_0x4014,{onSubmit:_0x4a3cff,pagePath:_0x4e5795}=_0x269a7f,[_0x557ce4,_0x435034]=useState(''),[_0x11e8e0,_0x40d0ce]=useState(''),_0x5ee12e=_0x36feb5(0x179);function _0x5031e0(_0x349d46){const _0x4883c1=_0x36feb5;if(_0x349d46[_0x4883c1(0x17b)]>0x64)return{'valid':![],'message':_0x4883c1(0x16c)};if(_0x349d46['startsWith']('/')||_0x349d46[_0x4883c1(0x176)]('/'))return{'valid':![],'message':_0x4883c1(0x16f)};if(_0x349d46[_0x4883c1(0x184)]('//'))return{'valid':![],'message':_0x4883c1(0x16b)};const _0x36fc23=_0x349d46[_0x4883c1(0x17c)]('/');for(const _0x3f35db of _0x36fc23){if(!_0x3f35db)continue;const _0x2aa444=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(!_0x2aa444[_0x4883c1(0x181)](_0x3f35db))return{'valid':![],'message':_0x4883c1(0x17e)};}return{'valid':!![]};}return useInput((_0x739f4a,_0x51d0e3)=>{const _0x43890c=_0x36feb5;if(_0x51d0e3[_0x43890c(0x168)]){const _0x39ee8e=_0x557ce4[_0x43890c(0x16a)]()||_0x5ee12e;if(_0x11e8e0)return;const _0xbc2c23=_0x4e5795+'/'+_0x39ee8e;if(a0_0x473d9d[_0x43890c(0x172)](_0xbc2c23)){_0x40d0ce('页面路径\x20'+_0x39ee8e+_0x43890c(0x183));return;}_0x4a3cff(_0x39ee8e),_0x435034(''),_0x40d0ce('');}else _0x51d0e3['backspace']||_0x51d0e3[_0x43890c(0x171)]?_0x435034(_0x124b2a=>{const _0x57f531=_0x43890c,_0x217502=_0x124b2a[_0x57f531(0x166)](0x0,-0x1),{valid:_0x5b29bd,message:_0x6fb04c}=_0x5031e0(_0x217502);return _0x40d0ce(_0x5b29bd?'':_0x6fb04c||'页面路径不合法'),_0x217502;}):_0x435034(_0x16a4f6=>{const _0x4866cf=_0x16a4f6+_0x739f4a,{valid:_0x33b6cb,message:_0x1cf68f}=_0x5031e0(_0x4866cf);return _0x40d0ce(_0x33b6cb?'':_0x1cf68f||'页面路径不合法'),_0x4866cf;});}),a0_0x541140(Box,{'flexDirection':_0x36feb5(0x17f),'children':[a0_0x541140(Box,{'children':[a0_0x428ee5(Text,{'color':_0x36feb5(0x175),'children':'\x20Step2:\x20'}),a0_0x428ee5(Text,{'children':_0x36feb5(0x178)}),_0x557ce4?a0_0x428ee5(Text,{'color':'green','children':_0x557ce4}):a0_0x428ee5(Text,{'color':'gray','children':_0x5ee12e}),_0x11e8e0&&a0_0x541140(Text,{'color':'red','children':[_0x36feb5(0x170),_0x11e8e0]})]}),!_0x11e8e0&&!_0x557ce4&&a0_0x428ee5(Box,{'children':a0_0x428ee5(Text,{'color':_0x36feb5(0x175),'children':_0x36feb5(0x180)})})]});}
1
+ (function(_0x2d8d11,_0x3c10ea){const _0x578c11=a0_0x33a0,_0x4051cd=_0x2d8d11();while(!![]){try{const _0x5086ed=parseInt(_0x578c11(0x16d))/0x1*(parseInt(_0x578c11(0x17b))/0x2)+parseInt(_0x578c11(0x174))/0x3+parseInt(_0x578c11(0x177))/0x4*(parseInt(_0x578c11(0x179))/0x5)+-parseInt(_0x578c11(0x181))/0x6*(parseInt(_0x578c11(0x16f))/0x7)+-parseInt(_0x578c11(0x164))/0x8*(parseInt(_0x578c11(0x17c))/0x9)+parseInt(_0x578c11(0x176))/0xa+-parseInt(_0x578c11(0x17f))/0xb*(parseInt(_0x578c11(0x175))/0xc);if(_0x5086ed===_0x3c10ea)break;else _0x4051cd['push'](_0x4051cd['shift']());}catch(_0x1248b9){_0x4051cd['push'](_0x4051cd['shift']());}}}(a0_0xd65d,0x25711));import{jsx as a0_0x57ae77,jsxs as a0_0xef57e9}from'react/jsx-runtime';import{useState}from'react';function a0_0xd65d(){const _0x1a5fcb=['column','80EGJhYD','trim','4bLANyz','36iPMgUx','\x20Step2:\x20','startsWith','22pDrnUM','existsSync','22308BOAOnW','路径不能以\x20/\x20开头或结尾','页面路径不合法','页面路径长度不能超过\x20100\x20个字符','\x20←\x20','447208wxLEhN','\x20已存在,请使用其他路径','delete','路径不能包含连续的\x20/','gray','split','页面路由地址:\x20','slice','test','98628RonZyy','页面路径\x20','259uXxYbR','green','backspace','includes','endsWith','148203YMcaiJ','530004kCbgUw','1277760zZonif','57108pwwfVL'];a0_0xd65d=function(){return _0x1a5fcb;};return a0_0xd65d();}import{Text,Box,useInput}from'ink';function a0_0x33a0(_0x2a0982,_0x138f95){_0x2a0982=_0x2a0982-0x161;const _0xd65d1f=a0_0xd65d();let _0x33a063=_0xd65d1f[_0x2a0982];return _0x33a063;}import a0_0x4eb061 from'node:fs';export function InputProjectCode(_0x2ed4a6){const _0x2f2e7f=a0_0x33a0,{onSubmit:_0x3e535f,pagePath:_0x43b902}=_0x2ed4a6,[_0x13c01b,_0x33f561]=useState(''),[_0x25c3e0,_0x5c5b47]=useState(''),_0x4fdf13='my-page';function _0xb79d83(_0x5c3a29){const _0x4dcbd1=a0_0x33a0;if(_0x5c3a29['length']>0x64)return{'valid':![],'message':_0x4dcbd1(0x162)};if(_0x5c3a29[_0x4dcbd1(0x17e)]('/')||_0x5c3a29[_0x4dcbd1(0x173)]('/'))return{'valid':![],'message':_0x4dcbd1(0x182)};if(_0x5c3a29[_0x4dcbd1(0x172)]('//'))return{'valid':![],'message':_0x4dcbd1(0x167)};const _0x1e1224=_0x5c3a29[_0x4dcbd1(0x169)]('/');for(const _0x1f635d of _0x1e1224){if(!_0x1f635d)continue;const _0x44b315=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(!_0x44b315[_0x4dcbd1(0x16c)](_0x1f635d))return{'valid':![],'message':'路径中的每个段只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};}return{'valid':!![]};}return useInput((_0x1ef75c,_0x3287a5)=>{const _0x59aed2=a0_0x33a0;if(_0x3287a5['return']){const _0x537009=_0x13c01b[_0x59aed2(0x17a)]()||_0x4fdf13;if(_0x25c3e0)return;const _0x3c66eb=_0x43b902+'/'+_0x537009;if(a0_0x4eb061[_0x59aed2(0x180)](_0x3c66eb)){_0x5c5b47(_0x59aed2(0x16e)+_0x537009+_0x59aed2(0x165));return;}_0x3e535f(_0x537009),_0x33f561(''),_0x5c5b47('');}else _0x3287a5[_0x59aed2(0x171)]||_0x3287a5[_0x59aed2(0x166)]?_0x33f561(_0x2ef5bb=>{const _0x1cb50b=_0x59aed2,_0x48fcf7=_0x2ef5bb[_0x1cb50b(0x16b)](0x0,-0x1),{valid:_0x2c3f75,message:_0x282877}=_0xb79d83(_0x48fcf7);return _0x5c5b47(_0x2c3f75?'':_0x282877||_0x1cb50b(0x161)),_0x48fcf7;}):_0x33f561(_0x19286f=>{const _0x1f2db6=_0x59aed2,_0x1b6eef=_0x19286f+_0x1ef75c,{valid:_0xb250a2,message:_0x35fe38}=_0xb79d83(_0x1b6eef);return _0x5c5b47(_0xb250a2?'':_0x35fe38||_0x1f2db6(0x161)),_0x1b6eef;});}),a0_0xef57e9(Box,{'flexDirection':_0x2f2e7f(0x178),'children':[a0_0xef57e9(Box,{'children':[a0_0x57ae77(Text,{'color':_0x2f2e7f(0x168),'children':_0x2f2e7f(0x17d)}),a0_0x57ae77(Text,{'children':_0x2f2e7f(0x16a)}),_0x13c01b?a0_0x57ae77(Text,{'color':_0x2f2e7f(0x170),'children':_0x13c01b}):a0_0x57ae77(Text,{'color':_0x2f2e7f(0x168),'children':_0x4fdf13}),_0x25c3e0&&a0_0xef57e9(Text,{'color':'red','children':[_0x2f2e7f(0x163),_0x25c3e0]})]}),!_0x25c3e0&&!_0x13c01b&&a0_0x57ae77(Box,{'children':a0_0x57ae77(Text,{'color':_0x2f2e7f(0x168),'children':'\x20直接回车确认,或输入自定义路由地址'})})]});}
@@ -1 +1 @@
1
- const a1_0x2d6b7c=a1_0x437a;(function(_0xe50381,_0x22fa7e){const _0xa334d=a1_0x437a,_0xa938f0=_0xe50381();while(!![]){try{const _0xe15cc6=-parseInt(_0xa334d(0x8f))/0x1*(-parseInt(_0xa334d(0xae))/0x2)+parseInt(_0xa334d(0xa8))/0x3+-parseInt(_0xa334d(0x9a))/0x4+parseInt(_0xa334d(0x96))/0x5+parseInt(_0xa334d(0xb2))/0x6+-parseInt(_0xa334d(0x90))/0x7+-parseInt(_0xa334d(0xad))/0x8*(parseInt(_0xa334d(0x9d))/0x9);if(_0xe15cc6===_0x22fa7e)break;else _0xa938f0['push'](_0xa938f0['shift']());}catch(_0x317630){_0xa938f0['push'](_0xa938f0['shift']());}}}(a1_0x1286,0x1c329));import{jsx as a1_0x5b1923,jsxs as a1_0x4c41d6,Fragment as a1_0x4d0a0e}from'react/jsx-runtime';import{fileURLToPath}from'node:url';import a1_0x4ef200 from'node:path';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';function a1_0x437a(_0x1d7576,_0x3af2f8){_0x1d7576=_0x1d7576-0x8e;const _0x1286e5=a1_0x1286();let _0x437ae5=_0x1286e5[_0x1d7576];return _0x437ae5;}import{SelectPageTemplate}from'./select-page-template.js';import{InputProjectCode}from'./input-page-router.js';import{logger}from'../utils/logger.js';function a1_0x1286(){const _0x241d49=['743172nrstFB','pages','then','1693233oGYUzF','cwd','add-page','processTemplate','finally','已选择页面模板\x20','\x20Step1:\x20','success','dirname','catch','\x20*\x20路由地址:\x20','367479tawOCN','now','message','column','\x20*\x20页面路径:\x20','8FbNSmp','62350jXVJzj','src','gray','已输入的页面路由\x20','297822gJveCw','正在创建页面,请稍候…','5QmUIYD','245735mdBwTx','join','setLogPath','页面添加失败:\x20','\x20Step2:\x20','resolve','982635CuFTmi','\x20*\x20页面文件已创建,可直接通过路由访问','info','../../templates/pages'];a1_0x1286=function(){return _0x241d49;};return a1_0x1286();}import{TemplateReplacer}from'../utils/template-replacer.js';const __dirname=a1_0x4ef200[a1_0x2d6b7c(0xa5)](fileURLToPath(import.meta.url)),pageTemplateDir=a1_0x4ef200[a1_0x2d6b7c(0x95)](__dirname,a1_0x2d6b7c(0x99)),projectDir=process[a1_0x2d6b7c(0x9e)]();export const AddPage=()=>{const _0x4afa5d=a1_0x2d6b7c,{exit:_0x276976}=useApp(),[_0x26b077,_0x33c2de]=useState(''),[_0x3e5102,_0x2fe182]=useState(''),[_0x2b006e,_0x41cb63]=useState(![]),[_0x5cffb9,_0x575ad7]=useState(![]),_0xcc1058=a1_0x4ef200[_0x4afa5d(0x91)](projectDir,_0x4afa5d(0xaf),_0x4afa5d(0x9b)),_0x150466=a1_0x4ef200[_0x4afa5d(0x91)](_0xcc1058,_0x3e5102),_0x237eaf=a1_0x4ef200['join'](_0x4afa5d(0xaf),_0x4afa5d(0x9b),_0x3e5102);useEffect(()=>{const _0x589ffa=_0x4afa5d,_0x28e48d=a1_0x4ef200['resolve'](pageTemplateDir,_0x26b077);if(_0x26b077&&_0x3e5102){_0x41cb63(!![]),logger[_0x589ffa(0x92)](process['cwd']());const _0xdc1b89=Date['now']();logger[_0x589ffa(0x98)]('add-page','开始添加页面:\x20'+_0x3e5102,{'template':_0x26b077,'targetPath':_0x237eaf}),TemplateReplacer[_0x589ffa(0xa0)](_0x28e48d,a1_0x4ef200[_0x589ffa(0x91)](_0xcc1058,_0x3e5102),_0x3e5102,_0x26b077)[_0x589ffa(0x9c)](()=>{const _0x4e4a8c=_0x589ffa,_0x339c49=Date[_0x4e4a8c(0xa9)]()-_0xdc1b89;logger[_0x4e4a8c(0xa4)]('add-page','页面添加成功:\x20'+_0x3e5102,_0x339c49,{'template':_0x26b077,'targetPath':_0x237eaf,'routePath':_0x3e5102}),_0x575ad7(!![]);})[_0x589ffa(0xa6)](_0x4d016d=>{const _0x1e3b64=_0x589ffa,_0x107d47=Date[_0x1e3b64(0xa9)]()-_0xdc1b89;logger['error'](_0x1e3b64(0x9f),_0x1e3b64(0x93)+_0x3e5102,{'template':_0x26b077,'targetPath':_0x237eaf,'error':_0x4d016d instanceof Error?_0x4d016d[_0x1e3b64(0xaa)]:String(_0x4d016d),'duration':_0x107d47});})[_0x589ffa(0xa1)](()=>{_0x41cb63(![]);});}},[_0x26b077,_0x3e5102]),useEffect(()=>{_0x5cffb9&&setTimeout(()=>{_0x276976();});},[_0x5cffb9]);if(_0x26b077)return a1_0x4c41d6(Box,{'flexDirection':_0x4afa5d(0xab),'paddingY':0x1,'children':[a1_0x4c41d6(Box,{'children':[a1_0x5b1923(Text,{'color':_0x4afa5d(0xb0),'children':_0x4afa5d(0xa3)}),a1_0x5b1923(Text,{'children':_0x4afa5d(0xa2)}),a1_0x5b1923(Text,{'color':'green','children':_0x26b077})]}),_0x3e5102?a1_0x4c41d6(Box,{'children':[a1_0x5b1923(Text,{'color':'gray','children':_0x4afa5d(0x94)}),a1_0x5b1923(Text,{'children':_0x4afa5d(0xb1)}),a1_0x5b1923(Text,{'color':'green','children':_0x3e5102})]}):a1_0x5b1923(InputProjectCode,{'pagePath':_0x150466,'onSubmit':_0x2fe182}),_0x3e5102&&_0x2b006e?a1_0x4c41d6(Box,{'marginTop':0x1,'children':[a1_0x5b1923(Box,{'width':'4'}),a1_0x5b1923(Text,{'children':_0x4afa5d(0x8e)})]}):null,_0x5cffb9?a1_0x4c41d6(a1_0x4d0a0e,{'children':[a1_0x5b1923(Box,{'marginTop':0x1,'children':a1_0x5b1923(Text,{'color':_0x4afa5d(0xb0),'children':'\x20*\x20页面创建成功!'})}),a1_0x4c41d6(Box,{'children':[a1_0x5b1923(Text,{'color':_0x4afa5d(0xb0),'children':_0x4afa5d(0xac)}),a1_0x5b1923(Text,{'color':'green','children':_0x237eaf})]}),a1_0x4c41d6(Box,{'children':[a1_0x5b1923(Text,{'color':_0x4afa5d(0xb0),'children':_0x4afa5d(0xa7)}),a1_0x4c41d6(Text,{'color':'green','children':['/',_0x3e5102]})]}),a1_0x5b1923(Box,{'marginTop':0x1,'children':a1_0x5b1923(Text,{'color':'cyan','children':_0x4afa5d(0x97)})})]}):null]});return a1_0x5b1923(SelectPageTemplate,{'onSelect':_0x33c2de});};
1
+ const a1_0x3eff67=a1_0x19f2;(function(_0x59d35d,_0x5b256d){const _0x214882=a1_0x19f2,_0x46a03=_0x59d35d();while(!![]){try{const _0xa1101d=-parseInt(_0x214882(0x1e7))/0x1*(-parseInt(_0x214882(0x1d2))/0x2)+-parseInt(_0x214882(0x1d5))/0x3*(parseInt(_0x214882(0x1d9))/0x4)+-parseInt(_0x214882(0x1dc))/0x5*(parseInt(_0x214882(0x1e3))/0x6)+parseInt(_0x214882(0x1de))/0x7*(parseInt(_0x214882(0x1d0))/0x8)+-parseInt(_0x214882(0x1ce))/0x9*(parseInt(_0x214882(0x1df))/0xa)+parseInt(_0x214882(0x1d6))/0xb+parseInt(_0x214882(0x1ed))/0xc;if(_0xa1101d===_0x5b256d)break;else _0x46a03['push'](_0x46a03['shift']());}catch(_0x1bd3d3){_0x46a03['push'](_0x46a03['shift']());}}}(a1_0x8315,0x22c43));import{jsx as a1_0x5583eb,jsxs as a1_0x4281e0,Fragment as a1_0x4ccd18}from'react/jsx-runtime';import{fileURLToPath}from'node:url';import a1_0xb55445 from'node:path';function a1_0x19f2(_0xae0f24,_0x464e02){_0xae0f24=_0xae0f24-0x1cb;const _0x831583=a1_0x8315();let _0x19f25c=_0x831583[_0xae0f24];return _0x19f25c;}import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{SelectPageTemplate}from'./select-page-template.js';import{InputProjectCode}from'./input-page-router.js';import{logger}from'../utils/logger.js';import{TemplateReplacer}from'../utils/template-replacer.js';const __dirname=a1_0xb55445['dirname'](fileURLToPath(import.meta.url)),pageTemplateDir=a1_0xb55445[a1_0x3eff67(0x1ee)](__dirname,'../../templates/pages'),projectDir=process[a1_0x3eff67(0x1dd)]();function a1_0x8315(){const _0x3d1853=['\x20*\x20页面路径:\x20','\x20*\x20页面创建成功!','message','开始添加页面:\x20','now','2614692wQkYsy','resolve','正在创建页面,请稍候…','gray','pages','green','27WwDoRW','页面添加失败:\x20','17312PzHRmV','join','324pysXGe','then','\x20Step2:\x20','27scJbIx','2573736guHZvE','\x20*\x20页面文件已创建,可直接通过路由访问','setLogPath','32wgnnKT','cyan','\x20Step1:\x20','81425dWuMfj','cwd','49qLGHMl','629890ZgybOR','页面添加成功:\x20','success','src','90XtrKrU','processTemplate','add-page','\x20*\x20路由地址:\x20','671bbkpuV'];a1_0x8315=function(){return _0x3d1853;};return a1_0x8315();}export const AddPage=()=>{const _0x55d050=a1_0x3eff67,{exit:_0x165caa}=useApp(),[_0x108a4b,_0x5c3e1a]=useState(''),[_0xb10614,_0x352ec9]=useState(''),[_0x22eccc,_0x527d80]=useState(![]),[_0x2f99ba,_0x3fe7a0]=useState(![]),_0x5d08b6=a1_0xb55445[_0x55d050(0x1d1)](projectDir,'src',_0x55d050(0x1cc)),_0xf0398d=a1_0xb55445[_0x55d050(0x1d1)](_0x5d08b6,_0xb10614),_0x31aff9=a1_0xb55445['join'](_0x55d050(0x1e2),_0x55d050(0x1cc),_0xb10614);useEffect(()=>{const _0x187779=_0x55d050,_0x41079a=a1_0xb55445[_0x187779(0x1ee)](pageTemplateDir,_0x108a4b);if(_0x108a4b&&_0xb10614){_0x527d80(!![]),logger[_0x187779(0x1d8)](process['cwd']());const _0xf87791=Date[_0x187779(0x1ec)]();logger['info'](_0x187779(0x1e5),_0x187779(0x1eb)+_0xb10614,{'template':_0x108a4b,'targetPath':_0x31aff9}),TemplateReplacer[_0x187779(0x1e4)](_0x41079a,a1_0xb55445[_0x187779(0x1d1)](_0x5d08b6,_0xb10614),_0xb10614,_0x108a4b)[_0x187779(0x1d3)](()=>{const _0x208d01=_0x187779,_0x134304=Date[_0x208d01(0x1ec)]()-_0xf87791;logger[_0x208d01(0x1e1)](_0x208d01(0x1e5),_0x208d01(0x1e0)+_0xb10614,_0x134304,{'template':_0x108a4b,'targetPath':_0x31aff9,'routePath':_0xb10614}),_0x3fe7a0(!![]);})['catch'](_0x8089b7=>{const _0x5c8ed3=_0x187779,_0x34fa0d=Date[_0x5c8ed3(0x1ec)]()-_0xf87791;logger['error'](_0x5c8ed3(0x1e5),_0x5c8ed3(0x1cf)+_0xb10614,{'template':_0x108a4b,'targetPath':_0x31aff9,'error':_0x8089b7 instanceof Error?_0x8089b7[_0x5c8ed3(0x1ea)]:String(_0x8089b7),'duration':_0x34fa0d});})['finally'](()=>{_0x527d80(![]);});}},[_0x108a4b,_0xb10614]),useEffect(()=>{_0x2f99ba&&setTimeout(()=>{_0x165caa();});},[_0x2f99ba]);if(_0x108a4b)return a1_0x4281e0(Box,{'flexDirection':'column','paddingY':0x1,'children':[a1_0x4281e0(Box,{'children':[a1_0x5583eb(Text,{'color':_0x55d050(0x1cb),'children':_0x55d050(0x1db)}),a1_0x5583eb(Text,{'children':'已选择页面模板\x20'}),a1_0x5583eb(Text,{'color':'green','children':_0x108a4b})]}),_0xb10614?a1_0x4281e0(Box,{'children':[a1_0x5583eb(Text,{'color':'gray','children':_0x55d050(0x1d4)}),a1_0x5583eb(Text,{'children':'已输入的页面路由\x20'}),a1_0x5583eb(Text,{'color':_0x55d050(0x1cd),'children':_0xb10614})]}):a1_0x5583eb(InputProjectCode,{'pagePath':_0xf0398d,'onSubmit':_0x352ec9}),_0xb10614&&_0x22eccc?a1_0x4281e0(Box,{'marginTop':0x1,'children':[a1_0x5583eb(Box,{'width':'4'}),a1_0x5583eb(Text,{'children':_0x55d050(0x1ef)})]}):null,_0x2f99ba?a1_0x4281e0(a1_0x4ccd18,{'children':[a1_0x5583eb(Box,{'marginTop':0x1,'children':a1_0x5583eb(Text,{'color':_0x55d050(0x1cb),'children':_0x55d050(0x1e9)})}),a1_0x4281e0(Box,{'children':[a1_0x5583eb(Text,{'color':_0x55d050(0x1cb),'children':_0x55d050(0x1e8)}),a1_0x5583eb(Text,{'color':_0x55d050(0x1cd),'children':_0x31aff9})]}),a1_0x4281e0(Box,{'children':[a1_0x5583eb(Text,{'color':_0x55d050(0x1cb),'children':_0x55d050(0x1e6)}),a1_0x4281e0(Text,{'color':_0x55d050(0x1cd),'children':['/',_0xb10614]})]}),a1_0x5583eb(Box,{'marginTop':0x1,'children':a1_0x5583eb(Text,{'color':_0x55d050(0x1da),'children':_0x55d050(0x1d7)})})]}):null]});return a1_0x5583eb(SelectPageTemplate,{'onSelect':_0x5c3e1a});};
@@ -1 +1 @@
1
- (function(_0x37f134,_0x4c7a9e){const _0x424bf5=a2_0x2b9e,_0x34f14c=_0x37f134();while(!![]){try{const _0x4aafd5=parseInt(_0x424bf5(0xcd))/0x1*(-parseInt(_0x424bf5(0xd3))/0x2)+parseInt(_0x424bf5(0xd6))/0x3*(parseInt(_0x424bf5(0xd9))/0x4)+-parseInt(_0x424bf5(0xd2))/0x5+-parseInt(_0x424bf5(0xe0))/0x6*(-parseInt(_0x424bf5(0xc8))/0x7)+-parseInt(_0x424bf5(0xc5))/0x8+-parseInt(_0x424bf5(0xdf))/0x9*(-parseInt(_0x424bf5(0xde))/0xa)+-parseInt(_0x424bf5(0xc3))/0xb*(-parseInt(_0x424bf5(0xda))/0xc);if(_0x4aafd5===_0x4c7a9e)break;else _0x34f14c['push'](_0x34f14c['shift']());}catch(_0x15c0c8){_0x34f14c['push'](_0x34f14c['shift']());}}}(a2_0x5c0f,0xee71c));import{jsx as a2_0x38a2ea,jsxs as a2_0x39dd40}from'react/jsx-runtime';import{useState,useEffect}from'react';function a2_0x2b9e(_0x1f9a93,_0x3b0aea){_0x1f9a93=_0x1f9a93-0xc1;const _0x5c0f42=a2_0x5c0f();let _0x2b9e96=_0x5c0f42[_0x1f9a93];return _0x2b9e96;}import{Text,Box,useInput}from'ink';function a2_0x5c0f(){const _0x5c0432=['获取模板列表失败:','sdk-fetch','10RoUqBA','14499522hPVyjZ','157362gCcBoH','downArrow','\x20\x20\x20\x20\x20\x20>\x20','36742607zLbfzN','column','15166752KMzbvv','green','onSelect','273dKyJFs','label','../..','gray','length','7fpFeLd','upArrow','filter','map','localeCompare','9184095dQpsUB','552804OqcnZW','resolve','sort','57zkhqKf','return','join','141052hWFdKD','12quPKCp','isDirectory'];a2_0x5c0f=function(){return _0x5c0432;};return a2_0x5c0f();}import{readdir}from'node:fs/promises';import a2_0x304758 from'node:path';import{fileURLToPath}from'node:url';async function getTemplateList(){const _0x36b603=a2_0x2b9e;try{const _0x25ae62=fileURLToPath(import.meta.url),_0x4d99b9=a2_0x304758[_0x36b603(0xd4)](a2_0x304758['dirname'](_0x25ae62),_0x36b603(0xca)),_0x4bb35f=a2_0x304758[_0x36b603(0xd8)](_0x4d99b9,'templates/pages'),_0x3a4bfc=await readdir(_0x4bb35f,{'withFileTypes':!![]}),_0x1eb0f7=_0x3a4bfc[_0x36b603(0xcf)](_0x37191f=>_0x37191f[_0x36b603(0xdb)]())[_0x36b603(0xd0)](_0x1c523e=>({'label':_0x1c523e['name']}))[_0x36b603(0xd5)]((_0x23d39e,_0x26b9ec)=>_0x23d39e[_0x36b603(0xc9)][_0x36b603(0xd1)](_0x26b9ec[_0x36b603(0xc9)]));return _0x1eb0f7;}catch(_0x1c4401){return console['error'](_0x36b603(0xdc),_0x1c4401),[{'label':'blank'},{'label':_0x36b603(0xdd)}];}}export function SelectPageTemplate(_0x4317a9){const _0x5c2af2=a2_0x2b9e,[_0x485be6,_0x470044]=useState(0x0),[_0x5c479e,_0x4d51b5]=useState([]),[_0x514b3e,_0x149cd8]=useState(!![]);useEffect(()=>{async function _0x572df1(){const _0x5822a1=await getTemplateList();_0x4d51b5(_0x5822a1),_0x149cd8(![]);}_0x572df1();},[]),useInput((_0x3cfb38,_0x5dafa2)=>{const _0x4c2d89=a2_0x2b9e;if(_0x514b3e)return;if(_0x5dafa2[_0x4c2d89(0xd7)]){const _0x579078=_0x5c479e[_0x485be6];_0x579078&&_0x4317a9[_0x4c2d89(0xc7)](_0x579078[_0x4c2d89(0xc9)]);}_0x5dafa2[_0x4c2d89(0xce)]&&_0x470044(_0x5cc2ab=>_0x5cc2ab===0x0?_0x5c479e[_0x4c2d89(0xcc)]-0x1:_0x5cc2ab-0x1),_0x5dafa2[_0x4c2d89(0xc1)]&&_0x470044(_0x587ed2=>_0x587ed2===_0x5c479e['length']-0x1?0x0:_0x587ed2+0x1);});if(_0x514b3e)return a2_0x38a2ea(Box,{'flexDirection':'column','paddingY':0x1,'children':a2_0x39dd40(Box,{'children':[a2_0x38a2ea(Text,{'color':'gray','children':'\x20Step1:\x20'}),a2_0x38a2ea(Text,{'children':'正在加载页面模板...'})]})});return a2_0x39dd40(Box,{'flexDirection':_0x5c2af2(0xc4),'paddingY':0x1,'children':[a2_0x39dd40(Box,{'children':[a2_0x38a2ea(Text,{'color':_0x5c2af2(0xcb),'children':'\x20Step1:\x20'}),a2_0x38a2ea(Text,{'children':'请选择您要创建的页面模板'})]}),_0x5c479e[_0x5c2af2(0xd0)]((_0x19e339,_0x530eb9)=>{const _0x4ae436=_0x5c2af2,_0x5d4547=_0x530eb9===_0x485be6,_0x156b5c=_0x5d4547?_0x4ae436(0xc2)+_0x19e339['label']:'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x19e339[_0x4ae436(0xc9)];return a2_0x38a2ea(Box,{'children':a2_0x38a2ea(Text,{'color':_0x5d4547?_0x4ae436(0xc6):undefined,'children':_0x156b5c})},_0x156b5c);})]});}
1
+ (function(_0xd9aaab,_0x370358){const _0x4a235d=a2_0x4622,_0x3e8e9f=_0xd9aaab();while(!![]){try{const _0x4988d5=parseInt(_0x4a235d(0x90))/0x1*(parseInt(_0x4a235d(0x7b))/0x2)+parseInt(_0x4a235d(0x7d))/0x3*(-parseInt(_0x4a235d(0x79))/0x4)+parseInt(_0x4a235d(0x72))/0x5+parseInt(_0x4a235d(0x84))/0x6*(-parseInt(_0x4a235d(0x8e))/0x7)+-parseInt(_0x4a235d(0x91))/0x8+-parseInt(_0x4a235d(0x82))/0x9*(-parseInt(_0x4a235d(0x8f))/0xa)+-parseInt(_0x4a235d(0x8c))/0xb*(-parseInt(_0x4a235d(0x71))/0xc);if(_0x4988d5===_0x370358)break;else _0x3e8e9f['push'](_0x3e8e9f['shift']());}catch(_0x331648){_0x3e8e9f['push'](_0x3e8e9f['shift']());}}}(a2_0x55f3,0x5bea4));import{jsx as a2_0x511edd,jsxs as a2_0xbbe193}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput}from'ink';import{readdir}from'node:fs/promises';import a2_0x533369 from'node:path';function a2_0x4622(_0x4812a3,_0x74d6e7){_0x4812a3=_0x4812a3-0x70;const _0x55f3f7=a2_0x55f3();let _0x4622b2=_0x55f3f7[_0x4812a3];return _0x4622b2;}import{fileURLToPath}from'node:url';async function getTemplateList(){const _0xa992af=a2_0x4622;try{const _0x1b89dd=fileURLToPath(import.meta.url),_0x5f11e3=a2_0x533369['resolve'](a2_0x533369[_0xa992af(0x83)](_0x1b89dd),_0xa992af(0x80)),_0x3be8fe=a2_0x533369[_0xa992af(0x86)](_0x5f11e3,_0xa992af(0x78)),_0x3e1d9b=await readdir(_0x3be8fe,{'withFileTypes':!![]}),_0x132f5a=_0x3e1d9b[_0xa992af(0x8d)](_0x129fd5=>_0x129fd5[_0xa992af(0x8a)]())[_0xa992af(0x75)](_0x218d3a=>({'label':_0x218d3a[_0xa992af(0x85)]}))['sort']((_0x13098a,_0x1a621b)=>_0x13098a[_0xa992af(0x70)][_0xa992af(0x7f)](_0x1a621b[_0xa992af(0x70)]));return _0x132f5a;}catch(_0x52b9b8){return console[_0xa992af(0x7e)]('获取模板列表失败:',_0x52b9b8),[{'label':_0xa992af(0x74)},{'label':'sdk-fetch'}];}}function a2_0x55f3(){const _0x345d45=['3kNPuyH','error','localeCompare','../..','length','11232fyzqIb','dirname','293082RwkCcd','name','join','column','\x20Step1:\x20','gray','isDirectory','upArrow','18601Tagypg','filter','7VSzAjd','1540nViMms','493369wXwvhD','2295864XaBWQg','label','1284xAcARk','2766370FVTgdY','green','blank','map','onSelect','\x20\x20\x20\x20\x20\x20>\x20','templates/pages','2829832qEwmjM','请选择您要创建的页面模板','2Dhijfl','downArrow'];a2_0x55f3=function(){return _0x345d45;};return a2_0x55f3();}export function SelectPageTemplate(_0x1ef8b4){const _0x2e827e=a2_0x4622,[_0x2343fa,_0x38e9ae]=useState(0x0),[_0x4c6249,_0x43cfdb]=useState([]),[_0x2d62ec,_0x2fad9a]=useState(!![]);useEffect(()=>{async function _0x4e3aea(){const _0x514f24=await getTemplateList();_0x43cfdb(_0x514f24),_0x2fad9a(![]);}_0x4e3aea();},[]),useInput((_0x202573,_0x11667a)=>{const _0x58401e=a2_0x4622;if(_0x2d62ec)return;if(_0x11667a['return']){const _0x20cd3a=_0x4c6249[_0x2343fa];_0x20cd3a&&_0x1ef8b4[_0x58401e(0x76)](_0x20cd3a[_0x58401e(0x70)]);}_0x11667a[_0x58401e(0x8b)]&&_0x38e9ae(_0x1ccf99=>_0x1ccf99===0x0?_0x4c6249[_0x58401e(0x81)]-0x1:_0x1ccf99-0x1),_0x11667a[_0x58401e(0x7c)]&&_0x38e9ae(_0x3241a0=>_0x3241a0===_0x4c6249['length']-0x1?0x0:_0x3241a0+0x1);});if(_0x2d62ec)return a2_0x511edd(Box,{'flexDirection':_0x2e827e(0x87),'paddingY':0x1,'children':a2_0xbbe193(Box,{'children':[a2_0x511edd(Text,{'color':_0x2e827e(0x89),'children':'\x20Step1:\x20'}),a2_0x511edd(Text,{'children':'正在加载页面模板...'})]})});return a2_0xbbe193(Box,{'flexDirection':_0x2e827e(0x87),'paddingY':0x1,'children':[a2_0xbbe193(Box,{'children':[a2_0x511edd(Text,{'color':_0x2e827e(0x89),'children':_0x2e827e(0x88)}),a2_0x511edd(Text,{'children':_0x2e827e(0x7a)})]}),_0x4c6249[_0x2e827e(0x75)]((_0x434b4b,_0x5ddb8c)=>{const _0x2ebd59=_0x2e827e,_0x5a4e32=_0x5ddb8c===_0x2343fa,_0x260643=_0x5a4e32?_0x2ebd59(0x77)+_0x434b4b[_0x2ebd59(0x70)]:'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x434b4b[_0x2ebd59(0x70)];return a2_0x511edd(Box,{'children':a2_0x511edd(Text,{'color':_0x5a4e32?_0x2ebd59(0x73):undefined,'children':_0x260643})},_0x260643);})]});}
@@ -0,0 +1 @@
1
+ const a3_0x5bec4f=a3_0x5c82;(function(_0x29d37c,_0x4f3860){const _0x297dce=a3_0x5c82,_0x3bf40d=_0x29d37c();while(!![]){try{const _0xb5e5c4=parseInt(_0x297dce(0x13e))/0x1*(parseInt(_0x297dce(0x15a))/0x2)+-parseInt(_0x297dce(0x12b))/0x3*(parseInt(_0x297dce(0x148))/0x4)+parseInt(_0x297dce(0x12a))/0x5*(parseInt(_0x297dce(0x14f))/0x6)+parseInt(_0x297dce(0x13a))/0x7*(parseInt(_0x297dce(0x155))/0x8)+-parseInt(_0x297dce(0x135))/0x9*(parseInt(_0x297dce(0x151))/0xa)+-parseInt(_0x297dce(0x142))/0xb*(-parseInt(_0x297dce(0x138))/0xc)+parseInt(_0x297dce(0x139))/0xd;if(_0xb5e5c4===_0x4f3860)break;else _0x3bf40d['push'](_0x3bf40d['shift']());}catch(_0x271422){_0x3bf40d['push'](_0x3bf40d['shift']());}}}(a3_0x4727,0x1ff93));import{jsx as a3_0x48ad42,jsxs as a3_0x94290f}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput,useApp}from'ink';import{configureMcp}from'./config.js';function a3_0x5c82(_0x3db0fa,_0x50b8f3){_0x3db0fa=_0x3db0fa-0x128;const _0x47272a=a3_0x4727();let _0x5c8290=_0x47272a[_0x3db0fa];return _0x5c8290;}import{installSkill,copySharedSkills,createSkillManifest,SKILL_IDE_CONFIGS}from'./config.js';const MCP_IDE_LIST=['cursor',a3_0x5bec4f(0x164)],SKILL_IDE_LIST=[a3_0x5bec4f(0x12c),a3_0x5bec4f(0x164),'codebuddy',a3_0x5bec4f(0x160),a3_0x5bec4f(0x149),a3_0x5bec4f(0x159),a3_0x5bec4f(0x156),a3_0x5bec4f(0x143),a3_0x5bec4f(0x146),a3_0x5bec4f(0x15f)];function a3_0x4727(){const _0x29fc38=['claude','•\x20Skill:\x20安装研发最佳实践、Backend\x20Function\x20规范','*\x20选择要配置的\x20IDE:','[✓]','440ZIaqsX','3zRSuQl','antigravity','selecting','filter','error','gray','请至少选择一个配置项','length','[\x20]','delete','378171ZWkHCP','confirming','push','2210280suOXiK','1858220iyzSPm','7sccFFK','map','skill-','dimColor','34faeNDO','是否同时配置\x20AI\x20助手?这将:','red','projectRoot','11VOEFXT','trae','cyan','white','windsurf','[Y]\x20是,配置\x20AI\x20助手','771844usbkJr','cursor','downArrow','column','mcp-','upArrow','success','5388oMFAzL','blue','60mbUuBA','[N]\x20跳过,稍后手动配置','has','installing','255568WTBoKW','qoder','green','name','opencode','8114gjEKDC','message','done','正在配置\x20AI\x20助手...','return','agent','codex','yellow','Claude\x20Code','add'];a3_0x4727=function(){return _0x29fc38;};return a3_0x4727();}export function AISetupUI({config:_0x249a55,onComplete:_0x1f6bae}){const _0x40c827=a3_0x5bec4f,{exit:_0x351698}=useApp(),[_0x297fca,_0x40200e]=useState(_0x40c827(0x136)),[_0x51f418,_0x5961a9]=useState(0x0),[_0x2d8cef,_0x595675]=useState(new Set([0x0,0x1])),[_0x4b426a,_0x2fd318]=useState(new Set(SKILL_IDE_LIST['map']((_0x3901e8,_0x499203)=>_0x499203))),[_0x4c7ce7,_0x4e42de]=useState('');useEffect(()=>{!_0x249a55['appcode']&&_0x1f6bae({'mcpResults':[],'skillResults':[]});},[_0x249a55['appcode'],_0x1f6bae]),useInput((_0x396893,_0x432ea9)=>{const _0x147d13=_0x40c827;if(_0x297fca===_0x147d13(0x136)){if(_0x396893==='y'||_0x396893==='Y'||_0x432ea9[_0x147d13(0x15e)]){_0x30eee5();return;}if(_0x396893==='n'||_0x396893==='N'){_0x1f6bae({'mcpResults':[],'skillResults':[]});return;}if(_0x432ea9['return']){_0x30eee5();return;}}if(_0x297fca==='selecting'){if(_0x432ea9[_0x147d13(0x14d)]){_0x5961a9(_0x1ee386=>_0x1ee386>0x0?_0x1ee386-0x1:SKILL_IDE_LIST['length']-0x1);return;}if(_0x432ea9[_0x147d13(0x14a)]){_0x5961a9(_0x1ad77f=>_0x1ad77f<SKILL_IDE_LIST[_0x147d13(0x132)]-0x1?_0x1ad77f+0x1:0x0);return;}if(_0x396893==='\x20'){const _0x2116f9=_0x51f418<MCP_IDE_LIST[_0x147d13(0x132)];if(_0x2116f9){const _0x16d716=new Set(_0x2d8cef);_0x16d716[_0x147d13(0x153)](_0x51f418)?_0x16d716[_0x147d13(0x134)](_0x51f418):_0x16d716[_0x147d13(0x163)](_0x51f418),_0x595675(_0x16d716);}else{const _0x7c4d7f=_0x51f418-MCP_IDE_LIST['length'],_0x282b45=new Set(_0x4b426a);_0x282b45[_0x147d13(0x153)](_0x7c4d7f)?_0x282b45['delete'](_0x7c4d7f):_0x282b45[_0x147d13(0x163)](_0x7c4d7f),_0x2fd318(_0x282b45);}return;}if(_0x396893==='a'||_0x396893==='A'){_0x595675(new Set(MCP_IDE_LIST['map']((_0x3d8ea9,_0x433b44)=>_0x433b44))),_0x2fd318(new Set(SKILL_IDE_LIST['map']((_0x47ffb3,_0xc88634)=>_0xc88634)));return;}if(_0x396893==='q'||_0x396893==='Q'){_0x351698();return;}if(_0x432ea9[_0x147d13(0x15e)]){if(_0x2d8cef['size']===0x0&&_0x4b426a['size']===0x0){_0x4e42de(_0x147d13(0x131));return;}_0x30eee5();return;}}if(_0x297fca===_0x147d13(0x15c)){_0x351698();return;}});async function _0x30eee5(){const _0x11fea7=_0x40c827;_0x40200e(_0x11fea7(0x154));const _0x49ccdc=[],_0x4fa30=[];for(const _0x2f9e2b of _0x2d8cef){const _0x52cced=MCP_IDE_LIST[_0x2f9e2b];if(!_0x52cced)continue;try{const _0x5a57c9=await configureMcp(_0x52cced,_0x249a55[_0x11fea7(0x141)]);_0x49ccdc[_0x11fea7(0x137)](_0x5a57c9);}catch(_0x33bcf5){_0x49ccdc[_0x11fea7(0x137)]({'ide':MCP_IDE_CONFIGS[_0x52cced]?.[_0x11fea7(0x158)]||_0x52cced,'status':_0x11fea7(0x12f),'message':_0x33bcf5 instanceof Error?_0x33bcf5[_0x11fea7(0x15b)]:String(_0x33bcf5)});}}await copySharedSkills(_0x249a55[_0x11fea7(0x141)]);for(const _0x59a9ac of _0x4b426a){const _0x438c89=SKILL_IDE_LIST[_0x59a9ac];if(!_0x438c89)continue;try{const _0x1a3ae5=await installSkill(_0x438c89,_0x249a55['projectRoot']);_0x4fa30[_0x11fea7(0x137)](_0x1a3ae5);}catch(_0x570884){_0x4fa30[_0x11fea7(0x137)]({'ide':SKILL_IDE_CONFIGS[_0x438c89]?.['name']||_0x438c89,'status':'error','message':_0x570884 instanceof Error?_0x570884[_0x11fea7(0x15b)]:String(_0x570884)});}}if(_0x4fa30[_0x11fea7(0x132)]>0x0){const _0x1b7de2=_0x4fa30[_0x11fea7(0x12e)](_0x1c1190=>_0x1c1190['status']===_0x11fea7(0x14e))[_0x11fea7(0x13b)](_0x2c22ca=>_0x2c22ca['ide']);_0x1b7de2[_0x11fea7(0x132)]>0x0&&createSkillManifest(_0x249a55['projectRoot'],_0x1b7de2);}_0x40200e('done'),setTimeout(()=>{_0x1f6bae({'mcpResults':_0x49ccdc,'skillResults':_0x4fa30});},0xbb8);}if(_0x297fca===_0x40c827(0x136))return a3_0x94290f(Box,{'flexDirection':_0x40c827(0x14b),'marginTop':0x1,'children':[a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'color':_0x40c827(0x161),'bold':!![],'children':'⭐\x20配置\x20AI\x20助手\x20(研发效率提升\x2010x)'})}),a3_0x48ad42(Box,{'marginTop':0x1,'children':a3_0x48ad42(Text,{'color':_0x40c827(0x145),'children':_0x40c827(0x13f)})}),a3_0x48ad42(Box,{'marginLeft':0x2,'marginTop':0x1,'children':a3_0x48ad42(Text,{'color':_0x40c827(0x130),'children':'•\x20MCP:\x20让\x20AI\x20直接访问\x20Lovrabet\x20数据集'})}),a3_0x48ad42(Box,{'marginLeft':0x2,'children':a3_0x48ad42(Text,{'color':_0x40c827(0x130),'children':_0x40c827(0x165)})}),a3_0x94290f(Box,{'marginTop':0x1,'flexDirection':_0x40c827(0x14b),'children':[a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'color':_0x40c827(0x157),'children':_0x40c827(0x147)})}),a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'color':'gray','children':_0x40c827(0x152)})}),a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'color':_0x40c827(0x13d),'children':'Enter\x20默认:\x20是'})})]}),_0x4c7ce7&&a3_0x48ad42(Box,{'marginTop':0x1,'children':a3_0x94290f(Text,{'color':_0x40c827(0x140),'children':['✗\x20',_0x4c7ce7]})})]});if(_0x297fca===_0x40c827(0x12d))return a3_0x94290f(Box,{'flexDirection':_0x40c827(0x14b),'marginTop':0x1,'children':[a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'color':_0x40c827(0x144),'bold':!![],'children':_0x40c827(0x128)})}),_0x4c7ce7&&a3_0x48ad42(Box,{'marginTop':0x1,'children':a3_0x94290f(Text,{'color':_0x40c827(0x140),'children':['✗\x20',_0x4c7ce7]})}),a3_0x94290f(Box,{'marginTop':0x1,'flexDirection':'column','children':[a3_0x48ad42(Text,{'bold':!![],'color':_0x40c827(0x161),'children':'MCP\x20服务器\x20(AI\x20访问数据集)'}),MCP_IDE_LIST[_0x40c827(0x13b)]((_0x1b7b81,_0x443e20)=>{const _0xc2e082=_0x40c827,_0x9f2246=_0x51f418===_0x443e20,_0x3b3692=_0x2d8cef[_0xc2e082(0x153)](_0x443e20);return a3_0x48ad42(Box,{'children':a3_0x94290f(Text,{'backgroundColor':_0x9f2246?'blue':undefined,'color':_0x9f2246?_0xc2e082(0x145):undefined,'children':[_0x3b3692?_0xc2e082(0x129):_0xc2e082(0x133),'\x20',_0x1b7b81===_0xc2e082(0x149)?'Cursor':_0xc2e082(0x162)]})},_0xc2e082(0x14c)+_0x1b7b81);}),a3_0x48ad42(Box,{'marginTop':0x1,'children':a3_0x48ad42(Text,{'bold':!![],'color':_0x40c827(0x161),'children':'技能包\x20(研发规范指南)'})}),SKILL_IDE_LIST[_0x40c827(0x13b)]((_0x5e9f52,_0x52111f)=>{const _0xc983f6=_0x40c827,_0x1da512=_0x52111f+MCP_IDE_LIST[_0xc983f6(0x132)],_0x1ade5a=_0x51f418===_0x1da512,_0x365854=_0x4b426a[_0xc983f6(0x153)](_0x1da512);return a3_0x48ad42(Box,{'children':a3_0x94290f(Text,{'backgroundColor':_0x1ade5a?_0xc983f6(0x150):undefined,'color':_0x1ade5a?_0xc983f6(0x145):undefined,'children':[_0x365854?'[✓]':_0xc983f6(0x133),'\x20',SKILL_IDE_CONFIGS[_0x5e9f52][_0xc983f6(0x158)]]})},_0xc983f6(0x13c)+_0x5e9f52);}),a3_0x48ad42(Box,{'marginTop':0x1,'children':a3_0x48ad42(Text,{'color':_0x40c827(0x130),'children':'↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20q:\x20退出\x20Enter:\x20确认'})})]})]});if(_0x297fca===_0x40c827(0x154))return a3_0x48ad42(Box,{'flexDirection':'column','marginTop':0x1,'children':a3_0x48ad42(Box,{'children':a3_0x48ad42(Text,{'children':_0x40c827(0x15d)})})});if(_0x297fca==='done')return null;return null;}const MCP_IDE_CONFIGS={'cursor':{'name':'Cursor'},'claude':{'name':a3_0x5bec4f(0x162)}};
@@ -0,0 +1 @@
1
+ const a4_0x4303ac=a4_0xc875;(function(_0x31c63a,_0x5462b1){const _0x312de9=a4_0xc875,_0x17a416=_0x31c63a();while(!![]){try{const _0x566595=-parseInt(_0x312de9(0x1a4))/0x1*(-parseInt(_0x312de9(0x1e7))/0x2)+parseInt(_0x312de9(0x1be))/0x3*(parseInt(_0x312de9(0x1ce))/0x4)+-parseInt(_0x312de9(0x1c3))/0x5+parseInt(_0x312de9(0x1c9))/0x6+parseInt(_0x312de9(0x1aa))/0x7*(parseInt(_0x312de9(0x19f))/0x8)+-parseInt(_0x312de9(0x1ad))/0x9*(parseInt(_0x312de9(0x1d5))/0xa)+-parseInt(_0x312de9(0x1ea))/0xb;if(_0x566595===_0x5462b1)break;else _0x17a416['push'](_0x17a416['shift']());}catch(_0x3603b0){_0x17a416['push'](_0x17a416['shift']());}}}(a4_0x4381,0x6317e));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';function a4_0x4381(){const _0xd7f912=['.lovrabet','info','189oZLvuV','\x20\x20\x20\x20\x20\x20\x20\x20\x22LOVRABET_ENV\x22:\x20\x22','.trae','manual','Cursor','.lovrabet/skill/.shared','Qoder\x20IDE','已写入\x20.cursor/mcp.json','parse','配置信息:','\x20个目录','\x0a📋\x20其他\x20IDE\x20MCP\x20配置:\x0a','CodeBuddy','log','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','isDirectory','OpenCode\x20IDE','2422713rIGmSw','message','共享技能文件复制成功','通用模板','\x20技能包安装成功','3043160ahGNpK','.qoder','npx','Cursor\x20MCP\x20配置失败','env','共享技能文件复制失败','193032RkqJFi','\x20\x20重启\x20Claude\x20Code\x20后生效\x0a','node:fs','toISOString','其他\x20IDE\x20配置指引已显示','4KWgXce','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','Cursor\x20MCP\x20配置成功','\x22:\x20{','复制\x20agents.md\x20文件失败','\x20\x20}','success','19770UybHip','\x20\x20\x20\x20}','agents.md','utf-8','Windsurf\x20IDE','join','\x20\x20\x20\x20\x22','cwd','创建\x20Cursor\x20Rules\x20文件','\x20\x20\x20\x20\x20\x20}','.lovrabet/skill-manifest.json','Windsurf','error','.shared','online','claude\x20mcp\x20add\x20','app','claude','1049366YrMufs','CodeBuddy\x20IDE','Antigravity\x20IDE','9154013cVBRaX','\x20\x20环境:\x20','\x20技能包安装失败','.claude','\x20\x20AppCode:\x20','.cursor','@lovrabet/dataset-mcp-server@latest','Trae','warn','mcp-install','\x20-e\x20LOVRABET_APP_CODE=','\x0a📋\x20请执行以下命令配置\x20Claude\x20Code\x20MCP:\x0a','\x20-e\x20LOVRABET_ENV=','\x20\x20\x20\x20\x20\x20\x20\x20\x22LOVRABET_APP_CODE\x22:\x20\x22','需要先配置\x20appcode','复制\x20Cursor\x20Rules\x20文件失败','.agent','../../templates/rules/lovrabet_rules.mdc.tpl','skill-install','Antigravity','.codebuddy','Cursor\x20IDE','appcode','lovrabet-dataset','name','16HbsmwY','LOVRABET_ENV','.codex','../../templates/skills','mcpServers','1cdVPUg','模板不存在:\x20','.windsurf','创建\x20agents.md\x20文件','Claude\x20Code','请手动执行:\x20','1833272bOCuCe'];a4_0x4381=function(){return _0xd7f912;};return a4_0x4381();}import{logger}from'../utils/logger.js';function a4_0xc875(_0x11eab6,_0x15c10){_0x11eab6=_0x11eab6-0x19c;const _0x4381e5=a4_0x4381();let _0xc875cc=_0x4381e5[_0x11eab6];return _0xc875cc;}const __dirname=dirname(fileURLToPath(import.meta.url)),MCP_SERVER_NAME=a4_0x4303ac(0x19d),MCP_COMMAND=a4_0x4303ac(0x1c5),MCP_ARGS=[a4_0x4303ac(0x1f0)];export function buildEnvConfig(_0x269461,_0x4eb997){const _0x3e7b26=a4_0x4303ac,_0x28d778={'LOVRABET_APP_CODE':String(_0x269461)};return _0x4eb997!=='online'&&(_0x28d778[_0x3e7b26(0x1a0)]=String(_0x4eb997)),_0x28d778;}export async function configureCursorMcp(_0x1f9372){const _0x4e1265=a4_0x4303ac,_0x18450c=_0x1f9372||process[_0x4e1265(0x1dc)](),_0x1bd6b8=readConfig(_0x18450c),_0x1f26d2=_0x1bd6b8['appcode']||_0x1bd6b8[_0x4e1265(0x1e5)],_0x53cd31=_0x1bd6b8[_0x4e1265(0x1c7)]||'online';if(!_0x1f26d2)return{'ide':'Cursor','status':_0x4e1265(0x1e1),'message':_0x4e1265(0x1f8)};const _0x375c6f=buildEnvConfig(_0x1f26d2,_0x53cd31),_0x43174f={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0x375c6f},_0x3af689=join(_0x18450c,'.cursor','mcp.json'),_0x4b8b4f=join(_0x18450c,_0x4e1265(0x1ef));try{!existsSync(_0x4b8b4f)&&mkdirSync(_0x4b8b4f,{'recursive':!![]});let _0x1b9f59={'mcpServers':{}};if(existsSync(_0x3af689)){const _0x2561dd=readFileSync(_0x3af689,_0x4e1265(0x1d8));_0x1b9f59=JSON[_0x4e1265(0x1b5)](_0x2561dd);}return(!_0x1b9f59[_0x4e1265(0x1a3)]||typeof _0x1b9f59[_0x4e1265(0x1a3)]!=='object')&&(_0x1b9f59[_0x4e1265(0x1a3)]={}),_0x1b9f59[_0x4e1265(0x1a3)][MCP_SERVER_NAME]=_0x43174f,writeFileSync(_0x3af689,JSON['stringify'](_0x1b9f59,null,0x2),_0x4e1265(0x1d8)),logger[_0x4e1265(0x1ac)](_0x4e1265(0x1f3),_0x4e1265(0x1d0),{'appcode':_0x1f26d2,'env':_0x53cd31,'path':_0x3af689}),await copyCursorRules(_0x4b8b4f),{'ide':'Cursor','status':_0x4e1265(0x1d4),'message':_0x4e1265(0x1b4)};}catch(_0x290088){return logger[_0x4e1265(0x1e1)](_0x4e1265(0x1f3),_0x4e1265(0x1c6),{'error':_0x290088 instanceof Error?_0x290088[_0x4e1265(0x1bf)]:String(_0x290088)}),{'ide':_0x4e1265(0x1b1),'status':_0x4e1265(0x1e1),'message':_0x290088 instanceof Error?_0x290088[_0x4e1265(0x1bf)]:String(_0x290088)};}}export async function configureClaudeMcp(_0x1b60ec){const _0xa8f949=a4_0x4303ac,_0x5ec802=_0x1b60ec||process['cwd'](),_0x3394ce=readConfig(_0x5ec802),_0x287154=_0x3394ce[_0xa8f949(0x19c)]||_0x3394ce['app'],_0x385c40=_0x3394ce[_0xa8f949(0x1c7)]||_0xa8f949(0x1e3);if(!_0x287154)return{'ide':_0xa8f949(0x1a8),'status':'error','message':'需要先配置\x20appcode'};let _0x47ec19=_0xa8f949(0x1e4)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0xa8f949(0x1da)]('\x20')+_0xa8f949(0x1f4)+_0x287154;return _0x385c40!==_0xa8f949(0x1e3)&&(_0x47ec19+=_0xa8f949(0x1f6)+_0x385c40),await copyAgentsMd(_0x5ec802),logger['info'](_0xa8f949(0x1f3),'Claude\x20Code\x20MCP\x20命令已生成',{'command':_0x47ec19,'appcode':_0x287154,'env':_0x385c40}),console[_0xa8f949(0x1ba)](_0xa8f949(0x1f5)),console['log']('\x20\x20'+_0x47ec19+'\x0a'),console[_0xa8f949(0x1ba)](_0xa8f949(0x1b6)),console['log'](_0xa8f949(0x1ee)+_0x287154),_0x385c40!==_0xa8f949(0x1e3)&&console[_0xa8f949(0x1ba)](_0xa8f949(0x1eb)+_0x385c40),console['log'](_0xa8f949(0x1ca)),{'ide':_0xa8f949(0x1a8),'status':_0xa8f949(0x1b0),'message':_0xa8f949(0x1a9)+_0x47ec19};}export async function showOtherGuide(_0x5d55cc){const _0x513b2a=a4_0x4303ac,_0x250977=_0x5d55cc||process['cwd'](),_0x22f318=readConfig(_0x250977),_0x23fd32=_0x22f318[_0x513b2a(0x19c)]||_0x22f318[_0x513b2a(0x1e5)],_0x15a353=_0x22f318[_0x513b2a(0x1c7)]||_0x513b2a(0x1e3);if(!_0x23fd32)return{'ide':'其他','status':_0x513b2a(0x1e1),'message':_0x513b2a(0x1f8)};return console[_0x513b2a(0x1ba)](_0x513b2a(0x1b8)),console[_0x513b2a(0x1ba)]('{'),console['log']('\x20\x20\x22mcpServers\x22:\x20{'),console[_0x513b2a(0x1ba)](_0x513b2a(0x1db)+MCP_SERVER_NAME+_0x513b2a(0x1d1)),console[_0x513b2a(0x1ba)]('\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22'+MCP_COMMAND+'\x22,'),console[_0x513b2a(0x1ba)](_0x513b2a(0x1cf)+MCP_ARGS['map'](_0x3d2c25=>'\x22'+_0x3d2c25+'\x22')[_0x513b2a(0x1da)](',\x20')+'],'),console[_0x513b2a(0x1ba)](_0x513b2a(0x1bb)),console[_0x513b2a(0x1ba)](_0x513b2a(0x1f7)+_0x23fd32+'\x22,'),_0x15a353!==_0x513b2a(0x1e3)&&console['log'](_0x513b2a(0x1ae)+_0x15a353+'\x22,'),console['log'](_0x513b2a(0x1de)),console['log'](_0x513b2a(0x1d6)),console['log'](_0x513b2a(0x1d3)),console[_0x513b2a(0x1ba)]('}\x0a'),logger[_0x513b2a(0x1ac)]('mcp-install',_0x513b2a(0x1cd),{'appcode':_0x23fd32,'env':_0x15a353}),{'ide':'其他','status':'manual','message':'配置指引已显示'};}export async function configureMcp(_0x243d60,_0x57ad06){const _0x150bd9=a4_0x4303ac;switch(_0x243d60){case'cursor':return await configureCursorMcp(_0x57ad06);case _0x150bd9(0x1e6):return await configureClaudeMcp(_0x57ad06);default:throw new Error('不支持的\x20MCP\x20IDE:\x20'+_0x243d60);}}async function copyCursorRules(_0x175698){const _0x4d605c=a4_0x4303ac,_0x1f4a47=join(_0x175698,'rules'),_0x195532=join(_0x1f4a47,'lovrabet_rules.mdc');if(existsSync(_0x195532))return;try{!existsSync(_0x1f4a47)&&mkdirSync(_0x1f4a47,{'recursive':!![]});const _0xd32afe=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');existsSync(_0xd32afe)&&(copyFileSync(_0xd32afe,_0x195532),logger[_0x4d605c(0x1ac)](_0x4d605c(0x1f3),_0x4d605c(0x1dd),{'from':_0xd32afe,'to':_0x195532}));}catch(_0x4871fa){logger[_0x4d605c(0x1e1)]('mcp-install',_0x4d605c(0x1f9),{'error':_0x4871fa instanceof Error?_0x4871fa[_0x4d605c(0x1bf)]:String(_0x4871fa)});}}async function copyAgentsMd(_0x64297c){const _0x2a7c3f=a4_0x4303ac,_0x5398a5=join(_0x64297c,_0x2a7c3f(0x1d7));if(existsSync(_0x5398a5))return;try{const _0x14bd39=resolve(__dirname,_0x2a7c3f(0x1fb));if(existsSync(_0x14bd39)){const _0x39ef73=readFileSync(_0x14bd39,_0x2a7c3f(0x1d8));writeFileSync(_0x5398a5,_0x39ef73,_0x2a7c3f(0x1d8)),logger[_0x2a7c3f(0x1ac)](_0x2a7c3f(0x1f3),_0x2a7c3f(0x1a7),{'from':_0x14bd39,'to':_0x5398a5});}}catch(_0x1cbac3){logger[_0x2a7c3f(0x1e1)](_0x2a7c3f(0x1f3),_0x2a7c3f(0x1d2),{'error':_0x1cbac3 instanceof Error?_0x1cbac3[_0x2a7c3f(0x1bf)]:String(_0x1cbac3)});}}export const SKILL_IDE_CONFIGS={'cursor':{'name':a4_0x4303ac(0x1b1),'description':a4_0x4303ac(0x1ff),'folders':['.cursorrules',a4_0x4303ac(0x1ef)]},'windsurf':{'name':a4_0x4303ac(0x1e0),'description':a4_0x4303ac(0x1d9),'folders':[a4_0x4303ac(0x1a6)]},'claude':{'name':'Claude\x20Code','description':a4_0x4303ac(0x1a8),'folders':[a4_0x4303ac(0x1ed)]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':[a4_0x4303ac(0x1a1)]},'opencode':{'name':'OpenCode','description':a4_0x4303ac(0x1bd),'folders':['.opencode']},'qoder':{'name':'Qoder','description':a4_0x4303ac(0x1b3),'folders':[a4_0x4303ac(0x1c4)]},'codebuddy':{'name':a4_0x4303ac(0x1b9),'description':a4_0x4303ac(0x1e8),'folders':[a4_0x4303ac(0x1fe)]},'trae':{'name':a4_0x4303ac(0x1f1),'description':'Trae\x20IDE','folders':[a4_0x4303ac(0x1af)]},'antigravity':{'name':a4_0x4303ac(0x1fd),'description':a4_0x4303ac(0x1e9),'folders':[a4_0x4303ac(0x1fa)]},'agent':{'name':a4_0x4303ac(0x1c1),'description':'其他\x20IDE','folders':[a4_0x4303ac(0x1fa)]}};async function copyDir(_0x30502a,_0x46c22f){const _0x278d12=a4_0x4303ac,{statSync:_0x96f28f}=await import(_0x278d12(0x1cb)),{readdirSync:_0x369762}=await import(_0x278d12(0x1cb)),_0x5546cd=_0x96f28f(_0x30502a);if(_0x5546cd[_0x278d12(0x1bc)]()){!existsSync(_0x46c22f)&&mkdirSync(_0x46c22f,{'recursive':!![]});const _0x51b1da=_0x369762(_0x30502a);for(const _0x1e7175 of _0x51b1da){await copyDir(join(_0x30502a,_0x1e7175),join(_0x46c22f,_0x1e7175));}}else copyFileSync(_0x30502a,_0x46c22f);}export async function installSkill(_0x257b8c,_0x471b34){const _0x7043aa=a4_0x4303ac,_0x5ca94c=_0x471b34||process[_0x7043aa(0x1dc)](),_0x26e792=resolve(__dirname,_0x7043aa(0x1a2)),_0x44b659=_0x257b8c==='agent',_0x55b9d6=SKILL_IDE_CONFIGS[_0x257b8c],_0xc8073=_0x44b659?_0x7043aa(0x1c1):_0x55b9d6[_0x7043aa(0x19e)];try{let _0x2384c5=0x0;const _0x16a0bf=_0x44b659?['.agent']:_0x55b9d6['folders'];for(const _0x5cfbab of _0x16a0bf){const _0xb1ed06=join(_0x26e792,_0x5cfbab),_0x6fbbf6=join(_0x5ca94c,_0x5cfbab);if(!existsSync(_0xb1ed06)){logger[_0x7043aa(0x1f2)](_0x7043aa(0x1fc),_0x7043aa(0x1a5)+_0xb1ed06);continue;}await copyDir(_0xb1ed06,_0x6fbbf6),_0x2384c5++;}return logger[_0x7043aa(0x1ac)](_0x7043aa(0x1fc),_0xc8073+_0x7043aa(0x1c2),{'ide':_0x257b8c,'foldersCount':_0x2384c5}),{'ide':_0xc8073,'status':_0x7043aa(0x1d4),'message':'已复制\x20'+_0x2384c5+_0x7043aa(0x1b7)};}catch(_0x5667d1){return logger['error'](_0x7043aa(0x1fc),_0xc8073+_0x7043aa(0x1ec),{'error':_0x5667d1 instanceof Error?_0x5667d1[_0x7043aa(0x1bf)]:String(_0x5667d1)}),{'ide':_0xc8073,'status':_0x7043aa(0x1e1),'message':_0x5667d1 instanceof Error?_0x5667d1[_0x7043aa(0x1bf)]:String(_0x5667d1)};}}export async function copySharedSkills(_0x499232){const _0x11d754=a4_0x4303ac,_0x383ecc=_0x499232||process[_0x11d754(0x1dc)](),_0x5d2c9c=resolve(__dirname,'../../templates/skills'),_0x2aa56e=join(_0x5d2c9c,_0x11d754(0x1e2)),_0x59b3=join(_0x383ecc,_0x11d754(0x1b2));if(!existsSync(_0x2aa56e))return![];try{return await copyDir(_0x2aa56e,_0x59b3),logger[_0x11d754(0x1ac)](_0x11d754(0x1fc),_0x11d754(0x1c0),{'path':_0x59b3}),!![];}catch(_0x5cf568){return logger[_0x11d754(0x1e1)](_0x11d754(0x1fc),_0x11d754(0x1c8),{'error':_0x5cf568 instanceof Error?_0x5cf568[_0x11d754(0x1bf)]:String(_0x5cf568)}),![];}}export function createSkillManifest(_0x3a0d88,_0x490392){const _0x33153c=a4_0x4303ac,_0x42badc={'version':'2.0.0','installedAt':new Date()[_0x33153c(0x1cc)](),'platforms':_0x490392},_0x20e62a=join(_0x3a0d88,_0x33153c(0x1df)),_0x4b18c8=join(_0x3a0d88,_0x33153c(0x1ab));!existsSync(_0x4b18c8)&&mkdirSync(_0x4b18c8,{'recursive':!![]}),writeFileSync(_0x20e62a,JSON['stringify'](_0x42badc,null,0x2),_0x33153c(0x1d8)),logger[_0x33153c(0x1ac)](_0x33153c(0x1fc),'创建技能包\x20manifest',{'path':_0x20e62a});}
@@ -1 +1 @@
1
- (function(_0x42e70e,_0x2be4c4){const _0x168c7a=a3_0x171a,_0x58d780=_0x42e70e();while(!![]){try{const _0x5a7f77=-parseInt(_0x168c7a(0x196))/0x1+-parseInt(_0x168c7a(0x173))/0x2+parseInt(_0x168c7a(0x17d))/0x3*(-parseInt(_0x168c7a(0x171))/0x4)+-parseInt(_0x168c7a(0x19f))/0x5+parseInt(_0x168c7a(0x19c))/0x6+parseInt(_0x168c7a(0x185))/0x7+-parseInt(_0x168c7a(0x179))/0x8*(-parseInt(_0x168c7a(0x193))/0x9);if(_0x5a7f77===_0x2be4c4)break;else _0x58d780['push'](_0x58d780['shift']());}catch(_0x100edf){_0x58d780['push'](_0x58d780['shift']());}}}(a3_0x54f1,0x38047));import{jsx as a3_0x2a91e0,jsxs as a3_0x519f87,Fragment as a3_0x3953d7}from'react/jsx-runtime';function a3_0x171a(_0x248fd9,_0xf2e27f){_0x248fd9=_0x248fd9-0x171;const _0x54f18b=a3_0x54f1();let _0x171a4e=_0x54f18b[_0x248fd9];return _0x171a4e;}import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{readConfig,getConfigAppCode}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{fetchModelList}from'./fetch-model-list.js';function a3_0x54f1(){const _0x3a6f93=['指定的数据集代码都不存在:\x20','\x20(环境:\x20','*\x20共处理\x20','4SGCTIl','success','168358GCrYLL','log','\x20个数据集中筛选出\x20','.md\x20(','🚀\x20','⚠️\x20以下数据集生成失败:','662944AscqaF','dim',',\x20失败\x20','\x1b[0m','1128417AWWwkJ','\x20-\x20','env','yellow','未提供应用AppCode,且配置中也没有默认值','gray','文档生成完成','cyan','1919106JIMfYk','message','lovrabet\x20auth','filePath','💡\x20请使用\x20','\x20个匹配的数据集\x1b[0m','正在生成\x20','filter','√\x20文档生成完成!成功\x20','length','white','map','datasetCode','api-doc','99WDQjXO','文档生成失败:\x20','includes','421394QtgXtU','column','cwd','join','\x1b[90m*\x20从\x20','*\x20输出目录:\x20','1871814fISwnD','正在获取数据集列表...','error','1932580gmUeyF','datasetName','\x20个数据集的文档...','\x1b[33m!\x20以下数据集代码不存在:\x20'];a3_0x54f1=function(){return _0x3a6f93;};return a3_0x54f1();}import{generateDatasetDocs}from'./api-doc.js';import{logger}from'../utils/logger.js';export const ApiDocUI=({appCode:_0xc84dd4,env:_0x2ae091,output:_0xbd65d4,extraParams:_0x4ffb40,datasetCodes:_0x438954})=>{const _0x12dcc9=a3_0x171a,{exit:_0x37aba9}=useApp(),[_0x50cedf,_0x482919]=useState(![]),[_0x4323dd,_0x290835]=useState(''),[_0x3778a8,_0x46e188]=useState(![]),[_0x353ef4,_0x431ac9]=useState(null),[_0x5ce734,_0x16914c]=useState(null),[_0x2cc6c4,_0x416ef2]=useState(0x0),_0x5f1dd1=readConfig(),_0x4eded3=getConfigAppCode(),_0x48e191=_0xc84dd4||_0x4eded3,_0x21891b=typeof _0x5f1dd1?.[_0x12dcc9(0x17f)]==='string'?_0x5f1dd1['env']:undefined,_0xd82cb7=_0x2ae091||_0x21891b||'online';initEnv(_0xd82cb7);const _0x3a484c=_0xbd65d4||'./docs',_0x28dea2=_0xc84dd4?'使用指定的应用AppCode:\x20'+_0x48e191:'使用配置的应用AppCode:\x20'+_0x48e191;useEffect(()=>{_0x482919(!![]),_0x5ae5e0();},[]),useEffect(()=>{(_0x3778a8||_0x353ef4)&&_0x37aba9();},[_0x3778a8,_0x353ef4,_0x37aba9]);async function _0x5ae5e0(){const _0x1b9437=_0x12dcc9;if(!_0x48e191){_0x431ac9(_0x1b9437(0x181));return;}try{logger['setLogPath'](process[_0x1b9437(0x198)]()),_0x290835(_0x1b9437(0x19d));const {configArray:_0x101f41}=await fetchModelList(_0x48e191);_0x416ef2(_0x101f41[_0x1b9437(0x18e)]);if(_0x101f41['length']===0x0){_0x431ac9('未找到任何数据集');return;}let _0xa69a70=_0x101f41;if(_0x438954&&_0x438954['length']>0x0){_0xa69a70=_0x101f41[_0x1b9437(0x18c)](_0x5d6326=>_0x438954[_0x1b9437(0x195)](_0x5d6326['datasetCode']));const _0x313d47=_0xa69a70[_0x1b9437(0x190)](_0x14e632=>_0x14e632[_0x1b9437(0x191)]),_0x5d34ae=_0x438954[_0x1b9437(0x18c)](_0x3d60fa=>!_0x313d47[_0x1b9437(0x195)](_0x3d60fa));_0x5d34ae[_0x1b9437(0x18e)]>0x0&&console['log'](_0x1b9437(0x1a2)+_0x5d34ae[_0x1b9437(0x199)](',\x20')+_0x1b9437(0x17c));if(_0xa69a70['length']===0x0){_0x431ac9(_0x1b9437(0x1a3)+_0x438954[_0x1b9437(0x199)](',\x20'));return;}console[_0x1b9437(0x174)](_0x1b9437(0x19a)+_0x101f41[_0x1b9437(0x18e)]+_0x1b9437(0x175)+_0xa69a70[_0x1b9437(0x18e)]+_0x1b9437(0x18a));}_0x290835(_0x1b9437(0x18b)+_0xa69a70[_0x1b9437(0x18e)]+_0x1b9437(0x1a1));const _0x5c0686=await generateDatasetDocs(_0xa69a70,_0x48e191,_0x3a484c,(_0x5c30a2,_0x3a36e1,_0x310066)=>{const _0x31e4ce=_0x1b9437;_0x290835(_0x31e4ce(0x18b)+_0x310066+_0x31e4ce(0x176)+_0x5c30a2+'/'+_0x3a36e1+')');},_0x4ffb40);_0x16914c(_0x5c0686),_0x46e188(!![]);const _0x4c5b2a=_0x5c0686[_0x1b9437(0x18c)](_0x4fbb20=>_0x4fbb20['success'])['length'],_0x18344b=_0x5c0686[_0x1b9437(0x18c)](_0x17f391=>!_0x17f391['success'])[_0x1b9437(0x18e)];logger[_0x1b9437(0x172)]('api-doc',_0x1b9437(0x183),undefined,{'totalCount':_0x5c0686[_0x1b9437(0x18e)],'successCount':_0x4c5b2a,'failCount':_0x18344b,'outputDir':_0x3a484c});}catch(_0x52bb83){const _0x1ecbe7=_0x52bb83 instanceof Error?_0x52bb83[_0x1b9437(0x186)]:String(_0x52bb83);logger[_0x1b9437(0x19e)](_0x1b9437(0x192),'文档生成失败:\x20'+_0x1ecbe7,{'appCode':_0x48e191,'outputDir':_0x3a484c}),_0x431ac9(_0x1b9437(0x194)+_0x1ecbe7);}finally{_0x482919(![]);}}const _0x532e37=_0x5ce734?.[_0x12dcc9(0x18c)](_0x29c7b2=>_0x29c7b2['success'])[_0x12dcc9(0x18e)]||0x0,_0x33f4b6=_0x5ce734?.[_0x12dcc9(0x18c)](_0x46049b=>!_0x46049b[_0x12dcc9(0x172)])[_0x12dcc9(0x18e)]||0x0;return a3_0x519f87(Box,{'flexDirection':_0x12dcc9(0x197),'children':[(_0x50cedf||_0x3778a8)&&a3_0x519f87(Box,{'children':[a3_0x2a91e0(Text,{'color':'gray','children':'*\x20'}),a3_0x2a91e0(Text,{'color':_0xc84dd4?_0x12dcc9(0x18f):_0x12dcc9(0x17a),'children':_0x28dea2})]}),_0x50cedf&&a3_0x2a91e0(Box,{'children':a3_0x519f87(Text,{'children':[_0x12dcc9(0x177),_0x4323dd,_0x12dcc9(0x1a4),_0xd82cb7,')']})}),_0x3778a8&&_0x5ce734&&a3_0x519f87(Box,{'flexDirection':_0x12dcc9(0x197),'children':[a3_0x2a91e0(Box,{'children':a3_0x519f87(Text,{'color':'green','children':[_0x12dcc9(0x18d),_0x532e37,'\x20个',_0x33f4b6>0x0&&_0x12dcc9(0x17b)+_0x33f4b6+'\x20个']})}),a3_0x2a91e0(Box,{'marginTop':0x1,'children':a3_0x519f87(Text,{'color':_0x12dcc9(0x182),'children':[_0x12dcc9(0x1a5),_0x2cc6c4,'\x20个数据集']})}),a3_0x519f87(Box,{'marginTop':0x1,'children':[a3_0x2a91e0(Text,{'color':_0x12dcc9(0x182),'children':_0x12dcc9(0x19b)}),a3_0x2a91e0(Text,{'color':_0x12dcc9(0x184),'children':_0x3a484c})]}),_0x532e37>0x0&&a3_0x519f87(a3_0x3953d7,{'children':[a3_0x2a91e0(Box,{'marginTop':0x1,'children':a3_0x2a91e0(Text,{'color':_0x12dcc9(0x182),'children':'*\x20生成的文档文件:'})}),_0x5ce734[_0x12dcc9(0x18c)](_0x3065e4=>_0x3065e4[_0x12dcc9(0x172)])[_0x12dcc9(0x190)]((_0x5d8778,_0xc98ad2)=>a3_0x519f87(Box,{'marginLeft':0x2,'children':[a3_0x519f87(Text,{'color':_0x12dcc9(0x184),'children':['•\x20',_0x5d8778[_0x12dcc9(0x188)]]}),a3_0x519f87(Text,{'color':'dim','children':[_0x12dcc9(0x17e),_0x5d8778['datasetName']]})]},_0xc98ad2))]}),_0x33f4b6>0x0&&a3_0x519f87(a3_0x3953d7,{'children':[a3_0x2a91e0(Box,{'marginTop':0x1,'children':a3_0x2a91e0(Text,{'color':_0x12dcc9(0x180),'children':_0x12dcc9(0x178)})}),_0x5ce734[_0x12dcc9(0x18c)](_0x19e968=>!_0x19e968[_0x12dcc9(0x172)])[_0x12dcc9(0x190)]((_0x2775bb,_0x11147f)=>a3_0x519f87(Box,{'marginLeft':0x2,'flexDirection':_0x12dcc9(0x197),'children':[a3_0x519f87(Text,{'color':'red','children':['•\x20',_0x2775bb[_0x12dcc9(0x1a0)],'\x20(',_0x2775bb[_0x12dcc9(0x191)],')']}),_0x2775bb[_0x12dcc9(0x19e)]&&a3_0x2a91e0(Box,{'marginLeft':0x2,'children':a3_0x2a91e0(Text,{'color':'dim','children':_0x2775bb[_0x12dcc9(0x19e)]})})]},_0x11147f))]})]}),_0x353ef4&&a3_0x519f87(Box,{'flexDirection':_0x12dcc9(0x197),'children':[a3_0x2a91e0(Box,{'children':a3_0x519f87(Text,{'color':'red','children':['❌\x20',_0x353ef4]})}),_0x353ef4[_0x12dcc9(0x195)]('登录')&&a3_0x519f87(Box,{'marginTop':0x1,'children':[a3_0x2a91e0(Text,{'color':_0x12dcc9(0x180),'children':_0x12dcc9(0x189)}),a3_0x2a91e0(Text,{'color':'cyan','children':_0x12dcc9(0x187)}),a3_0x2a91e0(Text,{'color':_0x12dcc9(0x180),'children':'\x20重新登录后再试'})]})]})]});};
1
+ (function(_0x3a846c,_0x3f5af5){const _0x1f3856=a5_0x2301,_0x36bca3=_0x3a846c();while(!![]){try{const _0x155b6a=-parseInt(_0x1f3856(0xa8))/0x1*(parseInt(_0x1f3856(0xc5))/0x2)+parseInt(_0x1f3856(0xb6))/0x3+parseInt(_0x1f3856(0x9d))/0x4+parseInt(_0x1f3856(0xc1))/0x5+-parseInt(_0x1f3856(0xbc))/0x6+parseInt(_0x1f3856(0xc4))/0x7*(parseInt(_0x1f3856(0xb7))/0x8)+parseInt(_0x1f3856(0xaf))/0x9;if(_0x155b6a===_0x3f5af5)break;else _0x36bca3['push'](_0x36bca3['shift']());}catch(_0x3b381e){_0x36bca3['push'](_0x36bca3['shift']());}}}(a5_0x1a16,0x8c5f5));import{jsx as a5_0x3930d2,jsxs as a5_0x430be8,Fragment as a5_0x208d79}from'react/jsx-runtime';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{readConfig,getConfigAppCode}from'../utils/config.js';function a5_0x2301(_0x4a0e07,_0x446233){_0x4a0e07=_0x4a0e07-0x99;const _0x1a16bf=a5_0x1a16();let _0x230117=_0x1a16bf[_0x4a0e07];return _0x230117;}function a5_0x1a16(){const _0x58f9b0=['includes','cwd','⚠️\x20以下数据集生成失败:','lovrabet\x20auth','\x20重新登录后再试','19pjEHym','filePath','\x20个匹配的数据集\x1b[0m','\x20-\x20','yellow','\x20个数据集的文档...','red','2629656rzOADU','💡\x20请使用\x20','指定的数据集代码都不存在:\x20','\x20(环境:\x20','文档生成完成','string','log','829959NOIJOz','8xtaLhK','*\x20输出目录:\x20','./docs','join','setLogPath','6755034pezoIc','cyan','🚀\x20','filter','datasetName','261180UtZGcV','使用配置的应用AppCode:\x20','env','2198917diUMpb','31858hFKmSq','datasetCode','未找到任何数据集','map','dim','文档生成失败:\x20','使用指定的应用AppCode:\x20','正在生成\x20','success','\x20个数据集','length','√\x20文档生成完成!成功\x20','.md\x20(','message','\x1b[33m!\x20以下数据集代码不存在:\x20','*\x20共处理\x20','error','gray','column','4273004OFPvvE',',\x20失败\x20','\x1b[0m','\x20个数据集中筛选出\x20','正在获取数据集列表...','api-doc'];a5_0x1a16=function(){return _0x58f9b0;};return a5_0x1a16();}import{initEnv}from'../constant/env.js';import{fetchModelList}from'./fetch-model-list.js';import{generateDatasetDocs}from'./api-doc.js';import{logger}from'../utils/logger.js';export const ApiDocUI=({appCode:_0x5b4747,env:_0x1f578c,output:_0x15d888,extraParams:_0x126f56,datasetCodes:_0x47fb68})=>{const _0x495496=a5_0x2301,{exit:_0x23dbee}=useApp(),[_0x520849,_0x2406c6]=useState(![]),[_0x17b025,_0x2ba391]=useState(''),[_0x54e266,_0x412869]=useState(![]),[_0x5bc767,_0x5a2e16]=useState(null),[_0x290f0c,_0x3c19a5]=useState(null),[_0x45928b,_0x366381]=useState(0x0),_0x487482=readConfig(),_0x3581a3=getConfigAppCode(),_0x5b8e28=_0x5b4747||_0x3581a3,_0x1894cd=typeof _0x487482?.['env']===_0x495496(0xb4)?_0x487482[_0x495496(0xc3)]:undefined,_0x9e37a3=_0x1f578c||_0x1894cd||'online';initEnv(_0x9e37a3);const _0x39b409=_0x15d888||_0x495496(0xb9),_0x3d7b5e=_0x5b4747?_0x495496(0xcb)+_0x5b8e28:_0x495496(0xc2)+_0x5b8e28;useEffect(()=>{_0x2406c6(!![]),_0x55df39();},[]),useEffect(()=>{(_0x54e266||_0x5bc767)&&_0x23dbee();},[_0x54e266,_0x5bc767,_0x23dbee]);async function _0x55df39(){const _0x5041f2=_0x495496;if(!_0x5b8e28){_0x5a2e16('未提供应用AppCode,且配置中也没有默认值');return;}try{logger[_0x5041f2(0xbb)](process[_0x5041f2(0xa4)]()),_0x2ba391(_0x5041f2(0xa1));const {configArray:_0x39d990}=await fetchModelList(_0x5b8e28);_0x366381(_0x39d990[_0x5041f2(0xcf)]);if(_0x39d990[_0x5041f2(0xcf)]===0x0){_0x5a2e16(_0x5041f2(0xc7));return;}let _0xd1484e=_0x39d990;if(_0x47fb68&&_0x47fb68[_0x5041f2(0xcf)]>0x0){_0xd1484e=_0x39d990['filter'](_0x55d9c2=>_0x47fb68[_0x5041f2(0xa3)](_0x55d9c2['datasetCode']));const _0x5b3d0c=_0xd1484e[_0x5041f2(0xc8)](_0x5453d0=>_0x5453d0['datasetCode']),_0x1bebef=_0x47fb68[_0x5041f2(0xbf)](_0x3917e7=>!_0x5b3d0c[_0x5041f2(0xa3)](_0x3917e7));_0x1bebef['length']>0x0&&console[_0x5041f2(0xb5)](_0x5041f2(0xd3)+_0x1bebef[_0x5041f2(0xba)](',\x20')+_0x5041f2(0x9f));if(_0xd1484e[_0x5041f2(0xcf)]===0x0){_0x5a2e16(_0x5041f2(0xb1)+_0x47fb68['join'](',\x20'));return;}console[_0x5041f2(0xb5)]('\x1b[90m*\x20从\x20'+_0x39d990[_0x5041f2(0xcf)]+_0x5041f2(0xa0)+_0xd1484e[_0x5041f2(0xcf)]+_0x5041f2(0xaa));}_0x2ba391(_0x5041f2(0xcc)+_0xd1484e[_0x5041f2(0xcf)]+_0x5041f2(0xad));const _0x488c50=await generateDatasetDocs(_0xd1484e,_0x5b8e28,_0x39b409,(_0x2fc9ca,_0xb6ec95,_0x35df36)=>{const _0x13ec4c=_0x5041f2;_0x2ba391('正在生成\x20'+_0x35df36+_0x13ec4c(0xd1)+_0x2fc9ca+'/'+_0xb6ec95+')');},_0x126f56);_0x3c19a5(_0x488c50),_0x412869(!![]);const _0x48f239=_0x488c50[_0x5041f2(0xbf)](_0x2bd783=>_0x2bd783[_0x5041f2(0xcd)])['length'],_0x5c9d1d=_0x488c50['filter'](_0x19483f=>!_0x19483f['success'])[_0x5041f2(0xcf)];logger[_0x5041f2(0xcd)]('api-doc',_0x5041f2(0xb3),undefined,{'totalCount':_0x488c50[_0x5041f2(0xcf)],'successCount':_0x48f239,'failCount':_0x5c9d1d,'outputDir':_0x39b409});}catch(_0xf01b1b){const _0xecdf68=_0xf01b1b instanceof Error?_0xf01b1b[_0x5041f2(0xd2)]:String(_0xf01b1b);logger[_0x5041f2(0x9a)](_0x5041f2(0xa2),'文档生成失败:\x20'+_0xecdf68,{'appCode':_0x5b8e28,'outputDir':_0x39b409}),_0x5a2e16(_0x5041f2(0xca)+_0xecdf68);}finally{_0x2406c6(![]);}}const _0x3a32a8=_0x290f0c?.[_0x495496(0xbf)](_0x2620e6=>_0x2620e6[_0x495496(0xcd)])[_0x495496(0xcf)]||0x0,_0x4403be=_0x290f0c?.['filter'](_0x4234a0=>!_0x4234a0[_0x495496(0xcd)])[_0x495496(0xcf)]||0x0;return a5_0x430be8(Box,{'flexDirection':_0x495496(0x9c),'children':[(_0x520849||_0x54e266)&&a5_0x430be8(Box,{'children':[a5_0x3930d2(Text,{'color':'gray','children':'*\x20'}),a5_0x3930d2(Text,{'color':_0x5b4747?'white':_0x495496(0xc9),'children':_0x3d7b5e})]}),_0x520849&&a5_0x3930d2(Box,{'children':a5_0x430be8(Text,{'children':[_0x495496(0xbe),_0x17b025,_0x495496(0xb2),_0x9e37a3,')']})}),_0x54e266&&_0x290f0c&&a5_0x430be8(Box,{'flexDirection':_0x495496(0x9c),'children':[a5_0x3930d2(Box,{'children':a5_0x430be8(Text,{'color':'green','children':[_0x495496(0xd0),_0x3a32a8,'\x20个',_0x4403be>0x0&&_0x495496(0x9e)+_0x4403be+'\x20个']})}),a5_0x3930d2(Box,{'marginTop':0x1,'children':a5_0x430be8(Text,{'color':_0x495496(0x9b),'children':[_0x495496(0x99),_0x45928b,_0x495496(0xce)]})}),a5_0x430be8(Box,{'marginTop':0x1,'children':[a5_0x3930d2(Text,{'color':'gray','children':_0x495496(0xb8)}),a5_0x3930d2(Text,{'color':_0x495496(0xbd),'children':_0x39b409})]}),_0x3a32a8>0x0&&a5_0x430be8(a5_0x208d79,{'children':[a5_0x3930d2(Box,{'marginTop':0x1,'children':a5_0x3930d2(Text,{'color':_0x495496(0x9b),'children':'*\x20生成的文档文件:'})}),_0x290f0c[_0x495496(0xbf)](_0x4f489b=>_0x4f489b[_0x495496(0xcd)])['map']((_0x41ebbe,_0x5f3918)=>a5_0x430be8(Box,{'marginLeft':0x2,'children':[a5_0x430be8(Text,{'color':'cyan','children':['•\x20',_0x41ebbe[_0x495496(0xa9)]]}),a5_0x430be8(Text,{'color':_0x495496(0xc9),'children':[_0x495496(0xab),_0x41ebbe[_0x495496(0xc0)]]})]},_0x5f3918))]}),_0x4403be>0x0&&a5_0x430be8(a5_0x208d79,{'children':[a5_0x3930d2(Box,{'marginTop':0x1,'children':a5_0x3930d2(Text,{'color':'yellow','children':_0x495496(0xa5)})}),_0x290f0c[_0x495496(0xbf)](_0x8a38c6=>!_0x8a38c6[_0x495496(0xcd)])[_0x495496(0xc8)]((_0x42ec41,_0x1fbdab)=>a5_0x430be8(Box,{'marginLeft':0x2,'flexDirection':_0x495496(0x9c),'children':[a5_0x430be8(Text,{'color':_0x495496(0xae),'children':['•\x20',_0x42ec41[_0x495496(0xc0)],'\x20(',_0x42ec41[_0x495496(0xc6)],')']}),_0x42ec41['error']&&a5_0x3930d2(Box,{'marginLeft':0x2,'children':a5_0x3930d2(Text,{'color':'dim','children':_0x42ec41[_0x495496(0x9a)]})})]},_0x1fbdab))]})]}),_0x5bc767&&a5_0x430be8(Box,{'flexDirection':'column','children':[a5_0x3930d2(Box,{'children':a5_0x430be8(Text,{'color':_0x495496(0xae),'children':['❌\x20',_0x5bc767]})}),_0x5bc767[_0x495496(0xa3)]('登录')&&a5_0x430be8(Box,{'marginTop':0x1,'children':[a5_0x3930d2(Text,{'color':_0x495496(0xac),'children':_0x495496(0xb0)}),a5_0x3930d2(Text,{'color':_0x495496(0xbd),'children':_0x495496(0xa6)}),a5_0x3930d2(Text,{'color':_0x495496(0xac),'children':_0x495496(0xa7)})]})]})]});};
@@ -1 +1 @@
1
- const a4_0x54c66a=a4_0x2d6e;(function(_0x359fc8,_0x23d97d){const _0x148a19=a4_0x2d6e,_0x167c1d=_0x359fc8();while(!![]){try{const _0x1b7833=-parseInt(_0x148a19(0x125))/0x1+-parseInt(_0x148a19(0x120))/0x2+-parseInt(_0x148a19(0x118))/0x3*(parseInt(_0x148a19(0x10c))/0x4)+parseInt(_0x148a19(0x104))/0x5+parseInt(_0x148a19(0x100))/0x6*(parseInt(_0x148a19(0x10b))/0x7)+-parseInt(_0x148a19(0x119))/0x8+parseInt(_0x148a19(0x121))/0x9;if(_0x1b7833===_0x23d97d)break;else _0x167c1d['push'](_0x167c1d['shift']());}catch(_0x46cdf5){_0x167c1d['push'](_0x167c1d['shift']());}}}(a4_0x46b0,0xb7a2d));import{mkdirSync,writeFileSync}from'node:fs';import a4_0x37181c from'node:path';import{getCookie}from'../auth/get-cookie.js';function a4_0x2d6e(_0x25a3e3,_0x2c5d8a){_0x25a3e3=_0x25a3e3-0xff;const _0x46b01a=a4_0x46b0();let _0x2d6e26=_0x46b01a[_0x25a3e3];return _0x2d6e26;}import{getApiDomain}from'../constant/domain.js';function a4_0x46b0(){const _0x514001=['生成文档失败:\x20','stringify','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','status','api-doc','push','1189783FkUFBk','286564jqJGxW','.md\x20(','application/json','message','响应数据格式错误\x20(','log','获取文档失败\x20(','.md\x20-\x20','json','生成文档成功:\x20','\x20个数据集需要生成文档\x0a','✓\x20成功生成:\x20','9mqjTze','8414320nTwdlt','.md','✗\x20失败:\x20','./docs',']\x20正在生成:\x20','data','tableName','613892atwvAM','19452204PCCEGp','datasetCode','POST','name','560347zBNEVS','):缺少\x20data.markdown\x20字段','error','length','\x0a共有\x20','18eNRLni','string','markdown','utf8','1074580OuSuMy'];a4_0x46b0=function(){return _0x514001;};return a4_0x46b0();}import{logger}from'../utils/logger.js';export async function fetchDatasetDoc(_0xde48ce){const _0x321aef=a4_0x2d6e,{appCode:_0xa5d427,datasetCode:_0x3aeaed,datasetId:_0x528e10,extraParams:_0x52adf0}=_0xde48ce,_0x3bcba0=getApiDomain(),_0x4f1004=_0x3bcba0+'/api/node-toolbox/api-doc-generator',_0x48b15a={'appCode':_0xa5d427,'datasetCode':_0x3aeaed,'datasetId':_0x528e10,..._0x52adf0||{}},_0x88c50b=await fetch(_0x4f1004,{'method':_0x321aef(0x123),'headers':{'Content-Type':_0x321aef(0x10e),'Cookie':getCookie()},'body':JSON[_0x321aef(0x106)](_0x48b15a)});if(!_0x88c50b['ok']){if(_0x88c50b[_0x321aef(0x108)]===0x191)throw new Error(_0x321aef(0x107));let _0x33cc08='';try{_0x33cc08=await _0x88c50b['text']();}catch(_0x49af97){}throw new Error(_0x321aef(0x112)+_0x3aeaed+'),HTTP状态码:\x20'+_0x88c50b[_0x321aef(0x108)]+(_0x33cc08?'\x0a'+_0x33cc08:''));}const _0x1c00cf=await _0x88c50b[_0x321aef(0x114)]();if(!_0x1c00cf[_0x321aef(0x11e)]||typeof _0x1c00cf[_0x321aef(0x11e)][_0x321aef(0x102)]!==_0x321aef(0x101))throw new Error(_0x321aef(0x110)+_0x3aeaed+_0x321aef(0x126));return _0x1c00cf[_0x321aef(0x11e)][_0x321aef(0x102)];}function delay(_0x2162bb){return new Promise(_0x584df8=>setTimeout(_0x584df8,_0x2162bb));}export async function generateDatasetDocs(_0x5cb120,_0x801e5,_0x36add4=a4_0x54c66a(0x11c),_0x43bee6,_0x399bde){const _0x3b019b=a4_0x54c66a;mkdirSync(_0x36add4,{'recursive':!![]});const _0x77bc4d=[],_0x9fa6e8=_0x5cb120[_0x3b019b(0x128)];console['log'](_0x3b019b(0xff)+_0x9fa6e8+_0x3b019b(0x116));for(let _0x400568=0x0;_0x400568<_0x5cb120[_0x3b019b(0x128)];_0x400568++){const _0x3e30a1=_0x5cb120[_0x400568],_0x141e20=_0x400568+0x1,_0x5dded0=_0x3e30a1[_0x3b019b(0x11f)];try{console[_0x3b019b(0x111)]('['+_0x141e20+'/'+_0x9fa6e8+_0x3b019b(0x11d)+_0x5dded0+_0x3b019b(0x10d)+_0x3e30a1['name']+')');_0x43bee6&&_0x43bee6(_0x141e20,_0x9fa6e8,_0x5dded0);const _0x587b34=await fetchDatasetDoc({'appCode':_0x801e5,'datasetCode':_0x3e30a1['datasetCode'],'datasetId':_0x3e30a1['id'],'enableAI':![],'extraParams':_0x399bde}),_0x479780=a4_0x37181c['join'](_0x36add4,_0x5dded0+_0x3b019b(0x11a));writeFileSync(_0x479780,_0x587b34,{'encoding':_0x3b019b(0x103)}),console[_0x3b019b(0x111)](_0x3b019b(0x117)+_0x5dded0+_0x3b019b(0x11a)),logger['success'](_0x3b019b(0x109),_0x3b019b(0x115)+_0x5dded0,undefined,{'datasetCode':_0x3e30a1['datasetCode'],'datasetName':_0x3e30a1[_0x3b019b(0x124)],'filePath':_0x479780,'progress':_0x141e20+'/'+_0x9fa6e8}),_0x77bc4d[_0x3b019b(0x10a)]({'datasetCode':_0x3e30a1[_0x3b019b(0x122)],'datasetName':_0x3e30a1[_0x3b019b(0x124)],'filePath':_0x479780,'success':!![]}),_0x141e20<_0x9fa6e8&&await delay(0x1388);}catch(_0x426e04){const _0x425531=_0x426e04 instanceof Error?_0x426e04[_0x3b019b(0x10f)]:String(_0x426e04);console[_0x3b019b(0x111)](_0x3b019b(0x11b)+_0x5dded0+_0x3b019b(0x113)+_0x425531+'\x0a'),logger[_0x3b019b(0x127)](_0x3b019b(0x109),_0x3b019b(0x105)+_0x3e30a1['datasetCode'],{'datasetCode':_0x3e30a1['datasetCode'],'datasetName':_0x3e30a1[_0x3b019b(0x124)],'error':_0x425531,'progress':_0x141e20+'/'+_0x9fa6e8}),_0x77bc4d[_0x3b019b(0x10a)]({'datasetCode':_0x3e30a1[_0x3b019b(0x122)],'datasetName':_0x3e30a1[_0x3b019b(0x124)],'filePath':'','success':![],'error':_0x425531}),_0x141e20<_0x9fa6e8&&(console[_0x3b019b(0x111)]('等待\x203\x20秒...\x0a'),await delay(0xbb8));}}return _0x77bc4d;}
1
+ function a6_0x366d(){const _0x319c25=['响应数据格式错误\x20(','):缺少\x20data.markdown\x20字段',']\x20正在生成:\x20','等待\x203\x20秒...\x0a','3344370fnbdFN','.md\x20(','json','✓\x20成功生成:\x20','data','\x0a共有\x20','stringify','tableName','markdown','),HTTP状态码:\x20','7851042xBPcbY','length','606GforQJ','message','string','log','api-doc','4GnLOhu','获取文档失败\x20(','14215ROxAKn','.md\x20-\x20','POST','580208hZpCnU','生成文档成功:\x20','44mfByte','/api/node-toolbox/api-doc-generator','datasetCode','\x20个数据集需要生成文档\x0a','2622900KBZchA','application/json','12FDGDPj','8vaSkHc','name','✗\x20失败:\x20','error','join','.md','push','3880nruwoj','status','3358488wnfdsz'];a6_0x366d=function(){return _0x319c25;};return a6_0x366d();}(function(_0x17bcf,_0x213f24){const _0x401647=a6_0x5596,_0x49ea67=_0x17bcf();while(!![]){try{const _0x917f7a=-parseInt(_0x401647(0x72))/0x1*(-parseInt(_0x401647(0x8a))/0x2)+parseInt(_0x401647(0x6a))/0x3*(-parseInt(_0x401647(0x8f))/0x4)+-parseInt(_0x401647(0x8c))/0x5*(-parseInt(_0x401647(0x85))/0x6)+parseInt(_0x401647(0x74))/0x7*(parseInt(_0x401647(0x6b))/0x8)+-parseInt(_0x401647(0x83))/0x9+parseInt(_0x401647(0x79))/0xa+parseInt(_0x401647(0x91))/0xb*(parseInt(_0x401647(0x68))/0xc);if(_0x917f7a===_0x213f24)break;else _0x49ea67['push'](_0x49ea67['shift']());}catch(_0x58845f){_0x49ea67['push'](_0x49ea67['shift']());}}}(a6_0x366d,0x819be));import{mkdirSync,writeFileSync}from'node:fs';import a6_0x5d4f75 from'node:path';function a6_0x5596(_0x194be6,_0x22730f){_0x194be6=_0x194be6-0x66;const _0x366d34=a6_0x366d();let _0x559648=_0x366d34[_0x194be6];return _0x559648;}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';export async function fetchDatasetDoc(_0x3004e2){const _0x5b6064=a6_0x5596,{appCode:_0x3d7677,datasetCode:_0x461443,datasetId:_0x49f480,extraParams:_0x26592d}=_0x3004e2,_0x2c6012=getApiDomain(),_0x318ce9=_0x2c6012+_0x5b6064(0x92),_0x1d298d={'appCode':_0x3d7677,'datasetCode':_0x461443,'datasetId':_0x49f480,..._0x26592d||{}},_0x1c8e5e=await fetch(_0x318ce9,{'method':_0x5b6064(0x8e),'headers':{'Content-Type':_0x5b6064(0x69),'Cookie':getCookie()},'body':JSON[_0x5b6064(0x7f)](_0x1d298d)});if(!_0x1c8e5e['ok']){if(_0x1c8e5e[_0x5b6064(0x73)]===0x191)throw new Error('登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录');let _0x57277b='';try{_0x57277b=await _0x1c8e5e['text']();}catch(_0x90045e){}throw new Error(_0x5b6064(0x8b)+_0x461443+_0x5b6064(0x82)+_0x1c8e5e[_0x5b6064(0x73)]+(_0x57277b?'\x0a'+_0x57277b:''));}const _0x57987e=await _0x1c8e5e[_0x5b6064(0x7b)]();if(!_0x57987e[_0x5b6064(0x7d)]||typeof _0x57987e[_0x5b6064(0x7d)][_0x5b6064(0x81)]!==_0x5b6064(0x87))throw new Error(_0x5b6064(0x75)+_0x461443+_0x5b6064(0x76));return _0x57987e[_0x5b6064(0x7d)][_0x5b6064(0x81)];}function delay(_0xd75078){return new Promise(_0x1f7a88=>setTimeout(_0x1f7a88,_0xd75078));}export async function generateDatasetDocs(_0x473a5f,_0x3a6503,_0x249da8='./docs',_0x443aaa,_0x151300){const _0x14bda4=a6_0x5596;mkdirSync(_0x249da8,{'recursive':!![]});const _0x4ec11b=[],_0x4cd30c=_0x473a5f[_0x14bda4(0x84)];console[_0x14bda4(0x88)](_0x14bda4(0x7e)+_0x4cd30c+_0x14bda4(0x67));for(let _0xd381d0=0x0;_0xd381d0<_0x473a5f[_0x14bda4(0x84)];_0xd381d0++){const _0x5db35f=_0x473a5f[_0xd381d0],_0x4d7753=_0xd381d0+0x1,_0x5545c7=_0x5db35f[_0x14bda4(0x80)];try{console[_0x14bda4(0x88)]('['+_0x4d7753+'/'+_0x4cd30c+_0x14bda4(0x77)+_0x5545c7+_0x14bda4(0x7a)+_0x5db35f[_0x14bda4(0x6c)]+')');_0x443aaa&&_0x443aaa(_0x4d7753,_0x4cd30c,_0x5545c7);const _0x4b8fd9=await fetchDatasetDoc({'appCode':_0x3a6503,'datasetCode':_0x5db35f[_0x14bda4(0x66)],'datasetId':_0x5db35f['id'],'enableAI':![],'extraParams':_0x151300}),_0x5752a3=a6_0x5d4f75[_0x14bda4(0x6f)](_0x249da8,_0x5545c7+_0x14bda4(0x70));writeFileSync(_0x5752a3,_0x4b8fd9,{'encoding':'utf8'}),console[_0x14bda4(0x88)](_0x14bda4(0x7c)+_0x5545c7+'.md'),logger['success'](_0x14bda4(0x89),_0x14bda4(0x90)+_0x5545c7,undefined,{'datasetCode':_0x5db35f[_0x14bda4(0x66)],'datasetName':_0x5db35f['name'],'filePath':_0x5752a3,'progress':_0x4d7753+'/'+_0x4cd30c}),_0x4ec11b[_0x14bda4(0x71)]({'datasetCode':_0x5db35f['datasetCode'],'datasetName':_0x5db35f[_0x14bda4(0x6c)],'filePath':_0x5752a3,'success':!![]}),_0x4d7753<_0x4cd30c&&await delay(0x1388);}catch(_0x1cc39c){const _0x120e4a=_0x1cc39c instanceof Error?_0x1cc39c[_0x14bda4(0x86)]:String(_0x1cc39c);console[_0x14bda4(0x88)](_0x14bda4(0x6d)+_0x5545c7+_0x14bda4(0x8d)+_0x120e4a+'\x0a'),logger[_0x14bda4(0x6e)](_0x14bda4(0x89),'生成文档失败:\x20'+_0x5db35f[_0x14bda4(0x66)],{'datasetCode':_0x5db35f[_0x14bda4(0x66)],'datasetName':_0x5db35f[_0x14bda4(0x6c)],'error':_0x120e4a,'progress':_0x4d7753+'/'+_0x4cd30c}),_0x4ec11b[_0x14bda4(0x71)]({'datasetCode':_0x5db35f['datasetCode'],'datasetName':_0x5db35f[_0x14bda4(0x6c)],'filePath':'','success':![],'error':_0x120e4a}),_0x4d7753<_0x4cd30c&&(console['log'](_0x14bda4(0x78)),await delay(0xbb8));}}return _0x4ec11b;}
@@ -1 +1 @@
1
- (function(_0x517c64,_0x4c1305){const _0x3e55cb=a5_0x5018,_0x393850=_0x517c64();while(!![]){try{const _0x4b011c=-parseInt(_0x3e55cb(0x15b))/0x1+parseInt(_0x3e55cb(0x141))/0x2*(parseInt(_0x3e55cb(0x16b))/0x3)+parseInt(_0x3e55cb(0x13b))/0x4*(-parseInt(_0x3e55cb(0x14c))/0x5)+-parseInt(_0x3e55cb(0x146))/0x6+parseInt(_0x3e55cb(0x166))/0x7+parseInt(_0x3e55cb(0x167))/0x8*(-parseInt(_0x3e55cb(0x147))/0x9)+parseInt(_0x3e55cb(0x13c))/0xa;if(_0x4b011c===_0x4c1305)break;else _0x393850['push'](_0x393850['shift']());}catch(_0x16aaf3){_0x393850['push'](_0x393850['shift']());}}}(a5_0x2e31,0xa8380));import{jsx as a5_0x288c15,jsxs as a5_0x2ae7dd}from'react/jsx-runtime';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{readConfig,getConfigAppCode}from'../utils/config.js';import{initEnv}from'../constant/env.js';function a5_0x2e31(){const _0x4806cc=['*\x20导入方式:','modelCount','131964tcsoHw','22671CYjnDU','lovrabet\x20auth','originalCount','cwd','includes','215OZtsNV','client','white','-client','green','!\x20原始数据集\x20','💡\x20请使用\x20','\x20from\x20\x27@/','\x20个模型','{\x20lovrabetClient\x20}','gray','\x20-\x20客户端实例文件','env','api-pull','使用配置的应用AppCode:\x20','975115vZPelx','√\x20成功拉取\x20','duplicateCount','datasetCount','message','-\x20模型配置文件\x20(','拉取\x20API\x20配置失败:\x20','api','cyan','./src/api/','.ts','4481232VoPJiB','3480nYkrmB','length','error','endsWith','9246pRKGCI','*\x20已生成文件:','column','\x20重新登录后再试','split','\x20个,过滤重复','\x20个模型)','92892JQZTQw','23821390cRpLlZ','未提供应用AppCode,且配置中也没有默认值','string','dim','🚀\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','492xmaavC','replace','yellow'];a5_0x2e31=function(){return _0x4806cc;};return a5_0x2e31();}import{generateApiFile}from'./generate-api-file.js';function a5_0x5018(_0x594b95,_0x222160){_0x594b95=_0x594b95-0x137;const _0x2e318d=a5_0x2e31();let _0x5018aa=_0x2e318d[_0x594b95];return _0x5018aa;}import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export const ApiPullUI=({appCode:_0xa6c722,env:_0x5a1f84,output:_0x565771})=>{const _0x4e844a=a5_0x5018,{exit:_0x49790e}=useApp(),[_0x1c0f12,_0x5ef5e9]=useState(![]),[_0x550a25,_0x124f70]=useState(![]),[_0x299ae5,_0x1ed450]=useState(null),[_0x4bb568,_0x4aa598]=useState(null),_0x3f386a=readConfig(),_0x5924d9=getConfigAppCode(),_0x5e6f01=_0xa6c722||_0x5924d9,_0x556c8d=typeof _0x3f386a?.[_0x4e844a(0x158)]===_0x4e844a(0x13e)?_0x3f386a['env']:undefined,_0x499a12=_0x5a1f84||_0x556c8d||'online';initEnv(_0x499a12);const _0x1a8d50=_0x565771||_0x4e844a(0x164),_0x5b7d9e=_0xa6c722&&_0xa6c722[_0x4e844a(0x14b)]('-')?_0xa6c722[_0x4e844a(0x138)]('-')['slice'](0x1)['join']('-'):'',_0xe27489=_0xa6c722?'使用指定的应用AppCode:\x20'+_0x5e6f01:_0x4e844a(0x15a)+_0x5e6f01,_0x2a8505=_0x5b7d9e?_0x5b7d9e+'-api':_0x4e844a(0x162),_0x3e4dd6=_0x5b7d9e?_0x5b7d9e+_0x4e844a(0x14f):'client';useEffect(()=>{_0x5ef5e9(!![]),_0x8e31b0();},[]),useEffect(()=>{(_0x550a25||_0x299ae5)&&_0x49790e();},[_0x550a25,_0x299ae5,_0x49790e]);async function _0x8e31b0(){const _0x492544=_0x4e844a;if(!_0x5e6f01){_0x1ed450(_0x492544(0x13d));return;}try{logger['setLogPath'](process[_0x492544(0x14a)]());const {configArray:_0x3e7bcc}=await fetchModelList(_0x5e6f01),_0x266e91=_0x3e7bcc[_0x492544(0x168)],_0x5f2abd=!_0xa6c722,_0x35665d=await generateApiFile(_0x3e7bcc,_0x5b7d9e,_0x5e6f01,_0x5f2abd,_0x499a12,_0x1a8d50),_0x4b22aa=_0x1a8d50[_0x492544(0x16a)]('/')?_0x1a8d50:_0x1a8d50+'/';_0x4aa598({'api':''+_0x4b22aa+_0x2a8505+_0x492544(0x165),'client':''+_0x4b22aa+_0x3e4dd6+_0x492544(0x165),'modelCount':_0x35665d[_0x492544(0x145)],'datasetCount':_0x266e91,'originalCount':_0x266e91,'duplicateCount':0x0}),_0x124f70(!![]);}catch(_0x16f0d7){const _0x5cbd57=_0x16f0d7 instanceof Error?_0x16f0d7[_0x492544(0x15f)]:String(_0x16f0d7);logger[_0x492544(0x169)](_0x492544(0x159),_0x492544(0x161)+_0x5cbd57,{'appCode':_0x5e6f01,'error':_0x5cbd57}),_0x1ed450(_0x492544(0x161)+_0x5cbd57);}finally{_0x5ef5e9(![]);}}return a5_0x2ae7dd(Box,{'flexDirection':_0x4e844a(0x16d),'children':[(_0x1c0f12||_0x550a25)&&a5_0x2ae7dd(Box,{'children':[a5_0x288c15(Text,{'color':_0x4e844a(0x156),'children':'*\x20'}),a5_0x288c15(Text,{'color':_0xa6c722?_0x4e844a(0x14e):_0x4e844a(0x13f),'children':_0xe27489})]}),_0x1c0f12&&a5_0x288c15(Box,{'children':a5_0x2ae7dd(Text,{'children':[_0x4e844a(0x140),_0x499a12,')']})}),_0x550a25&&_0x4bb568&&a5_0x2ae7dd(Box,{'flexDirection':_0x4e844a(0x16d),'children':[a5_0x288c15(Box,{'children':a5_0x2ae7dd(Text,{'color':_0x4e844a(0x150),'children':[_0x4e844a(0x15c),_0x4bb568[_0x4e844a(0x15e)],'\x20个数据集,生成','\x20',_0x4bb568[_0x4e844a(0x145)],_0x4e844a(0x154)]})}),_0x4bb568[_0x4e844a(0x15d)]>0x0&&a5_0x288c15(Box,{'marginTop':0x1,'children':a5_0x2ae7dd(Text,{'color':_0x4e844a(0x143),'children':[_0x4e844a(0x151),_0x4bb568[_0x4e844a(0x149)],_0x4e844a(0x139),'\x20',_0x4bb568['duplicateCount'],'\x20个']})}),a5_0x288c15(Box,{'marginTop':0x1,'children':a5_0x288c15(Text,{'color':_0x4e844a(0x156),'children':_0x4e844a(0x16c)})}),a5_0x2ae7dd(Box,{'marginLeft':0x2,'children':[a5_0x2ae7dd(Text,{'color':'cyan','children':['•\x20',_0x4bb568[_0x4e844a(0x162)]]}),a5_0x2ae7dd(Text,{'color':_0x4e844a(0x13f),'children':['\x20',_0x4e844a(0x160),_0x4bb568[_0x4e844a(0x145)],_0x4e844a(0x13a)]})]}),a5_0x2ae7dd(Box,{'marginLeft':0x2,'children':[a5_0x2ae7dd(Text,{'color':_0x4e844a(0x163),'children':['•\x20',_0x4bb568[_0x4e844a(0x14d)]]}),a5_0x288c15(Text,{'color':'dim','children':_0x4e844a(0x157)})]}),a5_0x288c15(Box,{'marginTop':0x1,'children':a5_0x288c15(Text,{'color':'gray','children':_0x4e844a(0x144)})}),a5_0x288c15(Box,{'marginLeft':0x2,'children':a5_0x2ae7dd(Text,{'color':_0x4e844a(0x143),'children':['import\x20',_0x4e844a(0x155),_0x4e844a(0x153),_0x4bb568['client']['replace'](/^\.\//,'')[_0x4e844a(0x142)](_0x4e844a(0x165),''),'\x27']})})]}),_0x299ae5&&a5_0x2ae7dd(Box,{'flexDirection':_0x4e844a(0x16d),'children':[a5_0x288c15(Box,{'children':a5_0x2ae7dd(Text,{'color':'red','children':['❌\x20',_0x299ae5]})}),_0x299ae5[_0x4e844a(0x14b)]('登录')&&a5_0x2ae7dd(Box,{'marginTop':0x1,'children':[a5_0x288c15(Text,{'color':_0x4e844a(0x143),'children':_0x4e844a(0x152)}),a5_0x288c15(Text,{'color':_0x4e844a(0x163),'children':_0x4e844a(0x148)}),a5_0x288c15(Text,{'color':'yellow','children':_0x4e844a(0x137)})]})]})]});};
1
+ (function(_0x146d25,_0x3894cb){const _0x5b0525=a7_0x47a8,_0x482b5c=_0x146d25();while(!![]){try{const _0x29689b=-parseInt(_0x5b0525(0x11b))/0x1+parseInt(_0x5b0525(0x122))/0x2*(-parseInt(_0x5b0525(0x10a))/0x3)+parseInt(_0x5b0525(0x125))/0x4+-parseInt(_0x5b0525(0x12b))/0x5*(-parseInt(_0x5b0525(0x107))/0x6)+-parseInt(_0x5b0525(0x130))/0x7*(parseInt(_0x5b0525(0x12a))/0x8)+parseInt(_0x5b0525(0x11a))/0x9*(parseInt(_0x5b0525(0x103))/0xa)+-parseInt(_0x5b0525(0x113))/0xb;if(_0x29689b===_0x3894cb)break;else _0x482b5c['push'](_0x482b5c['shift']());}catch(_0xd7acf0){_0x482b5c['push'](_0x482b5c['shift']());}}}(a7_0x34ad,0x6e7b8));import{jsx as a7_0x44c732,jsxs as a7_0x4a060f}from'react/jsx-runtime';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{readConfig,getConfigAppCode}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';function a7_0x34ad(){const _0x569dda=['拉取\x20API\x20配置失败:\x20','\x20个模型)','length','🚀\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','4192gkyogR','444615MoIsHb','√\x20成功拉取\x20','online','dim','\x20-\x20客户端实例文件','9485ruvBCD','\x20个数据集,生成','message','api','column','-api','.ts','20OlCfwJ','client','{\x20lovrabetClient\x20}','join','60AxZxdv','yellow','cyan','33IgqIPs','green','endsWith','gray','使用指定的应用AppCode:\x20','modelCount','💡\x20请使用\x20','replace','originalCount','1316183cAHEPN','./src/api/','\x20from\x20\x27@/','setLogPath','string','datasetCount','duplicateCount','3306420sZwIZY','456027JeEyPj','-client','-\x20模型配置文件\x20(','split','*\x20已生成文件:','red','error','20362ZIHFna','slice','未提供应用AppCode,且配置中也没有默认值','904948YEBufi'];a7_0x34ad=function(){return _0x569dda;};return a7_0x34ad();}function a7_0x47a8(_0x50a549,_0x3be93b){_0x50a549=_0x50a549-0x100;const _0x34ad72=a7_0x34ad();let _0x47a80b=_0x34ad72[_0x50a549];return _0x47a80b;}import{fetchModelList}from'./fetch-model-list.js';export const ApiPullUI=({appCode:_0x97b512,env:_0x240384,output:_0x42bde1})=>{const _0x40fe01=a7_0x47a8,{exit:_0x178008}=useApp(),[_0x2be3ae,_0x5a0597]=useState(![]),[_0x4ef46c,_0x353381]=useState(![]),[_0x4f002a,_0xcfe106]=useState(null),[_0x539894,_0x1eb1a0]=useState(null),_0x17bc64=readConfig(),_0x20c6c5=getConfigAppCode(),_0x311206=_0x97b512||_0x20c6c5,_0x42413e=typeof _0x17bc64?.['env']===_0x40fe01(0x117)?_0x17bc64['env']:undefined,_0x218d0a=_0x240384||_0x42413e||_0x40fe01(0x12d);initEnv(_0x218d0a);const _0x32a7ec=_0x42bde1||_0x40fe01(0x114),_0x43bd6c=_0x97b512&&_0x97b512['includes']('-')?_0x97b512[_0x40fe01(0x11e)]('-')[_0x40fe01(0x123)](0x1)[_0x40fe01(0x106)]('-'):'',_0x4ef60c=_0x97b512?_0x40fe01(0x10e)+_0x311206:'使用配置的应用AppCode:\x20'+_0x311206,_0x200d0a=_0x43bd6c?_0x43bd6c+_0x40fe01(0x101):_0x40fe01(0x133),_0x3dc795=_0x43bd6c?_0x43bd6c+_0x40fe01(0x11c):'client';useEffect(()=>{_0x5a0597(!![]),_0x25cb76();},[]),useEffect(()=>{(_0x4ef46c||_0x4f002a)&&_0x178008();},[_0x4ef46c,_0x4f002a,_0x178008]);async function _0x25cb76(){const _0x2b2f09=_0x40fe01;if(!_0x311206){_0xcfe106(_0x2b2f09(0x124));return;}try{logger[_0x2b2f09(0x116)](process['cwd']());const {configArray:_0x2991cc}=await fetchModelList(_0x311206),_0x21ad53=_0x2991cc[_0x2b2f09(0x128)],_0x2c1769=!_0x97b512,_0x477790=await generateApiFile(_0x2991cc,_0x43bd6c,_0x311206,_0x2c1769,_0x218d0a,_0x32a7ec),_0x1fd380=_0x32a7ec[_0x2b2f09(0x10c)]('/')?_0x32a7ec:_0x32a7ec+'/';_0x1eb1a0({'api':''+_0x1fd380+_0x200d0a+_0x2b2f09(0x102),'client':''+_0x1fd380+_0x3dc795+'.ts','modelCount':_0x477790[_0x2b2f09(0x10f)],'datasetCount':_0x21ad53,'originalCount':_0x21ad53,'duplicateCount':0x0}),_0x353381(!![]);}catch(_0x4da5a4){const _0x224629=_0x4da5a4 instanceof Error?_0x4da5a4[_0x2b2f09(0x132)]:String(_0x4da5a4);logger[_0x2b2f09(0x121)]('api-pull',_0x2b2f09(0x126)+_0x224629,{'appCode':_0x311206,'error':_0x224629}),_0xcfe106(_0x2b2f09(0x126)+_0x224629);}finally{_0x5a0597(![]);}}return a7_0x4a060f(Box,{'flexDirection':_0x40fe01(0x100),'children':[(_0x2be3ae||_0x4ef46c)&&a7_0x4a060f(Box,{'children':[a7_0x44c732(Text,{'color':_0x40fe01(0x10d),'children':'*\x20'}),a7_0x44c732(Text,{'color':_0x97b512?'white':_0x40fe01(0x12e),'children':_0x4ef60c})]}),_0x2be3ae&&a7_0x44c732(Box,{'children':a7_0x4a060f(Text,{'children':[_0x40fe01(0x129),_0x218d0a,')']})}),_0x4ef46c&&_0x539894&&a7_0x4a060f(Box,{'flexDirection':_0x40fe01(0x100),'children':[a7_0x44c732(Box,{'children':a7_0x4a060f(Text,{'color':_0x40fe01(0x10b),'children':[_0x40fe01(0x12c),_0x539894[_0x40fe01(0x118)],_0x40fe01(0x131),'\x20',_0x539894[_0x40fe01(0x10f)],'\x20个模型']})}),_0x539894[_0x40fe01(0x119)]>0x0&&a7_0x44c732(Box,{'marginTop':0x1,'children':a7_0x4a060f(Text,{'color':_0x40fe01(0x108),'children':['!\x20原始数据集\x20',_0x539894[_0x40fe01(0x112)],'\x20个,过滤重复','\x20',_0x539894[_0x40fe01(0x119)],'\x20个']})}),a7_0x44c732(Box,{'marginTop':0x1,'children':a7_0x44c732(Text,{'color':'gray','children':_0x40fe01(0x11f)})}),a7_0x4a060f(Box,{'marginLeft':0x2,'children':[a7_0x4a060f(Text,{'color':_0x40fe01(0x109),'children':['•\x20',_0x539894[_0x40fe01(0x133)]]}),a7_0x4a060f(Text,{'color':_0x40fe01(0x12e),'children':['\x20',_0x40fe01(0x11d),_0x539894['modelCount'],_0x40fe01(0x127)]})]}),a7_0x4a060f(Box,{'marginLeft':0x2,'children':[a7_0x4a060f(Text,{'color':_0x40fe01(0x109),'children':['•\x20',_0x539894['client']]}),a7_0x44c732(Text,{'color':_0x40fe01(0x12e),'children':_0x40fe01(0x12f)})]}),a7_0x44c732(Box,{'marginTop':0x1,'children':a7_0x44c732(Text,{'color':_0x40fe01(0x10d),'children':'*\x20导入方式:'})}),a7_0x44c732(Box,{'marginLeft':0x2,'children':a7_0x4a060f(Text,{'color':_0x40fe01(0x108),'children':['import\x20',_0x40fe01(0x105),_0x40fe01(0x115),_0x539894[_0x40fe01(0x104)][_0x40fe01(0x111)](/^\.\//,'')[_0x40fe01(0x111)](_0x40fe01(0x102),''),'\x27']})})]}),_0x4f002a&&a7_0x4a060f(Box,{'flexDirection':_0x40fe01(0x100),'children':[a7_0x44c732(Box,{'children':a7_0x4a060f(Text,{'color':_0x40fe01(0x120),'children':['❌\x20',_0x4f002a]})}),_0x4f002a['includes']('登录')&&a7_0x4a060f(Box,{'marginTop':0x1,'children':[a7_0x44c732(Text,{'color':_0x40fe01(0x108),'children':_0x40fe01(0x110)}),a7_0x44c732(Text,{'color':_0x40fe01(0x109),'children':'lovrabet\x20auth'}),a7_0x44c732(Text,{'color':_0x40fe01(0x108),'children':'\x20重新登录后再试'})]})]})]});};
@@ -1 +1 @@
1
- (function(_0x3918f8,_0xdc2056){const _0x48d5c4=a6_0x2993,_0x123419=_0x3918f8();while(!![]){try{const _0x5e1518=-parseInt(_0x48d5c4(0x104))/0x1+parseInt(_0x48d5c4(0xe8))/0x2*(-parseInt(_0x48d5c4(0xf9))/0x3)+-parseInt(_0x48d5c4(0xf0))/0x4*(-parseInt(_0x48d5c4(0xf8))/0x5)+-parseInt(_0x48d5c4(0x102))/0x6*(-parseInt(_0x48d5c4(0xee))/0x7)+-parseInt(_0x48d5c4(0xf5))/0x8+parseInt(_0x48d5c4(0xfd))/0x9+parseInt(_0x48d5c4(0xf4))/0xa*(parseInt(_0x48d5c4(0xf1))/0xb);if(_0x5e1518===_0xdc2056)break;else _0x123419['push'](_0x123419['shift']());}catch(_0x576816){_0x123419['push'](_0x123419['shift']());}}}(a6_0x3fb1,0x6a00e));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a6_0x3fb1(){const _0x10a4dc=['Unauthorized','401','info','status','98VXdFYA','未知错误','4uBnbsJ','3170629EgZFVO','configArray','errorMessage','30JKtiii','4476544CYQUPc','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','&otype=array','2692335gDeimm','207oIiuYR','includes','code','success','5007294axfKGG','UNAUTHORIZED','errorMsg','获取数据集失败,HTTP状态码:\x20','count','99240iReQTa','json','737950RcvTZJ','data','正在从服务器拉取模型列表...\x20(环境:\x20','errorCode','13316ufAffr','message'];a6_0x3fb1=function(){return _0x10a4dc;};return a6_0x3fb1();}import{logger}from'../utils/logger.js';function a6_0x2993(_0x165e60,_0x637e95){_0x165e60=_0x165e60-0xe6;const _0x3fb173=a6_0x3fb1();let _0x299382=_0x3fb173[_0x165e60];return _0x299382;}import{getEnv}from'../constant/env.js';export async function fetchModelList(_0x306125){const _0x41f6ee=a6_0x2993,_0x6cbc4c=getEnv(),_0x43421f=getApiDomain()+'/api/node-toolbox/dataset/model-list?appcode='+_0x306125+_0x41f6ee(0xf7);logger[_0x41f6ee(0xec)]('fetch-model-list',_0x41f6ee(0xe6)+_0x6cbc4c+')',{'apiUrl':_0x43421f});const _0x14dae5=await fetch(_0x43421f,{'headers':{'Cookie':getCookie()}});if(!_0x14dae5['ok']){if(_0x14dae5[_0x41f6ee(0xed)]===0x191)throw new Error(_0x41f6ee(0xf6));throw new Error(_0x41f6ee(0x100)+_0x14dae5['status']);}const _0x24e901=await _0x14dae5[_0x41f6ee(0x103)]();if(!_0x24e901[_0x41f6ee(0xfc)]){const _0x4ec9d3=_0x24e901[_0x41f6ee(0xff)]||_0x24e901[_0x41f6ee(0xe9)]||_0x24e901[_0x41f6ee(0x105)]?.[_0x41f6ee(0xe9)]||_0x24e901[_0x41f6ee(0xf3)]||_0x24e901['error']||_0x41f6ee(0xef);if(_0x4ec9d3[_0x41f6ee(0xfa)](_0x41f6ee(0xeb))||_0x4ec9d3[_0x41f6ee(0xfa)](_0x41f6ee(0xea))||_0x4ec9d3[_0x41f6ee(0xfa)]('登录')||_0x4ec9d3[_0x41f6ee(0xfa)]('认证')||_0x24e901[_0x41f6ee(0xe7)]===_0x41f6ee(0xfe)||_0x24e901[_0x41f6ee(0xfb)]===0x191||_0x24e901[_0x41f6ee(0xfb)]===_0x41f6ee(0xeb))throw new Error('登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录');throw new Error('获取数据集失败:\x20'+_0x4ec9d3);}return{'configArray':_0x24e901[_0x41f6ee(0x105)][_0x41f6ee(0xf2)],'count':_0x24e901[_0x41f6ee(0x105)][_0x41f6ee(0x101)]};}
1
+ function a8_0xcf6b(_0x1b3a24,_0x42782e){_0x1b3a24=_0x1b3a24-0x74;const _0x2a0db0=a8_0x2a0d();let _0xcf6b8c=_0x2a0db0[_0x1b3a24];return _0xcf6b8c;}(function(_0x25cdd5,_0x2f5d17){const _0x310c94=a8_0xcf6b,_0x1c6b14=_0x25cdd5();while(!![]){try{const _0x20a9d6=-parseInt(_0x310c94(0x79))/0x1+-parseInt(_0x310c94(0x88))/0x2*(-parseInt(_0x310c94(0x89))/0x3)+parseInt(_0x310c94(0x81))/0x4+parseInt(_0x310c94(0x7f))/0x5*(-parseInt(_0x310c94(0x8e))/0x6)+parseInt(_0x310c94(0x74))/0x7*(parseInt(_0x310c94(0x7d))/0x8)+-parseInt(_0x310c94(0x80))/0x9+parseInt(_0x310c94(0x8a))/0xa*(parseInt(_0x310c94(0x7a))/0xb);if(_0x20a9d6===_0x2f5d17)break;else _0x1c6b14['push'](_0x1c6b14['shift']());}catch(_0x2c0203){_0x1c6b14['push'](_0x1c6b14['shift']());}}}(a8_0x2a0d,0x94104));import{getCookie}from'../auth/get-cookie.js';function a8_0x2a0d(){const _0x7ab113=['count','info','configArray','error','code','success','8MFZDlQ','700053wzkxBl','36310UhKdGg','data','json','正在从服务器拉取模型列表...\x20(环境:\x20','481542DTbaEu','获取数据集失败:\x20','Unauthorized','/api/node-toolbox/dataset/model-list?appcode=','7IjbeNK','fetch-model-list','401','未知错误','status','1045304DIHIIy','2981lnSUCK','includes','message','5154352hcOzMn','errorMessage','20hLzKbd','8893944iNXHfP','1597268uIHAeo'];a8_0x2a0d=function(){return _0x7ab113;};return a8_0x2a0d();}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';export async function fetchModelList(_0x436282){const _0x3907ea=a8_0xcf6b,_0x3cf74f=getEnv(),_0x2548d1=getApiDomain()+_0x3907ea(0x91)+_0x436282+'&otype=array';logger[_0x3907ea(0x83)](_0x3907ea(0x75),_0x3907ea(0x8d)+_0x3cf74f+')',{'apiUrl':_0x2548d1});const _0x5a3947=await fetch(_0x2548d1,{'headers':{'Cookie':getCookie()}});if(!_0x5a3947['ok']){if(_0x5a3947[_0x3907ea(0x78)]===0x191)throw new Error('登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录');throw new Error('获取数据集失败,HTTP状态码:\x20'+_0x5a3947[_0x3907ea(0x78)]);}const _0x11235b=await _0x5a3947[_0x3907ea(0x8c)]();if(!_0x11235b[_0x3907ea(0x87)]){const _0x385df7=_0x11235b['errorMsg']||_0x11235b['message']||_0x11235b['data']?.[_0x3907ea(0x7c)]||_0x11235b[_0x3907ea(0x7e)]||_0x11235b[_0x3907ea(0x85)]||_0x3907ea(0x77);if(_0x385df7[_0x3907ea(0x7b)]('401')||_0x385df7['includes'](_0x3907ea(0x90))||_0x385df7[_0x3907ea(0x7b)]('登录')||_0x385df7['includes']('认证')||_0x11235b['errorCode']==='UNAUTHORIZED'||_0x11235b['code']===0x191||_0x11235b[_0x3907ea(0x86)]===_0x3907ea(0x76))throw new Error('登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录');throw new Error(_0x3907ea(0x8f)+_0x385df7);}return{'configArray':_0x11235b[_0x3907ea(0x8b)][_0x3907ea(0x84)],'count':_0x11235b['data'][_0x3907ea(0x82)]};}
@@ -1 +1 @@
1
- function a7_0x4031(){const _0x25341a=['{\x20apiConfigName:\x20\x22','tableName','datasetCode','alias','CONFIG_NAMES.DEFAULT','utf8','4okeEyi','online','2991880NeruZM','8Grhtkf','push','1832506qbYTEj','1319536ubMiUC','10gkdZwm','app','../..','init-api','.ts','env','typescript','client','string','./src/api/','请先通过\x20`lovrabet\x20config\x20set\x20app\x20<value>`\x20配置应用\x20Code','9737791GqJEpC','client.ts.tpl','api','resolve','endsWith','name','15439006bWgnqA','forEach','2900940vfhTbP',',\x20env:\x20\x22','join','api.ts.tpl','key','27sVESrQ','877758DOyThs','length','replaceApiContent'];a7_0x4031=function(){return _0x25341a;};return a7_0x4031();}const a7_0x3a4e9f=a7_0x2f49;(function(_0xf781db,_0x23ca27){const _0x5502fa=a7_0x2f49,_0x47bbb8=_0xf781db();while(!![]){try{const _0x2a9151=parseInt(_0x5502fa(0x1fb))/0x1+-parseInt(_0x5502fa(0x1fc))/0x2+parseInt(_0x5502fa(0x1ed))/0x3*(-parseInt(_0x5502fa(0x1f6))/0x4)+-parseInt(_0x5502fa(0x1fd))/0x5*(-parseInt(_0x5502fa(0x210))/0x6)+-parseInt(_0x5502fa(0x208))/0x7*(parseInt(_0x5502fa(0x1f9))/0x8)+parseInt(_0x5502fa(0x1ec))/0x9*(-parseInt(_0x5502fa(0x1f8))/0xa)+parseInt(_0x5502fa(0x20e))/0xb;if(_0x2a9151===_0x23ca27)break;else _0x47bbb8['push'](_0x47bbb8['shift']());}catch(_0x46644d){_0x47bbb8['push'](_0x47bbb8['shift']());}}}(a7_0x4031,0xeadd1));import a7_0x3e18e4 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a7_0x3ac255 from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{TemplateReplacer}from'../utils/template-replacer.js';function a7_0x2f49(_0x50283e,_0x540c12){_0x50283e=_0x50283e-0x1eb;const _0x403145=a7_0x4031();let _0x2f49c7=_0x403145[_0x50283e];return _0x2f49c7;}import{logger}from'../utils/logger.js';export async function generateApiFile(_0x300757,_0x325478='',_0x5f54d9,_0x19e8af=![],_0x2e71bc,_0x2ddcae=a7_0x3a4e9f(0x206)){const _0x2cfbad=a7_0x3a4e9f,_0x5d67ef=readConfig(),_0x5b2b31=_0x5f54d9||_0x5d67ef?.[_0x2cfbad(0x1fe)];if(typeof _0x5b2b31!=='string'||!_0x5b2b31)throw new Error(_0x2cfbad(0x207));const _0x23a544=_0x19e8af?_0x2cfbad(0x1f4):'\x22'+_0x5b2b31+'\x22',_0x38f732=typeof _0x5d67ef[_0x2cfbad(0x202)]===_0x2cfbad(0x205)?_0x5d67ef[_0x2cfbad(0x202)]:undefined,_0x22a4d3=_0x2e71bc||_0x38f732||_0x2cfbad(0x1f7),_0x58b452=_0x22a4d3!=='online';let _0x4beca3;if(_0x19e8af)_0x58b452?_0x4beca3='{\x20apiConfigName:\x20'+_0x23a544+_0x2cfbad(0x211)+_0x22a4d3+'\x22\x20}':_0x4beca3='';else{const _0x4124de=_0x58b452?',\x20env:\x20\x22'+_0x22a4d3+'\x22':'';_0x4beca3=_0x2cfbad(0x1f0)+_0x5b2b31+'\x22'+_0x4124de+'\x20}';}const _0xee0c04=_0x325478?_0x325478+'-api':_0x2cfbad(0x20a),_0x58c56e=_0x325478?_0x325478+'-client':_0x2cfbad(0x204),_0x1db52f=[];_0x300757[_0x2cfbad(0x20f)](_0x5ed32c=>{const _0x34a27f=_0x2cfbad;_0x1db52f[_0x34a27f(0x1fa)]({'datasetCode':_0x5ed32c[_0x34a27f(0x1f2)],'tableName':_0x5ed32c[_0x34a27f(0x1f1)],'name':_0x5ed32c[_0x34a27f(0x20d)]||'','alias':_0x5ed32c[_0x34a27f(0x1f3)]||_0x5ed32c[_0x34a27f(0x1eb)]});});const _0x3cfe38=fileURLToPath(import.meta.url),_0x568a47=a7_0x3ac255[_0x2cfbad(0x20b)](a7_0x3ac255['dirname'](_0x3cfe38),_0x2cfbad(0x1ff)),_0x4af3a6=a7_0x3ac255[_0x2cfbad(0x212)](_0x568a47,'templates/generate-api'),_0x25bc7d=a7_0x3ac255[_0x2cfbad(0x212)](_0x4af3a6,_0x2cfbad(0x213)),_0x1cba13=a7_0x3ac255[_0x2cfbad(0x212)](_0x4af3a6,_0x2cfbad(0x209)),_0x3a6276=_0x2ddcae[_0x2cfbad(0x20c)]('/')?_0x2ddcae['slice'](0x0,-0x1):_0x2ddcae;mkdirSync(_0x3a6276,{'recursive':!![]});const _0x4b2c67=_0x1db52f[0x0]?.[_0x2cfbad(0x1f3)],_0x27079a=readFileSync(_0x25bc7d,'utf8'),_0x5170ac=TemplateReplacer[_0x2cfbad(0x1ef)](_0x27079a,_0x5b2b31,_0x1db52f,_0x4b2c67,_0xee0c04,_0x23a544),_0x271ea2=await a7_0x3e18e4['format'](_0x5170ac,{'parser':_0x2cfbad(0x203)}),_0x2ad740=_0x3a6276+'/'+_0xee0c04+_0x2cfbad(0x201);writeFileSync(_0x2ad740,_0x271ea2,{'encoding':_0x2cfbad(0x1f5)});const _0x3e3b9b=readFileSync(_0x1cba13,'utf8'),_0x30ca6a=TemplateReplacer[_0x2cfbad(0x1ef)](_0x3e3b9b,_0x5b2b31,_0x1db52f,_0x4b2c67,_0xee0c04,_0x23a544,_0x4beca3),_0x34a8c0=await a7_0x3e18e4['format'](_0x30ca6a,{'parser':'typescript'}),_0x18cfd1=_0x3a6276+'/'+_0x58c56e+_0x2cfbad(0x201);writeFileSync(_0x18cfd1,_0x34a8c0,{'encoding':_0x2cfbad(0x1f5)});const _0x471648=_0x1db52f[_0x2cfbad(0x1ee)];return logger['success'](_0x2cfbad(0x200),'API\x20文件生成成功!',undefined,{'apiFile':_0x2ad740,'clientFile':_0x18cfd1,'modelCount':_0x471648,'configName':_0x23a544}),{'modelCount':_0x471648,'apiFilePath':_0x2ad740,'clientFilePath':_0x18cfd1,'configName':_0x23a544};}
1
+ const a9_0xec1ee2=a9_0xc908;(function(_0x2389b0,_0x51203b){const _0x4cc70e=a9_0xc908,_0x15da2b=_0x2389b0();while(!![]){try{const _0x4b7fb6=parseInt(_0x4cc70e(0x193))/0x1*(-parseInt(_0x4cc70e(0x190))/0x2)+parseInt(_0x4cc70e(0x176))/0x3+parseInt(_0x4cc70e(0x173))/0x4+parseInt(_0x4cc70e(0x180))/0x5*(parseInt(_0x4cc70e(0x197))/0x6)+-parseInt(_0x4cc70e(0x17f))/0x7*(-parseInt(_0x4cc70e(0x16e))/0x8)+parseInt(_0x4cc70e(0x18e))/0x9+-parseInt(_0x4cc70e(0x192))/0xa;if(_0x4b7fb6===_0x51203b)break;else _0x15da2b['push'](_0x15da2b['shift']());}catch(_0xb96de3){_0x15da2b['push'](_0x15da2b['shift']());}}}(a9_0x81a9,0x8e2c0));import a9_0x14cb3e from'prettier';function a9_0xc908(_0x45fe5d,_0x19261e){_0x45fe5d=_0x45fe5d-0x16e;const _0x81a9a5=a9_0x81a9();let _0xc908b0=_0x81a9a5[_0x45fe5d];return _0xc908b0;}import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a9_0x5ea810 from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';function a9_0x81a9(){const _0x51a0df=['typescript','.ts','app','join',',\x20env:\x20\x22','client','3630249jCyzEu','./src/api/','366wwjSpM','请先通过\x20`lovrabet\x20config\x20set\x20app\x20<value>`\x20配置应用\x20Code','10570800rMgAzD','5869sJBlbm','string','{\x20apiConfigName:\x20\x22','api.ts.tpl','162BsXEjy','16gmyVuf','name','tableName','utf8','endsWith','3195664IcustS','replaceApiContent','format','1642197isdPEP','resolve','init-api','-api','client.ts.tpl','env','templates/generate-api','{\x20apiConfigName:\x20','CONFIG_NAMES.DEFAULT','627109ePirwa','145295pEhOti','../..','api','forEach','slice','\x22\x20}','dirname','alias'];a9_0x81a9=function(){return _0x51a0df;};return a9_0x81a9();}import{TemplateReplacer}from'../utils/template-replacer.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x5d8fcd,_0x46c448='',_0xef2471,_0x3aeacb=![],_0x26a8d6,_0x2e88b9=a9_0xec1ee2(0x18f)){const _0x29dc8c=a9_0xec1ee2,_0x548776=readConfig(),_0x2a2374=_0xef2471||_0x548776?.[_0x29dc8c(0x18a)];if(typeof _0x2a2374!==_0x29dc8c(0x194)||!_0x2a2374)throw new Error(_0x29dc8c(0x191));const _0x5cf7f3=_0x3aeacb?_0x29dc8c(0x17e):'\x22'+_0x2a2374+'\x22',_0xf710ab=typeof _0x548776[_0x29dc8c(0x17b)]===_0x29dc8c(0x194)?_0x548776[_0x29dc8c(0x17b)]:undefined,_0x360b25=_0x26a8d6||_0xf710ab||'online',_0x1ef2a0=_0x360b25!=='online';let _0xc396e5;if(_0x3aeacb)_0x1ef2a0?_0xc396e5=_0x29dc8c(0x17d)+_0x5cf7f3+_0x29dc8c(0x18c)+_0x360b25+_0x29dc8c(0x185):_0xc396e5='';else{const _0x227f22=_0x1ef2a0?_0x29dc8c(0x18c)+_0x360b25+'\x22':'';_0xc396e5=_0x29dc8c(0x195)+_0x2a2374+'\x22'+_0x227f22+'\x20}';}const _0x7e2851=_0x46c448?_0x46c448+_0x29dc8c(0x179):_0x29dc8c(0x182),_0x30ac6b=_0x46c448?_0x46c448+'-client':_0x29dc8c(0x18d),_0x51b9a5=[];_0x5d8fcd[_0x29dc8c(0x183)](_0x95be73=>{const _0x3ebe07=_0x29dc8c;_0x51b9a5['push']({'datasetCode':_0x95be73['datasetCode'],'tableName':_0x95be73[_0x3ebe07(0x170)],'name':_0x95be73[_0x3ebe07(0x16f)]||'','alias':_0x95be73[_0x3ebe07(0x187)]||_0x95be73['key']});});const _0x4b52de=fileURLToPath(import.meta.url),_0x171568=a9_0x5ea810[_0x29dc8c(0x177)](a9_0x5ea810[_0x29dc8c(0x186)](_0x4b52de),_0x29dc8c(0x181)),_0x1f0431=a9_0x5ea810[_0x29dc8c(0x18b)](_0x171568,_0x29dc8c(0x17c)),_0x3670ef=a9_0x5ea810[_0x29dc8c(0x18b)](_0x1f0431,_0x29dc8c(0x196)),_0x3aacde=a9_0x5ea810['join'](_0x1f0431,_0x29dc8c(0x17a)),_0x261532=_0x2e88b9[_0x29dc8c(0x172)]('/')?_0x2e88b9[_0x29dc8c(0x184)](0x0,-0x1):_0x2e88b9;mkdirSync(_0x261532,{'recursive':!![]});const _0x596537=_0x51b9a5[0x0]?.['alias'],_0x11a4b6=readFileSync(_0x3670ef,_0x29dc8c(0x171)),_0x505fed=TemplateReplacer[_0x29dc8c(0x174)](_0x11a4b6,_0x2a2374,_0x51b9a5,_0x596537,_0x7e2851,_0x5cf7f3),_0x478f62=await a9_0x14cb3e[_0x29dc8c(0x175)](_0x505fed,{'parser':_0x29dc8c(0x188)}),_0x504c89=_0x261532+'/'+_0x7e2851+_0x29dc8c(0x189);writeFileSync(_0x504c89,_0x478f62,{'encoding':_0x29dc8c(0x171)});const _0x4f57d1=readFileSync(_0x3aacde,_0x29dc8c(0x171)),_0x4f33c7=TemplateReplacer['replaceApiContent'](_0x4f57d1,_0x2a2374,_0x51b9a5,_0x596537,_0x7e2851,_0x5cf7f3,_0xc396e5),_0x47d7e7=await a9_0x14cb3e['format'](_0x4f33c7,{'parser':_0x29dc8c(0x188)}),_0x3b64c0=_0x261532+'/'+_0x30ac6b+_0x29dc8c(0x189);writeFileSync(_0x3b64c0,_0x47d7e7,{'encoding':_0x29dc8c(0x171)});const _0x1df9c3=_0x51b9a5['length'];return logger['success'](_0x29dc8c(0x178),'API\x20文件生成成功!',undefined,{'apiFile':_0x504c89,'clientFile':_0x3b64c0,'modelCount':_0x1df9c3,'configName':_0x5cf7f3}),{'modelCount':_0x1df9c3,'apiFilePath':_0x504c89,'clientFilePath':_0x3b64c0,'configName':_0x5cf7f3};}
package/lib/api/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2907ff,_0x1d500e){const _0x4d575f=a8_0xb420,_0x27ae39=_0x2907ff();while(!![]){try{const _0x10c0ec=-parseInt(_0x4d575f(0xbd))/0x1+parseInt(_0x4d575f(0xd9))/0x2*(parseInt(_0x4d575f(0xbf))/0x3)+parseInt(_0x4d575f(0xc1))/0x4+-parseInt(_0x4d575f(0xc2))/0x5*(parseInt(_0x4d575f(0xc0))/0x6)+-parseInt(_0x4d575f(0xdc))/0x7*(parseInt(_0x4d575f(0xec))/0x8)+-parseInt(_0x4d575f(0xea))/0x9*(-parseInt(_0x4d575f(0xd7))/0xa)+-parseInt(_0x4d575f(0xc7))/0xb;if(_0x10c0ec===_0x1d500e)break;else _0x27ae39['push'](_0x27ae39['shift']());}catch(_0x548b54){_0x27ae39['push'](_0x27ae39['shift']());}}}(a8_0x1204,0xc8aaf));import{jsx as a8_0x353256}from'react/jsx-runtime';function a8_0xb420(_0x5a2af0,_0x5f25d0){_0x5a2af0=_0x5a2af0-0xb9;const _0x1204ff=a8_0x1204();let _0xb420e2=_0x1204ff[_0x5a2af0];return _0xb420e2;}import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';export async function apiCli(_0x45e93a){const _0x435850=a8_0xb420,_0x36a13b=_0x45e93a['input'][0x1];if(_0x45e93a[_0x435850(0xd3)]['help']){console[_0x435850(0xbe)](_0x435850(0xc9));return;}if(_0x36a13b===_0x435850(0xe4)){_0x45e93a[_0x435850(0xc5)][0x2]&&(console[_0x435850(0xdb)](_0x435850(0xcc)),console['log'](_0x435850(0xe8)),console[_0x435850(0xbe)](_0x435850(0xba)+_0x45e93a[_0x435850(0xc5)][0x2]),process['exit'](0x1));const _0x52d033=getConfigAppCode();let _0x5175f0=_0x45e93a['flags']['appcode'];const _0x5d871b=typeof _0x45e93a['flags'][_0x435850(0xd1)]===_0x435850(0xde)?_0x45e93a[_0x435850(0xd3)][_0x435850(0xd1)]:undefined,_0x59605d=_0x45e93a[_0x435850(0xd3)][_0x435850(0xe6)];!_0x5175f0&&!_0x52d033&&(console[_0x435850(0xdb)](_0x435850(0xe0)),console['log']('!\x20请使用以下方式之一:'),console[_0x435850(0xbe)]('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console[_0x435850(0xbe)](_0x435850(0xd4)),process[_0x435850(0xe1)](0x1)),_0x5175f0&&_0x52d033&&_0x5175f0===_0x52d033&&(console[_0x435850(0xbe)](_0x435850(0xe5)+_0x5175f0+_0x435850(0xcf)),console['log'](_0x435850(0xb9)),_0x5175f0=undefined),render(a8_0x353256(ApiPullUI,{'appCode':_0x5175f0,'env':_0x5d871b,'output':_0x59605d}));}else{if(_0x36a13b===_0x435850(0xbb)){_0x45e93a[_0x435850(0xc5)][0x2]&&(console[_0x435850(0xdb)]('❌\x20错误:不再支持位置参数方式'),console[_0x435850(0xbe)](_0x435850(0xe8)),console[_0x435850(0xbe)]('\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20'+_0x45e93a['input'][0x2]),process[_0x435850(0xe1)](0x1));const _0x445fc7=getConfigAppCode();let _0x5d5252=_0x45e93a[_0x435850(0xd3)]['appcode'];const _0x4d5703=typeof _0x45e93a['flags'][_0x435850(0xd1)]===_0x435850(0xde)?_0x45e93a[_0x435850(0xd3)][_0x435850(0xd1)]:undefined,_0x1ec4c6=_0x45e93a[_0x435850(0xd3)][_0x435850(0xe6)],_0x368b37=_0x45e93a['flags'][_0x435850(0xcd)],_0x4b2a04=_0x45e93a[_0x435850(0xd3)][_0x435850(0xdd)];!_0x5d5252&&!_0x445fc7&&(console[_0x435850(0xdb)](_0x435850(0xe0)),console['log'](_0x435850(0xd6)),console['log']('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console['log'](_0x435850(0xd0)),process[_0x435850(0xe1)](0x1));_0x5d5252&&_0x445fc7&&_0x5d5252===_0x445fc7&&(console[_0x435850(0xbe)](_0x435850(0xe5)+_0x5d5252+'\x1b[0m'),_0x5d5252=undefined);let _0x52610f;if(_0x368b37)try{_0x52610f=JSON[_0x435850(0xc6)](_0x368b37),(typeof _0x52610f!==_0x435850(0xdf)||_0x52610f===null||Array[_0x435850(0xd8)](_0x52610f))&&(console[_0x435850(0xdb)](_0x435850(0xc3)),process[_0x435850(0xe1)](0x1));}catch(_0xa36bb5){console[_0x435850(0xdb)](_0x435850(0xcb)),console[_0x435850(0xdb)](_0x435850(0xeb)+(_0xa36bb5 instanceof Error?_0xa36bb5[_0x435850(0xe3)]:String(_0xa36bb5))),process[_0x435850(0xe1)](0x1);}let _0x39900c;_0x4b2a04&&(_0x39900c=_0x4b2a04[_0x435850(0xd5)](',')['map'](_0x85e9dc=>_0x85e9dc[_0x435850(0xce)]())['filter'](_0x2629f3=>_0x2629f3[_0x435850(0xd2)]>0x0),_0x39900c[_0x435850(0xd2)]===0x0&&(console['error'](_0x435850(0xe7)),process[_0x435850(0xe1)](0x1)),console[_0x435850(0xbe)](_0x435850(0xca)+_0x39900c['join'](',\x20')+_0x435850(0xcf))),render(a8_0x353256(ApiDocUI,{'appCode':_0x5d5252,'env':_0x4d5703,'output':_0x1ec4c6,'extraParams':_0x52610f,'datasetCodes':_0x39900c}));}else console[_0x435850(0xdb)](_0x435850(0xda)+_0x36a13b),console[_0x435850(0xbe)]('Available\x20commands:'),console['log'](_0x435850(0xc8)),console[_0x435850(0xbe)](_0x435850(0xc4)),console[_0x435850(0xbe)]('\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)'),console[_0x435850(0xbe)](_0x435850(0xe2)),console[_0x435850(0xbe)](''),console[_0x435850(0xbe)](_0x435850(0xbc)),console[_0x435850(0xbe)]('\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode'),console['log']('\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)'),console[_0x435850(0xbe)](_0x435850(0xe9)),process[_0x435850(0xe1)](0x1);}}function a8_0x1204(){const _0x2e56ec=['\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','16911tZoAbb','\x20\x20错误:\x20','5084664SEOoyH','\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20','doc','\x20\x20lovrabet\x20api\x20doc\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生成\x20API\x20文档','116507ftoYUT','log','137787cIUrhw','20550mqdATX','3613472MRsesW','465XfWDlS','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','input','parse','2000262hDrmpo','\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件','\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a','\x1b[90m*\x20仅生成指定数据集的文档:\x20','×\x20--params\x20参数不是有效的\x20JSON\x20格式','❌\x20错误:不再支持位置参数方式','params','trim','\x1b[0m','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','env','length','flags','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','split','!\x20请使用以下方式之一:','5010YuboEn','isArray','10XkVHCm','Unknown\x20api\x20command:\x20','error','7qdVloS','datasetcode','string','object','×\x20未配置\x20AppCode','exit','\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','message','pull','\x1b[90m*\x20使用配置的应用AppCode:\x20','output','×\x20--datasetcode\x20参数不能为空','请使用\x20--appcode\x20参数,例如:'];a8_0x1204=function(){return _0x2e56ec;};return a8_0x1204();}
1
+ (function(_0xf401c1,_0x5e5bd7){const _0x3de323=a10_0x433c,_0x5a40f3=_0xf401c1();while(!![]){try{const _0x53ccfc=parseInt(_0x3de323(0xd0))/0x1+-parseInt(_0x3de323(0xae))/0x2*(parseInt(_0x3de323(0xbb))/0x3)+-parseInt(_0x3de323(0xbe))/0x4+-parseInt(_0x3de323(0xcf))/0x5*(parseInt(_0x3de323(0xaf))/0x6)+-parseInt(_0x3de323(0xd9))/0x7+-parseInt(_0x3de323(0xcb))/0x8*(parseInt(_0x3de323(0xc7))/0x9)+-parseInt(_0x3de323(0xd8))/0xa*(-parseInt(_0x3de323(0xb4))/0xb);if(_0x53ccfc===_0x5e5bd7)break;else _0x5a40f3['push'](_0x5a40f3['shift']());}catch(_0x2aa5f7){_0x5a40f3['push'](_0x5a40f3['shift']());}}}(a10_0x70b7,0x2c38b));import{jsx as a10_0x290c75}from'react/jsx-runtime';function a10_0x433c(_0x171373,_0x31f8c4){_0x171373=_0x171373-0xa6;const _0x70b749=a10_0x70b7();let _0x433c76=_0x70b749[_0x171373];return _0x433c76;}import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';function a10_0x70b7(){const _0x1d4ec5=['\x20\x20lovrabet\x20api\x20doc\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生成\x20API\x20文档','env','\x1b[0m','\x20\x20错误:\x20','!\x20请使用以下方式之一:','459ePDlIt','\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)','map','321020dwPWbS','\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','filter','\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a','log','appcode','input','output','115029OoZykd','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20','doc','exit','168ISHQWK','help','flags','Unknown\x20api\x20command:\x20','40Yhaelq','179388JOLlzb','\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20','parse','length','\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','split','2218610bzadeT','2078447UJOhhk','error','\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','params','×\x20未配置\x20AppCode','×\x20--params\x20参数不是有效的\x20JSON\x20格式','message','pull','join','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','2818KxFbNN','184806Rvvwwx','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件','isArray','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','55UNCend','\x1b[90m*\x20使用配置的应用AppCode:\x20'];a10_0x70b7=function(){return _0x1d4ec5;};return a10_0x70b7();}export async function apiCli(_0x4f5eb3){const _0x39f14f=a10_0x433c,_0xb5a810=_0x4f5eb3[_0x39f14f(0xc5)][0x1];if(_0x4f5eb3['flags'][_0x39f14f(0xcc)]){console[_0x39f14f(0xc3)](_0x39f14f(0xc2));return;}if(_0xb5a810===_0x39f14f(0xab)){_0x4f5eb3['input'][0x2]&&(console[_0x39f14f(0xda)]('❌\x20错误:不再支持位置参数方式'),console[_0x39f14f(0xc3)]('请使用\x20--appcode\x20参数,例如:'),console['log'](_0x39f14f(0xd3)+_0x4f5eb3[_0x39f14f(0xc5)][0x2]),process['exit'](0x1));const _0xaf765b=getConfigAppCode();let _0x40d715=_0x4f5eb3['flags'][_0x39f14f(0xc4)];const _0x1a5385=typeof _0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xb7)]==='string'?_0x4f5eb3['flags'][_0x39f14f(0xb7)]:undefined,_0x251e59=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc6)];!_0x40d715&&!_0xaf765b&&(console[_0x39f14f(0xda)](_0x39f14f(0xa8)),console['log'](_0x39f14f(0xba)),console[_0x39f14f(0xc3)]('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console[_0x39f14f(0xc3)](_0x39f14f(0xc0)),process[_0x39f14f(0xca)](0x1)),_0x40d715&&_0xaf765b&&_0x40d715===_0xaf765b&&(console[_0x39f14f(0xc3)](_0x39f14f(0xb5)+_0x40d715+'\x1b[0m'),console['log'](_0x39f14f(0xbf)),_0x40d715=undefined),render(a10_0x290c75(ApiPullUI,{'appCode':_0x40d715,'env':_0x1a5385,'output':_0x251e59}));}else{if(_0xb5a810===_0x39f14f(0xc9)){_0x4f5eb3[_0x39f14f(0xc5)][0x2]&&(console[_0x39f14f(0xda)]('❌\x20错误:不再支持位置参数方式'),console['log']('请使用\x20--appcode\x20参数,例如:'),console[_0x39f14f(0xc3)](_0x39f14f(0xc8)+_0x4f5eb3[_0x39f14f(0xc5)][0x2]),process[_0x39f14f(0xca)](0x1));const _0x4ee8ba=getConfigAppCode();let _0x1fb2e7=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc4)];const _0x5d4ad0=typeof _0x4f5eb3[_0x39f14f(0xcd)]['env']==='string'?_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xb7)]:undefined,_0xb1df7=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xc6)],_0x4555ae=_0x4f5eb3[_0x39f14f(0xcd)][_0x39f14f(0xa7)],_0x3bc6b6=_0x4f5eb3['flags']['datasetcode'];!_0x1fb2e7&&!_0x4ee8ba&&(console[_0x39f14f(0xda)](_0x39f14f(0xa8)),console['log']('!\x20请使用以下方式之一:'),console[_0x39f14f(0xc3)](_0x39f14f(0xb3)),console['log'](_0x39f14f(0xd2)),process[_0x39f14f(0xca)](0x1));_0x1fb2e7&&_0x4ee8ba&&_0x1fb2e7===_0x4ee8ba&&(console[_0x39f14f(0xc3)](_0x39f14f(0xb5)+_0x1fb2e7+_0x39f14f(0xb8)),_0x1fb2e7=undefined);let _0x29c1c2;if(_0x4555ae)try{_0x29c1c2=JSON[_0x39f14f(0xd4)](_0x4555ae),(typeof _0x29c1c2!=='object'||_0x29c1c2===null||Array[_0x39f14f(0xb2)](_0x29c1c2))&&(console[_0x39f14f(0xda)](_0x39f14f(0xad)),process['exit'](0x1));}catch(_0x18029e){console[_0x39f14f(0xda)](_0x39f14f(0xa9)),console[_0x39f14f(0xda)](_0x39f14f(0xb9)+(_0x18029e instanceof Error?_0x18029e[_0x39f14f(0xaa)]:String(_0x18029e))),process[_0x39f14f(0xca)](0x1);}let _0x279eec;_0x3bc6b6&&(_0x279eec=_0x3bc6b6[_0x39f14f(0xd7)](',')[_0x39f14f(0xbd)](_0x418322=>_0x418322['trim']())[_0x39f14f(0xc1)](_0x11abcb=>_0x11abcb[_0x39f14f(0xd5)]>0x0),_0x279eec[_0x39f14f(0xd5)]===0x0&&(console[_0x39f14f(0xda)]('×\x20--datasetcode\x20参数不能为空'),process[_0x39f14f(0xca)](0x1)),console[_0x39f14f(0xc3)]('\x1b[90m*\x20仅生成指定数据集的文档:\x20'+_0x279eec[_0x39f14f(0xac)](',\x20')+_0x39f14f(0xb8))),render(a10_0x290c75(ApiDocUI,{'appCode':_0x1fb2e7,'env':_0x5d4ad0,'output':_0xb1df7,'extraParams':_0x29c1c2,'datasetCodes':_0x279eec}));}else console['error'](_0x39f14f(0xce)+_0xb5a810),console[_0x39f14f(0xc3)]('Available\x20commands:'),console['log'](_0x39f14f(0xb1)),console['log']('\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode'),console[_0x39f14f(0xc3)](_0x39f14f(0xd1)),console[_0x39f14f(0xc3)](_0x39f14f(0xd6)),console[_0x39f14f(0xc3)](''),console[_0x39f14f(0xc3)](_0x39f14f(0xb6)),console['log'](_0x39f14f(0xb0)),console[_0x39f14f(0xc3)](_0x39f14f(0xbc)),console['log'](_0x39f14f(0xa6)),process['exit'](0x1);}}
@@ -1 +1 @@
1
- function a9_0x3915(){const _0x301831=['7968590uUHVhg','*\x20正在处理\x20','create-api-pull','√\x20成功拉取\x20','online','-api','91wjNmsf','323976FpowHZ','.ts\x20-\x20模型配置文件','58581IzHoFX','modelCount','146230XUMOvQ','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','length','1JjSoqM','810lsOEmD','584724RsAYxY','api','\x20个数据集...','\x20\x20\x20•\x20','.ts\x20-\x20客户端实例文件','error','66jVNHUf','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','API\x20配置拉取异常:\x20','104UKUKjJ','\x20个模型','999065vOSnRL','info','chdir','env','trim','74466CMHLEt','test','-client','*\x20开始生成\x20API\x20配置文件:','\x20个数据集,生成\x20','client','36eQKqkq','string','13cDnkuF','log'];a9_0x3915=function(){return _0x301831;};return a9_0x3915();}(function(_0x48c58e,_0x498ab5){const _0x6c9d18=a9_0x300f,_0x4bc099=_0x48c58e();while(!![]){try{const _0x5b3f22=-parseInt(_0x6c9d18(0x1c4))/0x1*(parseInt(_0x6c9d18(0x1c1))/0x2)+parseInt(_0x6c9d18(0x1bf))/0x3*(parseInt(_0x6c9d18(0x1cf))/0x4)+-parseInt(_0x6c9d18(0x1d1))/0x5*(-parseInt(_0x6c9d18(0x1b2))/0x6)+-parseInt(_0x6c9d18(0x1bc))/0x7*(parseInt(_0x6c9d18(0x1bd))/0x8)+parseInt(_0x6c9d18(0x1ac))/0x9*(-parseInt(_0x6c9d18(0x1c5))/0xa)+-parseInt(_0x6c9d18(0x1cc))/0xb*(parseInt(_0x6c9d18(0x1c6))/0xc)+-parseInt(_0x6c9d18(0x1b4))/0xd*(-parseInt(_0x6c9d18(0x1b6))/0xe);if(_0x5b3f22===_0x498ab5)break;else _0x4bc099['push'](_0x4bc099['shift']());}catch(_0x39c579){_0x4bc099['push'](_0x4bc099['shift']());}}}(a9_0x3915,0xae3a1));import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';function a9_0x300f(_0x29feda,_0x399361){_0x29feda=_0x29feda-0x1ac;const _0x3915d6=a9_0x3915();let _0x300fc5=_0x3915d6[_0x29feda];return _0x300fc5;}export async function pullApiSilent(_0x8d1f9b,_0x507f63,_0x1adc32,_0x4a2589){const _0x3509ec=a9_0x300f;let _0x2335de;try{const _0xa2feea=_0x507f63?.[_0x3509ec(0x1d5)]()||'';if(_0xa2feea){const _0x4827ab=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x4827ab[_0x3509ec(0x1ad)](_0xa2feea))return console[_0x3509ec(0x1cb)](_0x3509ec(0x1c2)),![];}_0x1adc32&&(_0x2335de=process['cwd'](),process[_0x3509ec(0x1d3)](_0x1adc32));const _0x51bc1d=readConfig(),_0x56f107=typeof _0x51bc1d[_0x3509ec(0x1d4)]===_0x3509ec(0x1b3)?_0x51bc1d[_0x3509ec(0x1d4)]:undefined,_0x55626a=_0x4a2589||_0x56f107||_0x3509ec(0x1ba);initEnv(_0x55626a),console[_0x3509ec(0x1b5)](_0x3509ec(0x1cd)+_0x55626a+')');const {configArray:_0x452581}=await fetchModelList(_0x8d1f9b),_0x2e329d=_0xa2feea?_0xa2feea+_0x3509ec(0x1bb):_0x3509ec(0x1c7),_0x31e1df=_0xa2feea?_0xa2feea+_0x3509ec(0x1ae):_0x3509ec(0x1b1);console[_0x3509ec(0x1b5)](_0x3509ec(0x1af)),console[_0x3509ec(0x1b5)](_0x3509ec(0x1c9)+_0x2e329d+_0x3509ec(0x1be)),console[_0x3509ec(0x1b5)](_0x3509ec(0x1c9)+_0x31e1df+_0x3509ec(0x1ca)),console[_0x3509ec(0x1b5)](_0x3509ec(0x1b7)+_0x452581[_0x3509ec(0x1c3)]+_0x3509ec(0x1c8));const _0xd33048=await generateApiFile(_0x452581,_0xa2feea,_0x8d1f9b,!![],_0x55626a);return console[_0x3509ec(0x1b5)](_0x3509ec(0x1b9)+_0x452581[_0x3509ec(0x1c3)]+_0x3509ec(0x1b0)+_0xd33048[_0x3509ec(0x1c0)]+_0x3509ec(0x1d0)),_0x1adc32&&logger[_0x3509ec(0x1d2)](_0x3509ec(0x1b8),'API\x20配置拉取成功:\x20'+_0x8d1f9b,{'projectPath':_0x1adc32,'appCode':_0x8d1f9b,'datasetCount':_0x452581[_0x3509ec(0x1c3)],'filePrefix':_0xa2feea}),!![];}catch(_0x4696df){const _0x1ade4a=_0x4696df instanceof Error?_0x4696df['message']:String(_0x4696df);return console[_0x3509ec(0x1cb)]('×\x20API\x20配置拉取异常:',_0x1ade4a),_0x1adc32&&logger['error'](_0x3509ec(0x1b8),_0x3509ec(0x1ce)+_0x1ade4a,{'appCode':_0x8d1f9b,'projectPath':_0x1adc32}),![];}finally{_0x2335de&&process[_0x3509ec(0x1d3)](_0x2335de);}}
1
+ (function(_0x560d21,_0x404426){const _0x5d90d7=a11_0x5cb2,_0x35b617=_0x560d21();while(!![]){try{const _0x52efc1=-parseInt(_0x5d90d7(0x14a))/0x1+-parseInt(_0x5d90d7(0x149))/0x2+parseInt(_0x5d90d7(0x14c))/0x3+-parseInt(_0x5d90d7(0x145))/0x4+parseInt(_0x5d90d7(0x15a))/0x5+-parseInt(_0x5d90d7(0x150))/0x6+parseInt(_0x5d90d7(0x156))/0x7;if(_0x52efc1===_0x404426)break;else _0x35b617['push'](_0x35b617['shift']());}catch(_0x2b2d9b){_0x35b617['push'](_0x35b617['shift']());}}}(a11_0x4055,0x73b66));import{readConfig}from'../utils/config.js';function a11_0x4055(){const _0x24da25=['log','error','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','5457235adoizk','.ts\x20-\x20模型配置文件','-api','create-api-pull','2383585lbSPbo','cwd','chdir','\x20个数据集...','\x20个数据集,生成\x20','API\x20配置拉取成功:\x20','trim','env','×\x20API\x20配置拉取异常:','length','1478104QDiXwt','online','client','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','137896zSIieH','616220ezWcvC','modelCount','2344887CDLOvC','api','test','√\x20成功拉取\x20','3055794jDiSXO','info','*\x20正在处理\x20'];a11_0x4055=function(){return _0x24da25;};return a11_0x4055();}import{initEnv}from'../constant/env.js';function a11_0x5cb2(_0x409556,_0x7ca474){_0x409556=_0x409556-0x143;const _0x4055d7=a11_0x4055();let _0x5cb2f3=_0x4055d7[_0x409556];return _0x5cb2f3;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x38b566,_0x274cd7,_0x25a288,_0x53b217){const _0xefe752=a11_0x5cb2;let _0x37e4a2;try{const _0x276659=_0x274cd7?.[_0xefe752(0x160)]()||'';if(_0x276659){const _0x9cf9ed=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x9cf9ed[_0xefe752(0x14e)](_0x276659))return console[_0xefe752(0x154)](_0xefe752(0x155)),![];}_0x25a288&&(_0x37e4a2=process[_0xefe752(0x15b)](),process[_0xefe752(0x15c)](_0x25a288));const _0x286f91=readConfig(),_0xd3a16f=typeof _0x286f91[_0xefe752(0x161)]==='string'?_0x286f91[_0xefe752(0x161)]:undefined,_0x56400d=_0x53b217||_0xd3a16f||_0xefe752(0x146);initEnv(_0x56400d),console[_0xefe752(0x153)](_0xefe752(0x148)+_0x56400d+')');const {configArray:_0x509f5b}=await fetchModelList(_0x38b566),_0xcc813=_0x276659?_0x276659+_0xefe752(0x158):_0xefe752(0x14d),_0x337f91=_0x276659?_0x276659+'-client':_0xefe752(0x147);console['log']('*\x20开始生成\x20API\x20配置文件:'),console['log']('\x20\x20\x20•\x20'+_0xcc813+_0xefe752(0x157)),console[_0xefe752(0x153)]('\x20\x20\x20•\x20'+_0x337f91+'.ts\x20-\x20客户端实例文件'),console[_0xefe752(0x153)](_0xefe752(0x152)+_0x509f5b[_0xefe752(0x144)]+_0xefe752(0x15d));const _0x1f6c30=await generateApiFile(_0x509f5b,_0x276659,_0x38b566,!![],_0x56400d);return console[_0xefe752(0x153)](_0xefe752(0x14f)+_0x509f5b[_0xefe752(0x144)]+_0xefe752(0x15e)+_0x1f6c30[_0xefe752(0x14b)]+'\x20个模型'),_0x25a288&&logger[_0xefe752(0x151)](_0xefe752(0x159),_0xefe752(0x15f)+_0x38b566,{'projectPath':_0x25a288,'appCode':_0x38b566,'datasetCount':_0x509f5b[_0xefe752(0x144)],'filePrefix':_0x276659}),!![];}catch(_0x5c9a41){const _0xe57dd9=_0x5c9a41 instanceof Error?_0x5c9a41['message']:String(_0x5c9a41);return console[_0xefe752(0x154)](_0xefe752(0x143),_0xe57dd9),_0x25a288&&logger['error']('create-api-pull','API\x20配置拉取异常:\x20'+_0xe57dd9,{'appCode':_0x38b566,'projectPath':_0x25a288}),![];}finally{_0x37e4a2&&process[_0xefe752(0x15c)](_0x37e4a2);}}