@lovrabet/cli 1.3.2 → 1.3.3

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 (85) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -1
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/i18n/I18nProvider.js +1 -0
  54. package/lib/i18n/hooks.js +1 -0
  55. package/lib/i18n/index.js +1 -0
  56. package/lib/i18n/locales/en-US.js +1 -0
  57. package/lib/i18n/locales/zh-CN.js +1 -0
  58. package/lib/init/main.js +1 -1
  59. package/lib/mcp/McpInstallUI.js +1 -1
  60. package/lib/mcp/claude.js +1 -1
  61. package/lib/mcp/cursor.js +1 -1
  62. package/lib/mcp/main.js +1 -1
  63. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  64. package/lib/mcp/mcp-installer.js +1 -1
  65. package/lib/skills/SkillInstallUI.js +1 -1
  66. package/lib/skills/main.js +1 -1
  67. package/lib/skills/skill-install-non-interactive.js +1 -1
  68. package/lib/skills/skill-installer.js +1 -1
  69. package/lib/ui/IDESelector.js +1 -1
  70. package/lib/ui/useIDESelection.js +1 -1
  71. package/lib/utils/ai_config.js +1 -1
  72. package/lib/utils/cdn-config.js +1 -1
  73. package/lib/utils/check-sdk-version.js +1 -1
  74. package/lib/utils/cli-version-check.js +1 -1
  75. package/lib/utils/config.js +1 -1
  76. package/lib/utils/copy-directory.js +1 -1
  77. package/lib/utils/file-utils.js +1 -1
  78. package/lib/utils/guides-cdn.js +1 -1
  79. package/lib/utils/http-client.js +1 -1
  80. package/lib/utils/logger.js +1 -1
  81. package/lib/utils/router-updater.js +1 -1
  82. package/lib/utils/rules-cdn.js +1 -1
  83. package/lib/utils/sleep.js +1 -1
  84. package/lib/utils/template-replacer.js +1 -1
  85. package/package.json +3 -1
@@ -1 +1 @@
1
- const a78_0x49247f=a78_0x2f29;function a78_0x2f29(_0x274327,_0x16bbf0){_0x274327=_0x274327-0xe4;const _0x52a82d=a78_0x52a8();let _0x2f297e=_0x52a82d[_0x274327];return _0x2f297e;}(function(_0x81de78,_0x5e6492){const _0x271d4d=a78_0x2f29,_0x52d919=_0x81de78();while(!![]){try{const _0xd93e49=parseInt(_0x271d4d(0xf9))/0x1+parseInt(_0x271d4d(0xee))/0x2*(-parseInt(_0x271d4d(0xf6))/0x3)+parseInt(_0x271d4d(0x112))/0x4*(-parseInt(_0x271d4d(0xfa))/0x5)+parseInt(_0x271d4d(0xea))/0x6*(-parseInt(_0x271d4d(0xf2))/0x7)+-parseInt(_0x271d4d(0xfb))/0x8+-parseInt(_0x271d4d(0xfd))/0x9*(parseInt(_0x271d4d(0x114))/0xa)+parseInt(_0x271d4d(0x10e))/0xb;if(_0xd93e49===_0x5e6492)break;else _0x52d919['push'](_0x52d919['shift']());}catch(_0x455699){_0x52d919['push'](_0x52d919['shift']());}}}(a78_0x52a8,0x67d5e));function a78_0x52a8(){const _0x5c0bac=['import\x20','indexOf','charAt','toLowerCase','6qKkgar','now','success','addPageRoute','148opUOKU','index','路由配置更新失败','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','5846638Dcxqcy','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','未找到路由配置的\x20children\x20数组','join','16941jQkslf','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','promises','665597RxBWdV','43115uNVIVk','970048WwsZNQ','slice','1705203DxwAaX','路由配置更新完成','match','router','src','utf8','开始更新路由配置','路由文件不存在:\x20','error','map','toUpperCase','index.tsx','routerFilePath','previewChanges','info','toComponentName','lastIndexOf','22524051KyKuRC','path:\x20\x22','includes','existsSync','248ZAtjfk','message','20WYLGlw','addRoute','length','addImport'];a78_0x52a8=function(){return _0x5c0bac;};return a78_0x52a8();}import a78_0x4679d3 from'node:fs';import a78_0x293b14 from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a78_0x49247f(0x109)];constructor(_0x35b1a7){const _0x4479a5=a78_0x49247f;this[_0x4479a5(0x109)]=a78_0x293b14[_0x4479a5(0xf5)](_0x35b1a7,_0x4479a5(0x101),_0x4479a5(0x100),_0x4479a5(0x108));}async[a78_0x49247f(0xed)](_0x21e173,_0x333ba8){const _0x441ee1=a78_0x49247f;if(!a78_0x4679d3[_0x441ee1(0x111)](this[_0x441ee1(0x109)]))throw new Error(_0x441ee1(0x104)+this[_0x441ee1(0x109)]);const _0x4c893b=Date[_0x441ee1(0xeb)]();logger[_0x441ee1(0x10b)](_0x441ee1(0x100),_0x441ee1(0x103),{'pageName':_0x21e173,'routePath':_0x333ba8,'file':this[_0x441ee1(0x109)]});try{const _0x32c54e=await a78_0x4679d3[_0x441ee1(0xf8)]['readFile'](this[_0x441ee1(0x109)],_0x441ee1(0x102)),_0x3337de=this[_0x441ee1(0x10c)](_0x21e173),_0x3e1a40=this[_0x441ee1(0xe5)](_0x32c54e,_0x3337de,_0x21e173),_0x2df407=this[_0x441ee1(0x115)](_0x3e1a40,_0x333ba8,_0x3337de);await a78_0x4679d3[_0x441ee1(0xf8)]['writeFile'](this['routerFilePath'],_0x2df407,_0x441ee1(0x102));const _0x5764e1=Date[_0x441ee1(0xeb)]()-_0x4c893b;logger[_0x441ee1(0xec)]('router',_0x441ee1(0xfe),_0x5764e1,{'pageName':_0x21e173,'routePath':_0x333ba8,'componentName':_0x3337de});}catch(_0x25d50c){const _0x219aeb=Date[_0x441ee1(0xeb)]()-_0x4c893b;logger[_0x441ee1(0x105)]('router',_0x441ee1(0xf0),{'pageName':_0x21e173,'routePath':_0x333ba8,'error':_0x25d50c instanceof Error?_0x25d50c[_0x441ee1(0x113)]:String(_0x25d50c),'duration':_0x219aeb});throw _0x25d50c;}}[a78_0x49247f(0x10c)](_0x27ec99){const _0x225019=a78_0x49247f;return _0x27ec99['split']('-')[_0x225019(0x106)](_0x32d3cf=>_0x32d3cf[_0x225019(0xe8)](0x0)[_0x225019(0x107)]()+_0x32d3cf[_0x225019(0xfc)](0x1)[_0x225019(0xe9)]())[_0x225019(0xf5)]('');}[a78_0x49247f(0xe5)](_0x22c575,_0x35ddaa,_0x5841ba){const _0x3cf9fa=a78_0x49247f,_0x5f30ab=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x2e6d11=_0x22c575[_0x3cf9fa(0xff)](_0x5f30ab)||[],_0x416d76=_0x3cf9fa(0xe6)+_0x35ddaa+'\x20from\x20\x22../pages/'+_0x5841ba+'\x22;';if(_0x22c575[_0x3cf9fa(0x110)](_0x416d76))return _0x22c575;if(_0x2e6d11[_0x3cf9fa(0xe4)]>0x0){const _0x366c4c=_0x2e6d11[_0x2e6d11[_0x3cf9fa(0xe4)]-0x1];if(_0x366c4c){const _0x2395e8=_0x22c575[_0x3cf9fa(0x10d)](_0x366c4c),_0x1ce756=_0x2395e8+_0x366c4c[_0x3cf9fa(0xe4)];return _0x22c575[_0x3cf9fa(0xfc)](0x0,_0x1ce756)+_0x416d76+'\x0a'+_0x22c575[_0x3cf9fa(0xfc)](_0x1ce756);}}const _0x2f739a=_0x22c575[_0x3cf9fa(0xff)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x2f739a&&_0x2f739a['index']!==undefined){const _0x532067=_0x2f739a[_0x3cf9fa(0xef)]+_0x2f739a[0x0][_0x3cf9fa(0xe4)];return _0x22c575[_0x3cf9fa(0xfc)](0x0,_0x532067)+_0x416d76+'\x0a'+_0x22c575[_0x3cf9fa(0xfc)](_0x532067);}return _0x22c575;}['addRoute'](_0x453b47,_0x5e51bf,_0x2b3f89){const _0x5e66c5=a78_0x49247f,_0x5adb56=_0x5e66c5(0xf7)+_0x5e51bf+_0x5e66c5(0xf3)+_0x2b3f89+_0x5e66c5(0xf1);if(_0x453b47[_0x5e66c5(0x110)](_0x5e66c5(0x10f)+_0x5e51bf+'\x22'))return _0x453b47;const _0x4c539f=/children:\s*\[([\s\S]*?)\]/,_0x509cfc=_0x453b47[_0x5e66c5(0xff)](_0x4c539f);if(!_0x509cfc||_0x509cfc[_0x5e66c5(0xef)]===undefined)throw new Error(_0x5e66c5(0xf4));const _0xef63ca=_0x509cfc[0x1],_0x42dfac=_0x509cfc[_0x5e66c5(0xef)]+_0x509cfc[0x0][_0x5e66c5(0xe7)]('[')+0x1,_0x57f1f9=_0xef63ca?.[_0x5e66c5(0xff)](/\{[\s\S]*?\},/g)||[];if(_0x57f1f9['length']>0x0){const _0x268fc6=_0x57f1f9[_0x57f1f9[_0x5e66c5(0xe4)]-0x1];if(_0x268fc6){const _0x26a3ed=_0x453b47[_0x5e66c5(0x10d)](_0x268fc6),_0x33cc81=_0x26a3ed+_0x268fc6[_0x5e66c5(0xe4)];return _0x453b47[_0x5e66c5(0xfc)](0x0,_0x33cc81)+'\x0a'+_0x5adb56+_0x453b47[_0x5e66c5(0xfc)](_0x33cc81);}}return _0x453b47['slice'](0x0,_0x42dfac)+'\x0a'+_0x5adb56+_0x453b47[_0x5e66c5(0xfc)](_0x42dfac);}async[a78_0x49247f(0x10a)](_0x3fab62,_0x48ceab){const _0x527618=a78_0x49247f;if(!a78_0x4679d3[_0x527618(0x111)](this[_0x527618(0x109)]))throw new Error('路由文件不存在:\x20'+this[_0x527618(0x109)]);const _0x3e08ed=await a78_0x4679d3['promises']['readFile'](this[_0x527618(0x109)],'utf8'),_0x1799ec=this['toComponentName'](_0x3fab62);let _0x48800b=this[_0x527618(0xe5)](_0x3e08ed,_0x1799ec,_0x3fab62);return _0x48800b=this[_0x527618(0x115)](_0x48800b,_0x48ceab,_0x1799ec),_0x48800b;}}
1
+ function a83_0x56eb(_0x212c13,_0x1e816d){_0x212c13=_0x212c13-0x1ec;const _0x2f0ba4=a83_0x2f0b();let _0x56eb4f=_0x2f0ba4[_0x212c13];return _0x56eb4f;}function a83_0x2f0b(){const _0x3bf121=['addPageRoute','path:\x20\x22','4514496UKUkXI','success','split','indexOf','map','index','lastIndexOf','\x20from\x20\x22../pages/','3qFvGiG','writeFile','4951062vRbtlp','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','match','路由文件不存在:\x20','25022630VyWjLP','router','includes','路由配置更新完成','charAt','error','info','previewChanges','toComponentName','src','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','771146BzfZEm','开始更新路由配置','3553890kExsBv','addRoute','length','routerFilePath','4mpKKqL','join','readFile','143507TyyXlL','now','existsSync','371889hxlOMj','import\x20','slice','路由配置更新失败','6GKXpbY','toLowerCase','toUpperCase','message','utf8','addImport'];a83_0x2f0b=function(){return _0x3bf121;};return a83_0x2f0b();}const a83_0x2680c8=a83_0x56eb;(function(_0x1d3f46,_0x5cc71c){const _0x4a862c=a83_0x56eb,_0x42348f=_0x1d3f46();while(!![]){try{const _0x4c235e=parseInt(_0x4a862c(0x1fd))/0x1+parseInt(_0x4a862c(0x1f4))/0x2*(-parseInt(_0x4a862c(0x214))/0x3)+parseInt(_0x4a862c(0x1fa))/0x4*(-parseInt(_0x4a862c(0x1f6))/0x5)+-parseInt(_0x4a862c(0x204))/0x6*(-parseInt(_0x4a862c(0x200))/0x7)+-parseInt(_0x4a862c(0x20c))/0x8+-parseInt(_0x4a862c(0x216))/0x9+parseInt(_0x4a862c(0x21a))/0xa;if(_0x4c235e===_0x5cc71c)break;else _0x42348f['push'](_0x42348f['shift']());}catch(_0x4957f7){_0x42348f['push'](_0x42348f['shift']());}}}(a83_0x2f0b,0x772b4));import a83_0x288469 from'node:fs';import a83_0x34e871 from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a83_0x2680c8(0x1f9)];constructor(_0x347441){const _0x1a5b75=a83_0x2680c8;this[_0x1a5b75(0x1f9)]=a83_0x34e871[_0x1a5b75(0x1fb)](_0x347441,_0x1a5b75(0x1f2),_0x1a5b75(0x21b),'index.tsx');}async[a83_0x2680c8(0x20a)](_0x4bc333,_0x5aa689){const _0x28efb7=a83_0x2680c8;if(!a83_0x288469[_0x28efb7(0x1ff)](this[_0x28efb7(0x1f9)]))throw new Error('路由文件不存在:\x20'+this[_0x28efb7(0x1f9)]);const _0x332d04=Date[_0x28efb7(0x1fe)]();logger[_0x28efb7(0x1ef)](_0x28efb7(0x21b),_0x28efb7(0x1f5),{'pageName':_0x4bc333,'routePath':_0x5aa689,'file':this[_0x28efb7(0x1f9)]});try{const _0xe6f719=await a83_0x288469['promises'][_0x28efb7(0x1fc)](this[_0x28efb7(0x1f9)],_0x28efb7(0x208)),_0x334f3f=this[_0x28efb7(0x1f1)](_0x4bc333),_0x5b90b1=this[_0x28efb7(0x209)](_0xe6f719,_0x334f3f,_0x4bc333),_0x1a3be8=this[_0x28efb7(0x1f7)](_0x5b90b1,_0x5aa689,_0x334f3f);await a83_0x288469['promises'][_0x28efb7(0x215)](this[_0x28efb7(0x1f9)],_0x1a3be8,_0x28efb7(0x208));const _0x3becb7=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x20d)](_0x28efb7(0x21b),_0x28efb7(0x1ec),_0x3becb7,{'pageName':_0x4bc333,'routePath':_0x5aa689,'componentName':_0x334f3f});}catch(_0x572655){const _0x3aab99=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x1ee)](_0x28efb7(0x21b),_0x28efb7(0x203),{'pageName':_0x4bc333,'routePath':_0x5aa689,'error':_0x572655 instanceof Error?_0x572655[_0x28efb7(0x207)]:String(_0x572655),'duration':_0x3aab99});throw _0x572655;}}['toComponentName'](_0xb145de){const _0x33e1e6=a83_0x2680c8;return _0xb145de[_0x33e1e6(0x20e)]('-')[_0x33e1e6(0x210)](_0x3d3e42=>_0x3d3e42[_0x33e1e6(0x1ed)](0x0)[_0x33e1e6(0x206)]()+_0x3d3e42['slice'](0x1)[_0x33e1e6(0x205)]())[_0x33e1e6(0x1fb)]('');}[a83_0x2680c8(0x209)](_0x4cd345,_0x270b3d,_0x144499){const _0x2e2ebf=a83_0x2680c8,_0x3c6297=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x32179a=_0x4cd345[_0x2e2ebf(0x218)](_0x3c6297)||[],_0x2b8c96=_0x2e2ebf(0x201)+_0x270b3d+_0x2e2ebf(0x213)+_0x144499+'\x22;';if(_0x4cd345[_0x2e2ebf(0x21c)](_0x2b8c96))return _0x4cd345;if(_0x32179a[_0x2e2ebf(0x1f8)]>0x0){const _0x1e375d=_0x32179a[_0x32179a[_0x2e2ebf(0x1f8)]-0x1];if(_0x1e375d){const _0x5eabef=_0x4cd345['lastIndexOf'](_0x1e375d),_0x52b36c=_0x5eabef+_0x1e375d[_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x52b36c)+_0x2b8c96+'\x0a'+_0x4cd345[_0x2e2ebf(0x202)](_0x52b36c);}}const _0x3b8cf2=_0x4cd345[_0x2e2ebf(0x218)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x3b8cf2&&_0x3b8cf2['index']!==undefined){const _0x33c653=_0x3b8cf2['index']+_0x3b8cf2[0x0][_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x33c653)+_0x2b8c96+'\x0a'+_0x4cd345['slice'](_0x33c653);}return _0x4cd345;}['addRoute'](_0x4d48a3,_0x4ddea2,_0x18bd85){const _0x56240b=a83_0x2680c8,_0x471fe1=_0x56240b(0x1f3)+_0x4ddea2+_0x56240b(0x217)+_0x18bd85+'\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},';if(_0x4d48a3[_0x56240b(0x21c)](_0x56240b(0x20b)+_0x4ddea2+'\x22'))return _0x4d48a3;const _0x5d3449=/children:\s*\[([\s\S]*?)\]/,_0x870d86=_0x4d48a3[_0x56240b(0x218)](_0x5d3449);if(!_0x870d86||_0x870d86['index']===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x23b177=_0x870d86[0x1],_0x516bd0=_0x870d86[_0x56240b(0x211)]+_0x870d86[0x0][_0x56240b(0x20f)]('[')+0x1,_0x15dd83=_0x23b177?.[_0x56240b(0x218)](/\{[\s\S]*?\},/g)||[];if(_0x15dd83[_0x56240b(0x1f8)]>0x0){const _0x20d6e4=_0x15dd83[_0x15dd83[_0x56240b(0x1f8)]-0x1];if(_0x20d6e4){const _0x53fafa=_0x4d48a3[_0x56240b(0x212)](_0x20d6e4),_0x9e22fa=_0x53fafa+_0x20d6e4[_0x56240b(0x1f8)];return _0x4d48a3['slice'](0x0,_0x9e22fa)+'\x0a'+_0x471fe1+_0x4d48a3['slice'](_0x9e22fa);}}return _0x4d48a3[_0x56240b(0x202)](0x0,_0x516bd0)+'\x0a'+_0x471fe1+_0x4d48a3[_0x56240b(0x202)](_0x516bd0);}async[a83_0x2680c8(0x1f0)](_0x3e8167,_0x4f3314){const _0x20ccd6=a83_0x2680c8;if(!a83_0x288469[_0x20ccd6(0x1ff)](this[_0x20ccd6(0x1f9)]))throw new Error(_0x20ccd6(0x219)+this['routerFilePath']);const _0x342282=await a83_0x288469['promises'][_0x20ccd6(0x1fc)](this[_0x20ccd6(0x1f9)],_0x20ccd6(0x208)),_0x746d90=this[_0x20ccd6(0x1f1)](_0x3e8167);let _0x4da995=this[_0x20ccd6(0x209)](_0x342282,_0x746d90,_0x3e8167);return _0x4da995=this[_0x20ccd6(0x1f7)](_0x4da995,_0x4f3314,_0x746d90),_0x4da995;}}
@@ -1 +1 @@
1
- const a79_0x68043f=a79_0xb50d;(function(_0x448835,_0x39f824){const _0x3522db=a79_0xb50d,_0x4a5ef0=_0x448835();while(!![]){try{const _0x31221c=-parseInt(_0x3522db(0x1ca))/0x1*(-parseInt(_0x3522db(0x1cd))/0x2)+-parseInt(_0x3522db(0x1ce))/0x3+parseInt(_0x3522db(0x1c8))/0x4+-parseInt(_0x3522db(0x1c0))/0x5*(-parseInt(_0x3522db(0x1c1))/0x6)+parseInt(_0x3522db(0x1c6))/0x7+parseInt(_0x3522db(0x1c5))/0x8*(-parseInt(_0x3522db(0x1c7))/0x9)+-parseInt(_0x3522db(0x1be))/0xa*(parseInt(_0x3522db(0x1bc))/0xb);if(_0x31221c===_0x39f824)break;else _0x4a5ef0['push'](_0x4a5ef0['shift']());}catch(_0x2a1a66){_0x4a5ef0['push'](_0x4a5ef0['shift']());}}}(a79_0xfe1f,0x73c9e));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a79_0xb50d(_0x39f36b,_0x48834c){_0x39f36b=_0x39f36b-0x1bc;const _0xfe1f24=a79_0xfe1f();let _0xb50d1d=_0xfe1f24[_0x39f36b];return _0xb50d1d;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x304c17=getTemplateBaseUrl();return _0x304c17+'/rules/rules.json';}function a79_0xfe1f(){const _0x127f11=['203FBOcsr','content','status','638dIDZSE','687531GUKeEM','lastUpdated','lovrabet_rules.mdc','本地模板文件不存在:\x20','11rPAyyG','CDN\x20返回数据格式错误','10332730zBVmZU','CDN\x20请求失败:\x20','310SNtnJs','79452WkgqTi','utf-8','agents.md','application/json','2880bNZxhc','5384239jMynzE','11052NOURHj','2095448qWVSbS','../../cdn-source/rules/lovrabet_rules.mdc.tpl'];a79_0xfe1f=function(){return _0x127f11;};return a79_0xfe1f();}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a79_0x68043f(0x1c9));export async function fetchRulesFromCDN(){const _0x51e189=a79_0x68043f,_0x458839=getRulesCdnUrl(),_0x3a7132=await fetch(_0x458839,{'headers':{'Accept':_0x51e189(0x1c4)}});if(!_0x3a7132['ok'])throw new Error(_0x51e189(0x1bf)+_0x3a7132[_0x51e189(0x1cc)]+'\x20'+_0x3a7132['statusText']);const _0x5e0930=await _0x3a7132['json']();if(!_0x5e0930[_0x51e189(0x1cb)]||typeof _0x5e0930[_0x51e189(0x1cb)]!=='string')throw new Error(_0x51e189(0x1bd));return _0x5e0930;}export async function getRulesContent(){const _0x3c0619=a79_0x68043f;try{const _0x10b161=await fetchRulesFromCDN();return _0x10b161[_0x3c0619(0x1cb)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5b38d8=a79_0x68043f;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5b38d8(0x1c2));throw new Error(_0x5b38d8(0x1d1)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3e40ba){const _0x13756c=a79_0x68043f,_0x203eff=await fetchRulesFromCDN()['catch'](()=>null);let _0x33da9f;_0x203eff?(_0x33da9f=_0x203eff[_0x13756c(0x1cb)],_0x203eff[_0x13756c(0x1cf)]&&(_0x33da9f=appendUpdateTime(_0x33da9f,_0x203eff[_0x13756c(0x1cf)]))):_0x33da9f=readLocalTemplate();const _0x150aaa=dirname(_0x3e40ba);!existsSync(_0x150aaa)&&mkdirSync(_0x150aaa,{'recursive':!![]}),writeFileSync(_0x3e40ba,_0x33da9f,_0x13756c(0x1c2));}export async function copyRulesToCursor(_0x94c0e1){const _0x55d979=a79_0x68043f,_0x567a11=join(_0x94c0e1,'.cursor/rules'),_0x43447b=join(_0x567a11,_0x55d979(0x1d0));if(existsSync(_0x43447b))return![];return await writeRulesFile(_0x43447b),!![];}export async function copyRulesToAgentsMd(_0x5a1d6a){const _0x42153e=a79_0x68043f,_0x484d49=join(_0x5a1d6a,_0x42153e(0x1c3));if(existsSync(_0x484d49))return![];return await writeRulesFile(_0x484d49),!![];}
1
+ const a84_0x4765d5=a84_0x312e;(function(_0xba1f3e,_0xb4e45f){const _0x24b25c=a84_0x312e,_0x153b42=_0xba1f3e();while(!![]){try{const _0x4e3e17=parseInt(_0x24b25c(0x1f8))/0x1+-parseInt(_0x24b25c(0x1ef))/0x2*(-parseInt(_0x24b25c(0x1f7))/0x3)+-parseInt(_0x24b25c(0x1ea))/0x4+-parseInt(_0x24b25c(0x1f2))/0x5+parseInt(_0x24b25c(0x1e7))/0x6+parseInt(_0x24b25c(0x1f5))/0x7+-parseInt(_0x24b25c(0x1ee))/0x8;if(_0x4e3e17===_0xb4e45f)break;else _0x153b42['push'](_0x153b42['shift']());}catch(_0x42a2f8){_0x153b42['push'](_0x153b42['shift']());}}}(a84_0x34cb,0xceec5));function a84_0x34cb(){const _0x2a1fc8=['lastUpdated','.cursor/rules','../../cdn-source/rules/lovrabet_rules.mdc.tpl','utf-8','json','8570562SOcmla','catch','application/json','6640200MpTtUX','content','CDN\x20请求失败:\x20','/rules/rules.json','3271504UlPkIG','1920862sQbivx','lovrabet_rules.mdc','CDN\x20返回数据格式错误','4807385tiTPBc','本地模板文件不存在:\x20','statusText','7782467cKUQrV','string','3orgUAA','377383rQTIuw'];a84_0x34cb=function(){return _0x2a1fc8;};return a84_0x34cb();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a84_0x312e(_0x2c8c9d,_0x492401){_0x2c8c9d=_0x2c8c9d-0x1e4;const _0x34cb98=a84_0x34cb();let _0x312e24=_0x34cb98[_0x2c8c9d];return _0x312e24;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56861f=a84_0x312e,_0x4098a8=getTemplateBaseUrl();return _0x4098a8+_0x56861f(0x1ed);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a84_0x4765d5(0x1e4));export async function fetchRulesFromCDN(){const _0x1a9557=a84_0x4765d5,_0x3495c7=getRulesCdnUrl(),_0x55b2a1=await fetch(_0x3495c7,{'headers':{'Accept':_0x1a9557(0x1e9)}});if(!_0x55b2a1['ok'])throw new Error(_0x1a9557(0x1ec)+_0x55b2a1['status']+'\x20'+_0x55b2a1[_0x1a9557(0x1f4)]);const _0x48a43d=await _0x55b2a1[_0x1a9557(0x1e6)]();if(!_0x48a43d[_0x1a9557(0x1eb)]||typeof _0x48a43d[_0x1a9557(0x1eb)]!==_0x1a9557(0x1f6))throw new Error(_0x1a9557(0x1f1));return _0x48a43d;}export async function getRulesContent(){const _0x5d8703=a84_0x4765d5;try{const _0x7ab910=await fetchRulesFromCDN();return _0x7ab910[_0x5d8703(0x1eb)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x374f02=a84_0x4765d5;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x374f02(0x1e5));throw new Error(_0x374f02(0x1f3)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x51594f){const _0x47e525=a84_0x4765d5,_0x338643=await fetchRulesFromCDN()[_0x47e525(0x1e8)](()=>null);let _0x4148c6;_0x338643?(_0x4148c6=_0x338643['content'],_0x338643['lastUpdated']&&(_0x4148c6=appendUpdateTime(_0x4148c6,_0x338643[_0x47e525(0x1f9)]))):_0x4148c6=readLocalTemplate();const _0x535989=dirname(_0x51594f);!existsSync(_0x535989)&&mkdirSync(_0x535989,{'recursive':!![]}),writeFileSync(_0x51594f,_0x4148c6,_0x47e525(0x1e5));}export async function copyRulesToCursor(_0x22e3c1){const _0x322773=a84_0x4765d5,_0x3f65bb=join(_0x22e3c1,_0x322773(0x1fa)),_0x25846b=join(_0x3f65bb,_0x322773(0x1f0));if(existsSync(_0x25846b))return![];return await writeRulesFile(_0x25846b),!![];}export async function copyRulesToAgentsMd(_0x2acc20){const _0x2e53d4=join(_0x2acc20,'agents.md');if(existsSync(_0x2e53d4))return![];return await writeRulesFile(_0x2e53d4),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x221758){return new Promise(_0x560584=>setTimeout(_0x560584,_0x221758));}
1
+ export function sleep(_0x234a73){return new Promise(_0x260e97=>setTimeout(_0x260e97,_0x234a73));}
@@ -1 +1 @@
1
- const a81_0x59b90d=a81_0x5115;(function(_0x15c6b8,_0x10254d){const _0x2c174b=a81_0x5115,_0x39d84b=_0x15c6b8();while(!![]){try{const _0x14d412=-parseInt(_0x2c174b(0x134))/0x1*(parseInt(_0x2c174b(0x13e))/0x2)+-parseInt(_0x2c174b(0x139))/0x3+-parseInt(_0x2c174b(0x11a))/0x4*(parseInt(_0x2c174b(0x108))/0x5)+parseInt(_0x2c174b(0x10e))/0x6*(parseInt(_0x2c174b(0x12f))/0x7)+-parseInt(_0x2c174b(0x120))/0x8*(parseInt(_0x2c174b(0x143))/0x9)+-parseInt(_0x2c174b(0x117))/0xa+parseInt(_0x2c174b(0x141))/0xb;if(_0x14d412===_0x10254d)break;else _0x39d84b['push'](_0x39d84b['shift']());}catch(_0x38368d){_0x39d84b['push'](_0x39d84b['shift']());}}}(a81_0x1225,0x507da));function a81_0x5115(_0xb3b151,_0xf31eb2){_0xb3b151=_0xb3b151-0x105;const _0x1225f3=a81_0x1225();let _0x51155f=_0x1225f3[_0xb3b151];return _0x51155f;}function a81_0x1225(){const _0x54705e=['isFile','toLocaleTimeString','1530aIgwDi','endsWith','.tsx','2584936PRCvWn','mkdir','writeFile','readdir','datasetCode:\x20\x22','.scss','1130672MdVrOa','push','alias:\x20\x22','pop','join','now','copyFile','numeric','replaceApiContent','version','isDirectory','.css','模板内容替换完成','replace','toComponentName','14SQlPBo','2-digit','.ts','default','\x0a\x20\x20\x20\x20{\x20','41089fJpHdn','slice','.js','开始处理模板内容替换','processDirectory','1504746YTchJO','split','api','.tpl','name:\x20\x22','4sNliCi','toLowerCase','alias','14426269iVCdlG','模板内容替换失败','9HtrZDJ','promises','.jsx','replaceContent','readFile','YourModel','5NfwWNd','toISOString','extname','processFile','toDisplayTitle','charAt','1169076HwwuPe','template','toUpperCase','\x20},','tableName:\x20\x22','name','.md'];a81_0x1225=function(){return _0x54705e;};return a81_0x1225();}import a81_0x1f5cef from'node:fs';import a81_0x91a001 from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require('../../package.json')[a81_0x59b90d(0x129)];export class TemplateReplacer{static[a81_0x59b90d(0x12e)](_0x19c9ce){const _0x1f87b5=a81_0x59b90d,_0x3b0d98=_0x19c9ce[_0x1f87b5(0x13a)]('/')[_0x1f87b5(0x123)]()||_0x19c9ce;return _0x3b0d98[_0x1f87b5(0x13a)]('-')['map'](_0x2ae2b9=>_0x2ae2b9[_0x1f87b5(0x10d)](0x0)[_0x1f87b5(0x110)]()+_0x2ae2b9['slice'](0x1)[_0x1f87b5(0x13f)]())[_0x1f87b5(0x124)]('');}static[a81_0x59b90d(0x10c)](_0xaa6079){const _0x4bd0f9=a81_0x59b90d,_0xb43dc0=_0xaa6079[_0x4bd0f9(0x13a)]('/')[_0x4bd0f9(0x123)]()||_0xaa6079;return _0xb43dc0[_0x4bd0f9(0x13a)]('-')['map'](_0x1e0a19=>_0x1e0a19[_0x4bd0f9(0x10d)](0x0)[_0x4bd0f9(0x110)]()+_0x1e0a19[_0x4bd0f9(0x135)](0x1)[_0x4bd0f9(0x13f)]())[_0x4bd0f9(0x124)]('\x20');}static[a81_0x59b90d(0x105)](_0x5091b4,_0x30a783,_0x52c1f0){const _0x1c6d65=a81_0x59b90d,_0x33acce=this[_0x1c6d65(0x12e)](_0x30a783),_0xac413=this[_0x1c6d65(0x10c)](_0x30a783),_0x400a90=new Date(),_0x4abc56=_0x400a90['toLocaleString'](undefined,{'year':_0x1c6d65(0x127),'month':_0x1c6d65(0x130),'day':_0x1c6d65(0x130),'hour':_0x1c6d65(0x130),'minute':_0x1c6d65(0x130),'second':_0x1c6d65(0x130),'hour12':![]})['replace'](/\//g,'-'),_0x29bdd9=_0x400a90['toLocaleDateString'](undefined,{'year':_0x1c6d65(0x127),'month':_0x1c6d65(0x130),'day':_0x1c6d65(0x130)})['replace'](/\//g,'-'),_0x59d9ee=_0x400a90[_0x1c6d65(0x116)](undefined,{'hour12':![]});let _0xebf6e6=_0x5091b4['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x1c6d65(0x12d)](/\{ComponentName\}/g,_0x33acce)[_0x1c6d65(0x12d)](/\{DisplayTitle\}/g,_0xac413)[_0x1c6d65(0x12d)](/\{PageName\}/g,_0x30a783)['replace'](/\{TemplateName\}/g,_0x52c1f0)[_0x1c6d65(0x12d)](/\{CreatedAt\}/g,_0x4abc56)['replace'](/\{CreatedDate\}/g,_0x29bdd9)[_0x1c6d65(0x12d)](/\{CreatedTime\}/g,_0x59d9ee);return _0xebf6e6;}static[a81_0x59b90d(0x128)](_0x15dd78,_0x1ee85f,_0x1ee943,_0x30d3e4,_0x2ea2b2,_0x2ab409,_0x5461ff){const _0x45558b=a81_0x59b90d,_0x29a494=new Date(),_0x261868=_0x29a494[_0x45558b(0x109)](),_0x6ca710=_0x1ee943['map'](_0x3827a2=>{const _0x19e772=_0x45558b,_0x4615f2=[_0x19e772(0x11e)+_0x3827a2['datasetCode']+'\x22',_0x19e772(0x112)+_0x3827a2['tableName']+'\x22',_0x19e772(0x13d)+_0x3827a2[_0x19e772(0x113)]+'\x22'];return _0x3827a2[_0x19e772(0x140)]&&_0x4615f2[_0x19e772(0x121)](_0x19e772(0x122)+_0x3827a2[_0x19e772(0x140)]+'\x22'),_0x19e772(0x133)+_0x4615f2[_0x19e772(0x124)](',\x20')+_0x19e772(0x111);})[_0x45558b(0x124)](''),_0x5a3eb3=_0x30d3e4||_0x1ee943[0x0]?.['alias']||_0x45558b(0x107);let _0x16c4bc=_0x15dd78[_0x45558b(0x12d)](/\{AppCode\}/g,_0x1ee85f)[_0x45558b(0x12d)](/\{ModelConfigs\}/g,_0x6ca710)[_0x45558b(0x12d)](/\{ExampleModelName\}/g,_0x5a3eb3)[_0x45558b(0x12d)](/\{ApiFileName\}/g,_0x2ea2b2||_0x45558b(0x13b))['replace'](/\{ConfigName\}/g,_0x2ab409||_0x45558b(0x132))['replace'](/\{ClientConfigParam\}/g,_0x5461ff||'')[_0x45558b(0x12d)](/\{CreatedAt\}/g,_0x261868);return _0x16c4bc;}static async['processTemplate'](_0x48c902,_0x2f983e,_0x478b7d,_0x18fdb4,_0x522590=!![]){const _0x3b15ae=a81_0x59b90d,_0x5009d3=Date[_0x3b15ae(0x125)]();try{_0x522590&&logger['info'](_0x3b15ae(0x10f),_0x3b15ae(0x137),{'templatePath':_0x48c902,'targetPath':_0x2f983e,'pageName':_0x478b7d,'templateName':_0x18fdb4});await a81_0x1f5cef[_0x3b15ae(0x144)][_0x3b15ae(0x11b)](_0x2f983e,{'recursive':!![]}),await this[_0x3b15ae(0x138)](_0x48c902,_0x2f983e,_0x478b7d,_0x18fdb4);if(_0x522590){const _0x4e93db=Date[_0x3b15ae(0x125)]()-_0x5009d3;logger['success'](_0x3b15ae(0x10f),_0x3b15ae(0x12c),_0x4e93db,{'pageName':_0x478b7d,'templateName':_0x18fdb4});}}catch(_0x44b0d0){if(_0x522590){const _0x378412=Date[_0x3b15ae(0x125)]()-_0x5009d3;logger['error']('template',_0x3b15ae(0x142),{'templatePath':_0x48c902,'targetPath':_0x2f983e,'pageName':_0x478b7d,'templateName':_0x18fdb4,'error':_0x44b0d0 instanceof Error?_0x44b0d0['message']:String(_0x44b0d0),'duration':_0x378412});}throw _0x44b0d0;}}static async[a81_0x59b90d(0x138)](_0x2c4490,_0x3ce792,_0x1758d7,_0x2bc59e){const _0x4d1054=a81_0x59b90d,_0x72b90d=await a81_0x1f5cef['promises'][_0x4d1054(0x11d)](_0x2c4490,{'withFileTypes':!![]});for(const _0x3ec251 of _0x72b90d){const _0x18c3e3=a81_0x91a001[_0x4d1054(0x124)](_0x2c4490,_0x3ec251[_0x4d1054(0x113)]);let _0x475e3f=a81_0x91a001['join'](_0x3ce792,_0x3ec251['name']);_0x3ec251[_0x4d1054(0x113)][_0x4d1054(0x118)](_0x4d1054(0x13c))&&(_0x475e3f=a81_0x91a001[_0x4d1054(0x124)](_0x3ce792,_0x3ec251[_0x4d1054(0x113)]['replace'](/\.tpl$/,'')));if(_0x3ec251[_0x4d1054(0x12a)]())await a81_0x1f5cef[_0x4d1054(0x144)][_0x4d1054(0x11b)](_0x475e3f,{'recursive':!![]}),await this[_0x4d1054(0x138)](_0x18c3e3,_0x475e3f,_0x1758d7,_0x2bc59e);else _0x3ec251[_0x4d1054(0x115)]()&&await this['processFile'](_0x18c3e3,_0x475e3f,_0x1758d7,_0x2bc59e);}}static async[a81_0x59b90d(0x10b)](_0x1db35a,_0x49f180,_0x2c5a19,_0x130c8d){const _0x313b11=a81_0x59b90d,_0x2eba04=a81_0x91a001[_0x313b11(0x10a)](_0x1db35a)['toLowerCase']();_0x1db35a[_0x313b11(0x118)](_0x313b11(0x13c))&&(_0x49f180=_0x49f180[_0x313b11(0x12d)](/\.tpl$/,''));const _0x3878a8=[_0x313b11(0x119),_0x313b11(0x131),_0x313b11(0x145),_0x313b11(0x136),'.json',_0x313b11(0x114),_0x313b11(0x12b),_0x313b11(0x11f),_0x313b11(0x13c)];if(_0x3878a8['includes'](_0x2eba04)||_0x1db35a[_0x313b11(0x118)](_0x313b11(0x13c))){const _0x49f650=await a81_0x1f5cef[_0x313b11(0x144)][_0x313b11(0x106)](_0x1db35a,'utf8'),_0x58f1f8=this[_0x313b11(0x105)](_0x49f650,_0x2c5a19,_0x130c8d);await a81_0x1f5cef[_0x313b11(0x144)][_0x313b11(0x11c)](_0x49f180,_0x58f1f8,'utf8');}else await a81_0x1f5cef['promises'][_0x313b11(0x126)](_0x1db35a,_0x49f180);}}
1
+ const a86_0x107d32=a86_0xed76;(function(_0x32ad48,_0x53fbf2){const _0x25378f=a86_0xed76,_0x517096=_0x32ad48();while(!![]){try{const _0x3bb1e6=parseInt(_0x25378f(0x152))/0x1+-parseInt(_0x25378f(0x150))/0x2*(-parseInt(_0x25378f(0x121))/0x3)+parseInt(_0x25378f(0x13d))/0x4+-parseInt(_0x25378f(0x14f))/0x5+-parseInt(_0x25378f(0x12b))/0x6+-parseInt(_0x25378f(0x155))/0x7+parseInt(_0x25378f(0x122))/0x8;if(_0x3bb1e6===_0x53fbf2)break;else _0x517096['push'](_0x517096['shift']());}catch(_0x23a6c0){_0x517096['push'](_0x517096['shift']());}}}(a86_0x8a6c,0x29e6d));import a86_0x1d10f5 from'node:fs';import a86_0x49f290 from'node:path';import{createRequire}from'node:module';function a86_0xed76(_0x1611d6,_0x54c6e4){_0x1611d6=_0x1611d6-0x11f;const _0x8a6cb6=a86_0x8a6c();let _0xed7605=_0x8a6cb6[_0x1611d6];return _0xed7605;}import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a86_0x107d32(0x12d))[a86_0x107d32(0x15d)];function a86_0x8a6c(){const _0x2a0566=['.jsx','message','version','includes','replace','toDisplayTitle','numeric','15ETSZhV','2100464EjAvgc','.md','map','replaceApiContent','toComponentName','error','datasetCode','mkdir','readFile','770166AhpcKg','processFile','../../package.json','alias','writeFile','split','alias:\x20\x22','readdir','tableName','toLowerCase','isDirectory','default','name','2-digit','\x20},','api','slice','pop','806204yIpMje','\x0a\x20\x20\x20\x20{\x20','toUpperCase','.tpl','push','template','.json','promises','info','.ts','endsWith','.scss','now','datasetCode:\x20\x22','toLocaleDateString','processDirectory','.js','processTemplate','920520oAveHG','29516Igzfbw','toLocaleString','253220Qhaamf','replaceContent','utf8','2149175zZhcZl','charAt','name:\x20\x22','模板内容替换完成','toLocaleTimeString','join'];a86_0x8a6c=function(){return _0x2a0566;};return a86_0x8a6c();}export class TemplateReplacer{static[a86_0x107d32(0x126)](_0x5169e9){const _0x238c2d=a86_0x107d32,_0x573583=_0x5169e9['split']('/')[_0x238c2d(0x13c)]()||_0x5169e9;return _0x573583[_0x238c2d(0x130)]('-')['map'](_0x384e9c=>_0x384e9c[_0x238c2d(0x156)](0x0)[_0x238c2d(0x13f)]()+_0x384e9c[_0x238c2d(0x13b)](0x1)[_0x238c2d(0x134)]())[_0x238c2d(0x15a)]('');}static[a86_0x107d32(0x11f)](_0x2cb35e){const _0x174722=a86_0x107d32,_0xc2ff0a=_0x2cb35e[_0x174722(0x130)]('/')[_0x174722(0x13c)]()||_0x2cb35e;return _0xc2ff0a['split']('-')[_0x174722(0x124)](_0x2c93e2=>_0x2c93e2['charAt'](0x0)['toUpperCase']()+_0x2c93e2[_0x174722(0x13b)](0x1)['toLowerCase']())[_0x174722(0x15a)]('\x20');}static[a86_0x107d32(0x153)](_0x590715,_0x476558,_0x30184a){const _0x5edda1=a86_0x107d32,_0x2f9ab5=this[_0x5edda1(0x126)](_0x476558),_0x58e706=this[_0x5edda1(0x11f)](_0x476558),_0x2443f3=new Date(),_0x4d8a80=_0x2443f3[_0x5edda1(0x151)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':'2-digit','hour':_0x5edda1(0x138),'minute':_0x5edda1(0x138),'second':_0x5edda1(0x138),'hour12':![]})[_0x5edda1(0x15f)](/\//g,'-'),_0x33bd06=_0x2443f3[_0x5edda1(0x14b)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':_0x5edda1(0x138)})[_0x5edda1(0x15f)](/\//g,'-'),_0xbbd9b7=_0x2443f3[_0x5edda1(0x159)](undefined,{'hour12':![]});let _0x5cc9be=_0x590715[_0x5edda1(0x15f)](/\{CliVersion\}/g,CLI_VERSION)[_0x5edda1(0x15f)](/\{ComponentName\}/g,_0x2f9ab5)[_0x5edda1(0x15f)](/\{DisplayTitle\}/g,_0x58e706)[_0x5edda1(0x15f)](/\{PageName\}/g,_0x476558)[_0x5edda1(0x15f)](/\{TemplateName\}/g,_0x30184a)[_0x5edda1(0x15f)](/\{CreatedAt\}/g,_0x4d8a80)[_0x5edda1(0x15f)](/\{CreatedDate\}/g,_0x33bd06)[_0x5edda1(0x15f)](/\{CreatedTime\}/g,_0xbbd9b7);return _0x5cc9be;}static[a86_0x107d32(0x125)](_0x472412,_0x1c7001,_0x841595,_0xd3cdc1,_0x4ba35d,_0x153e76,_0x503737){const _0x1384f7=a86_0x107d32,_0x731b1b=new Date(),_0x40d547=_0x731b1b['toISOString'](),_0x33117c=_0x841595[_0x1384f7(0x124)](_0x1a5af7=>{const _0x3754e5=_0x1384f7,_0x13191b=[_0x3754e5(0x14a)+_0x1a5af7[_0x3754e5(0x128)]+'\x22','tableName:\x20\x22'+_0x1a5af7[_0x3754e5(0x133)]+'\x22',_0x3754e5(0x157)+_0x1a5af7[_0x3754e5(0x137)]+'\x22'];return _0x1a5af7[_0x3754e5(0x12e)]&&_0x13191b[_0x3754e5(0x141)](_0x3754e5(0x131)+_0x1a5af7['alias']+'\x22'),_0x3754e5(0x13e)+_0x13191b[_0x3754e5(0x15a)](',\x20')+_0x3754e5(0x139);})['join'](''),_0x58312c=_0xd3cdc1||_0x841595[0x0]?.['alias']||'YourModel';let _0x45a8ca=_0x472412['replace'](/\{AppCode\}/g,_0x1c7001)[_0x1384f7(0x15f)](/\{ModelConfigs\}/g,_0x33117c)[_0x1384f7(0x15f)](/\{ExampleModelName\}/g,_0x58312c)[_0x1384f7(0x15f)](/\{ApiFileName\}/g,_0x4ba35d||_0x1384f7(0x13a))[_0x1384f7(0x15f)](/\{ConfigName\}/g,_0x153e76||_0x1384f7(0x136))[_0x1384f7(0x15f)](/\{ClientConfigParam\}/g,_0x503737||'')[_0x1384f7(0x15f)](/\{CreatedAt\}/g,_0x40d547);return _0x45a8ca;}static async[a86_0x107d32(0x14e)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707,_0x3f3b1e=!![]){const _0x1dbdb4=a86_0x107d32,_0x1a4270=Date[_0x1dbdb4(0x149)]();try{_0x3f3b1e&&logger[_0x1dbdb4(0x145)](_0x1dbdb4(0x142),'开始处理模板内容替换',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707});await a86_0x1d10f5[_0x1dbdb4(0x144)][_0x1dbdb4(0x129)](_0x386ea5,{'recursive':!![]}),await this[_0x1dbdb4(0x14c)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707);if(_0x3f3b1e){const _0x4a6360=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger['success']('template',_0x1dbdb4(0x158),_0x4a6360,{'pageName':_0xb0c067,'templateName':_0xaef707});}}catch(_0x3393f9){if(_0x3f3b1e){const _0x5874ef=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger[_0x1dbdb4(0x127)](_0x1dbdb4(0x142),'模板内容替换失败',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707,'error':_0x3393f9 instanceof Error?_0x3393f9[_0x1dbdb4(0x15c)]:String(_0x3393f9),'duration':_0x5874ef});}throw _0x3393f9;}}static async[a86_0x107d32(0x14c)](_0x5ec944,_0x252098,_0x57e117,_0x517d8b){const _0x461890=a86_0x107d32,_0x38eaf4=await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x132)](_0x5ec944,{'withFileTypes':!![]});for(const _0x36358f of _0x38eaf4){const _0x6338b4=a86_0x49f290[_0x461890(0x15a)](_0x5ec944,_0x36358f[_0x461890(0x137)]);let _0x4518f8=a86_0x49f290['join'](_0x252098,_0x36358f[_0x461890(0x137)]);_0x36358f[_0x461890(0x137)][_0x461890(0x147)](_0x461890(0x140))&&(_0x4518f8=a86_0x49f290[_0x461890(0x15a)](_0x252098,_0x36358f[_0x461890(0x137)][_0x461890(0x15f)](/\.tpl$/,'')));if(_0x36358f[_0x461890(0x135)]())await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x129)](_0x4518f8,{'recursive':!![]}),await this[_0x461890(0x14c)](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);else _0x36358f['isFile']()&&await this['processFile'](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);}}static async[a86_0x107d32(0x12c)](_0x46e846,_0xdf234d,_0x1300bc,_0x305213){const _0x2a128b=a86_0x107d32,_0x561bba=a86_0x49f290['extname'](_0x46e846)['toLowerCase']();_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))&&(_0xdf234d=_0xdf234d[_0x2a128b(0x15f)](/\.tpl$/,''));const _0x3a586a=['.tsx',_0x2a128b(0x146),_0x2a128b(0x15b),_0x2a128b(0x14d),_0x2a128b(0x143),_0x2a128b(0x123),'.css',_0x2a128b(0x148),_0x2a128b(0x140)];if(_0x3a586a[_0x2a128b(0x15e)](_0x561bba)||_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))){const _0x14776f=await a86_0x1d10f5[_0x2a128b(0x144)][_0x2a128b(0x12a)](_0x46e846,_0x2a128b(0x154)),_0x1ac727=this[_0x2a128b(0x153)](_0x14776f,_0x1300bc,_0x305213);await a86_0x1d10f5['promises'][_0x2a128b(0x12f)](_0xdf234d,_0x1ac727,_0x2a128b(0x154));}else await a86_0x1d10f5[_0x2a128b(0x144)]['copyFile'](_0x46e846,_0xdf234d);}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"
@@ -38,6 +38,7 @@
38
38
  "dependencies": {
39
39
  "@types/winston": "^2.4.4",
40
40
  "execa": "^9.6.0",
41
+ "i18next": "^25.8.4",
41
42
  "ink": "^6.2.3",
42
43
  "ink-spinner": "^5.0.0",
43
44
  "javascript-obfuscator": "^4.1.1",
@@ -45,6 +46,7 @@
45
46
  "meow": "^13.2.0",
46
47
  "prettier": "^3.6.2",
47
48
  "react": "^19.2.0",
49
+ "react-i18next": "^16.5.4",
48
50
  "semver": "^7.7.3",
49
51
  "winston": "^3.17.0"
50
52
  },