@lovrabet/cli 1.3.2 → 1.3.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -0
  52. package/lib/i18n/hooks.js +1 -0
  53. package/lib/i18n/index.js +1 -0
  54. package/lib/i18n/locales/en-US.js +1 -0
  55. package/lib/i18n/locales/zh-CN.js +1 -0
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +6 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- const a68_0x579a03=a68_0x1601;function a68_0x1601(_0x493206,_0x207cd3){_0x493206=_0x493206-0xeb;const _0xe2c9c7=a68_0xe2c9();let _0x16015c=_0xe2c9c7[_0x493206];return _0x16015c;}(function(_0x33838e,_0x92b993){const _0x6f8c5b=a68_0x1601,_0x2ac588=_0x33838e();while(!![]){try{const _0x53852f=-parseInt(_0x6f8c5b(0x11e))/0x1*(-parseInt(_0x6f8c5b(0x10f))/0x2)+parseInt(_0x6f8c5b(0xec))/0x3*(-parseInt(_0x6f8c5b(0x116))/0x4)+-parseInt(_0x6f8c5b(0x118))/0x5*(parseInt(_0x6f8c5b(0x102))/0x6)+parseInt(_0x6f8c5b(0x105))/0x7+-parseInt(_0x6f8c5b(0xfb))/0x8+-parseInt(_0x6f8c5b(0x114))/0x9*(parseInt(_0x6f8c5b(0xf4))/0xa)+parseInt(_0x6f8c5b(0x10c))/0xb;if(_0x53852f===_0x92b993)break;else _0x2ac588['push'](_0x2ac588['shift']());}catch(_0x1ec696){_0x2ac588['push'](_0x2ac588['shift']());}}}(a68_0xe2c9,0xbee5b));export const CORE_IDE_CONFIGS={'cursor':{'name':a68_0x579a03(0x10e),'description':a68_0x579a03(0x100),'folders':[a68_0x579a03(0x115),a68_0x579a03(0x11d)],'files':[{'type':a68_0x579a03(0x104),'path':a68_0x579a03(0xf8),'template':a68_0x579a03(0x11b)}]},'windsurf':{'name':'Windsurf','description':'Windsurf\x20IDE','folders':[a68_0x579a03(0x106)],'files':[{'type':'file','path':a68_0x579a03(0xf6),'template':a68_0x579a03(0x11b)}]},'claude':{'name':'Claude\x20Code','description':a68_0x579a03(0xee),'folders':[a68_0x579a03(0xfc)],'files':[{'type':'file','path':a68_0x579a03(0xed),'template':a68_0x579a03(0x11b)}]},'cline':{'name':'Cline','description':a68_0x579a03(0xff),'folders':[a68_0x579a03(0x108)],'files':[{'type':a68_0x579a03(0x104),'path':'.cline/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'codex':{'name':'Codex','description':a68_0x579a03(0xef),'folders':[a68_0x579a03(0x10a)],'files':[{'type':a68_0x579a03(0x104),'path':a68_0x579a03(0xf1),'template':a68_0x579a03(0x11b)}]},'opencode':{'name':a68_0x579a03(0x117),'description':a68_0x579a03(0x110),'folders':[a68_0x579a03(0x10b)],'files':[{'type':'file','path':a68_0x579a03(0xf3),'template':'SKILL.md.tpl'}]},'qoder':{'name':'Qoder','description':a68_0x579a03(0xf5),'folders':[a68_0x579a03(0x120)],'files':[{'type':a68_0x579a03(0x104),'path':a68_0x579a03(0x113),'template':a68_0x579a03(0x11b)},{'type':'file','path':a68_0x579a03(0x111),'template':a68_0x579a03(0x11b)}]},'codebuddy':{'name':a68_0x579a03(0xeb),'description':a68_0x579a03(0x109),'folders':[a68_0x579a03(0xfe)],'files':[{'type':'file','path':a68_0x579a03(0xf0),'template':'SKILL.md.tpl'}]},'trae':{'name':'Trae','description':'Trae\x20IDE','folders':[a68_0x579a03(0x121)],'files':[{'type':a68_0x579a03(0x104),'path':a68_0x579a03(0x11c),'template':a68_0x579a03(0x11b)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a68_0x579a03(0x119),'description':'通用模板\x20-\x20兜底方案','folders':['.agent'],'files':[{'type':a68_0x579a03(0x104),'path':a68_0x579a03(0xfd),'template':a68_0x579a03(0x11b)}]},'antigravity':{'name':a68_0x579a03(0x10d),'description':'Antigravity\x20IDE','folders':['.agent'],'files':[{'type':'file','path':a68_0x579a03(0xfd),'template':a68_0x579a03(0x11b)}]}};export const CORE_IDE_LIST=[a68_0x579a03(0x11f),a68_0x579a03(0xf9),a68_0x579a03(0xf2),a68_0x579a03(0x11a),a68_0x579a03(0xfa),'opencode',a68_0x579a03(0xf7),a68_0x579a03(0x112),a68_0x579a03(0x107)];function a68_0xe2c9(){const _0x8bc436=['Cline\x20IDE','Cursor\x20IDE','antigravity','1803342NPbVuK','agent','file','1736987hHfNgr','.windsurf','windsurf','.cline','CodeBuddy\x20IDE','.codex','.opencode','43864073DiIpkp','Antigravity','Cursor','314pXwWdI','OpenCode\x20IDE','.qoder/skills/lovrabet/SKILL.md','trae','.qoder/rules/lovrabet.md','9fbRStC','.cursorrules','906172vklwGS','OpenCode','10xQFTIO','其他\x20(通用模板)','codex','SKILL.md.tpl','.trae/skills/lovrabet/SKILL.md','.cursor','2597rYlqgU','claude','.qoder','.trae','CodeBuddy','15wqLCyA','.claude/skills/lovrabet/SKILL.md','Claude\x20Code','Codex\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','codebuddy','.opencode/skills/lovrabet/SKILL.md','14039390lIkLhS','Qoder\x20IDE','.windsurf/workflows/lovrabet.md','qoder','.cursor/skills/lovrabet.md','cline','cursor','5790640MRcpto','.claude','.agent/skills/lovrabet/SKILL.md','.codebuddy'];a68_0xe2c9=function(){return _0x8bc436;};return a68_0xe2c9();}export const IDE_LIST=[a68_0x579a03(0x101),a68_0x579a03(0x11f),a68_0x579a03(0xf9),a68_0x579a03(0xf2),a68_0x579a03(0x11a),'cursor','opencode',a68_0x579a03(0xf7),a68_0x579a03(0x112),a68_0x579a03(0x107),a68_0x579a03(0x103)];export const ALL_CORE_IDES=['cursor',a68_0x579a03(0x107),a68_0x579a03(0x11f),a68_0x579a03(0xf9),a68_0x579a03(0x11a),'opencode','qoder','codebuddy','trae'];export const MCP_IDES=new Set([a68_0x579a03(0xfa),a68_0x579a03(0x11f)]);
1
+ const a71_0x74b9b8=a71_0x115b;(function(_0x50d496,_0x17d715){const _0x2ee957=a71_0x115b,_0x4b19f3=_0x50d496();while(!![]){try{const _0x42e15c=parseInt(_0x2ee957(0x13a))/0x1*(parseInt(_0x2ee957(0x127))/0x2)+-parseInt(_0x2ee957(0x11c))/0x3+parseInt(_0x2ee957(0x11d))/0x4+-parseInt(_0x2ee957(0x115))/0x5+parseInt(_0x2ee957(0x10b))/0x6*(-parseInt(_0x2ee957(0x132))/0x7)+-parseInt(_0x2ee957(0x117))/0x8*(-parseInt(_0x2ee957(0x122))/0x9)+parseInt(_0x2ee957(0x128))/0xa*(parseInt(_0x2ee957(0x133))/0xb);if(_0x42e15c===_0x17d715)break;else _0x4b19f3['push'](_0x4b19f3['shift']());}catch(_0x56aa72){_0x4b19f3['push'](_0x4b19f3['shift']());}}}(a71_0x42ce,0x578db));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':a71_0x74b9b8(0x11e),'folders':['.cursorrules','.cursor'],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x11f),'template':a71_0x74b9b8(0x13d)}]},'windsurf':{'name':'Windsurf','description':'Windsurf\x20IDE','folders':[a71_0x74b9b8(0x12c)],'files':[{'type':'file','path':a71_0x74b9b8(0x131),'template':a71_0x74b9b8(0x13d)}]},'claude':{'name':a71_0x74b9b8(0x12e),'description':a71_0x74b9b8(0x12e),'folders':['.claude'],'files':[{'type':a71_0x74b9b8(0x136),'path':'.claude/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'cline':{'name':a71_0x74b9b8(0x112),'description':a71_0x74b9b8(0x139),'folders':['.cline'],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x13c),'template':a71_0x74b9b8(0x13d)}]},'codex':{'name':a71_0x74b9b8(0x129),'description':a71_0x74b9b8(0x125),'folders':['.codex'],'files':[{'type':a71_0x74b9b8(0x136),'path':'.codex/skills/lovrabet/SKILL.md','template':a71_0x74b9b8(0x13d)}]},'opencode':{'name':a71_0x74b9b8(0x110),'description':a71_0x74b9b8(0x119),'folders':[a71_0x74b9b8(0x138)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x12f),'template':a71_0x74b9b8(0x13d)}]},'qoder':{'name':'Qoder','description':a71_0x74b9b8(0x10c),'folders':[a71_0x74b9b8(0x12b)],'files':[{'type':'file','path':a71_0x74b9b8(0x12d),'template':a71_0x74b9b8(0x13d)},{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x120),'template':a71_0x74b9b8(0x13d)}]},'codebuddy':{'name':'CodeBuddy','description':a71_0x74b9b8(0x13e),'folders':[a71_0x74b9b8(0x123)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x11b),'template':a71_0x74b9b8(0x13d)}]},'trae':{'name':a71_0x74b9b8(0x116),'description':a71_0x74b9b8(0x11a),'folders':[a71_0x74b9b8(0x10f)],'files':[{'type':a71_0x74b9b8(0x136),'path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a71_0x74b9b8(0x12a),'description':'通用模板\x20-\x20兜底方案','folders':['.agent'],'files':[{'type':'file','path':a71_0x74b9b8(0x118),'template':'SKILL.md.tpl'}]},'antigravity':{'name':'Antigravity','description':a71_0x74b9b8(0x135),'folders':[a71_0x74b9b8(0x113)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x118),'template':a71_0x74b9b8(0x13d)}]}};function a71_0x115b(_0x3bdb90,_0x2fcdc1){_0x3bdb90=_0x3bdb90-0x10b;const _0x42ce2e=a71_0x42ce();let _0x115bee=_0x42ce2e[_0x3bdb90];return _0x115bee;}export const CORE_IDE_LIST=[a71_0x74b9b8(0x124),a71_0x74b9b8(0x121),'codebuddy',a71_0x74b9b8(0x114),a71_0x74b9b8(0x134),'opencode','qoder',a71_0x74b9b8(0x13b),'windsurf'];export const IDE_LIST=[a71_0x74b9b8(0x10e),a71_0x74b9b8(0x124),a71_0x74b9b8(0x121),a71_0x74b9b8(0x111),a71_0x74b9b8(0x114),'cursor',a71_0x74b9b8(0x130),'qoder',a71_0x74b9b8(0x13b),a71_0x74b9b8(0x126),a71_0x74b9b8(0x10d)];export const ALL_CORE_IDES=['cursor',a71_0x74b9b8(0x126),'claude','cline',a71_0x74b9b8(0x114),a71_0x74b9b8(0x130),a71_0x74b9b8(0x137),'codebuddy','trae'];function a71_0x42ce(){const _0x4b2d9f=['.qoder/rules/lovrabet.md','Claude\x20Code','.opencode/skills/lovrabet/SKILL.md','opencode','.windsurf/workflows/lovrabet.md','81501DlmBEn','1083269xBsmIM','cursor','Antigravity\x20IDE','file','qoder','.opencode','Cline\x20IDE','47800AbWmrj','trae','.cline/skills/lovrabet/SKILL.md','SKILL.md.tpl','CodeBuddy\x20IDE','342vHijpA','Qoder\x20IDE','agent','antigravity','.trae','OpenCode','codebuddy','Cline','.agent','codex','1640535gJqUFW','Trae','5112YPePBU','.agent/skills/lovrabet/SKILL.md','OpenCode\x20IDE','Trae\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','247764mciuZl','1961300vxyqqy','Cursor\x20IDE','.cursor/skills/lovrabet.md','.qoder/skills/lovrabet/SKILL.md','cline','1791MnTadZ','.codebuddy','claude','Codex\x20IDE','windsurf','30snGrSA','10ZNfgdi','Codex','其他\x20(通用模板)','.qoder','.windsurf'];a71_0x42ce=function(){return _0x4b2d9f;};return a71_0x42ce();}export const MCP_IDES=new Set(['cursor',a71_0x74b9b8(0x124)]);
@@ -1 +1 @@
1
- (function(_0x3cf592,_0x5d0b37){const _0x27adbc=a69_0x4e73,_0x21d085=_0x3cf592();while(!![]){try{const _0x572b51=parseInt(_0x27adbc(0x1c8))/0x1+-parseInt(_0x27adbc(0x1c3))/0x2+-parseInt(_0x27adbc(0x1cf))/0x3*(parseInt(_0x27adbc(0x1d0))/0x4)+parseInt(_0x27adbc(0x1cc))/0x5*(parseInt(_0x27adbc(0x1ca))/0x6)+parseInt(_0x27adbc(0x1c6))/0x7+parseInt(_0x27adbc(0x1ce))/0x8+-parseInt(_0x27adbc(0x1cd))/0x9;if(_0x572b51===_0x5d0b37)break;else _0x21d085['push'](_0x21d085['shift']());}catch(_0x23436b){_0x21d085['push'](_0x21d085['shift']());}}}(a69_0x3928,0x5e9e2));import{getTemplateBaseUrl}from'./config.js';function a69_0x3928(){const _0x4fe8bc=['stableVersion','97320NqHCjj','json','126SillxG','application/json','104565yyIqer','5474682AKXXyy','3653872owQycr','683727bfiogh','4MdubJh','sdk','now','278376zOwjjI','/config.json','node','2588054AXbMdO'];a69_0x3928=function(){return _0x4fe8bc;};return a69_0x3928();}function a69_0x4e73(_0x461afe,_0x25635a){_0x461afe=_0x461afe-0x1c2;const _0x392860=a69_0x3928();let _0x4e73ca=_0x392860[_0x461afe];return _0x4e73ca;}export async function fetchCdnConfig(){const _0x3f6588=a69_0x4e73;try{const _0x37ad44=getTemplateBaseUrl(),_0x1cbfdc=_0x37ad44+_0x3f6588(0x1c4),_0x2b576e=await fetch(_0x1cbfdc,{'headers':{'Accept':_0x3f6588(0x1cb)}});if(!_0x2b576e['ok'])return null;const _0x596e95=await _0x2b576e[_0x3f6588(0x1c9)]();if(!_0x596e95['cli']?.[_0x3f6588(0x1c7)]||!_0x596e95[_0x3f6588(0x1d1)]?.[_0x3f6588(0x1c5)]?.[_0x3f6588(0x1c7)])return null;return _0x596e95;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x26845e=a69_0x4e73,_0x2c674a=Date[_0x26845e(0x1c2)]();if(cachedConfig&&_0x2c674a-cacheTime<CACHE_TTL)return cachedConfig;const _0x52b6eb=await fetchCdnConfig();return _0x52b6eb&&(cachedConfig=_0x52b6eb,cacheTime=_0x2c674a),_0x52b6eb;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
1
+ (function(_0x32a08d,_0x257ef9){const _0x3585d1=a72_0x3c2d,_0x1ab3e9=_0x32a08d();while(!![]){try{const _0x929361=-parseInt(_0x3585d1(0xb5))/0x1*(-parseInt(_0x3585d1(0xa6))/0x2)+parseInt(_0x3585d1(0xb9))/0x3*(-parseInt(_0x3585d1(0xb4))/0x4)+parseInt(_0x3585d1(0xad))/0x5+-parseInt(_0x3585d1(0xb2))/0x6*(-parseInt(_0x3585d1(0xa7))/0x7)+parseInt(_0x3585d1(0xaf))/0x8*(parseInt(_0x3585d1(0xb0))/0x9)+-parseInt(_0x3585d1(0xb6))/0xa*(parseInt(_0x3585d1(0xb7))/0xb)+-parseInt(_0x3585d1(0xa8))/0xc*(parseInt(_0x3585d1(0xab))/0xd);if(_0x929361===_0x257ef9)break;else _0x1ab3e9['push'](_0x1ab3e9['shift']());}catch(_0x379ad9){_0x1ab3e9['push'](_0x1ab3e9['shift']());}}}(a72_0x4f73,0xac458));function a72_0x3c2d(_0xd5b042,_0x3b5ffb){_0xd5b042=_0xd5b042-0xa6;const _0x4f731f=a72_0x4f73();let _0x3c2d5e=_0x4f731f[_0xd5b042];return _0x3c2d5e;}import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x225967=a72_0x3c2d;try{const _0x236ae7=getTemplateBaseUrl(),_0x3ba0e7=_0x236ae7+_0x225967(0xae),_0x56995c=await fetch(_0x3ba0e7,{'headers':{'Accept':_0x225967(0xac)}});if(!_0x56995c['ok'])return null;const _0x1feb2c=await _0x56995c[_0x225967(0xa9)]();if(!_0x1feb2c[_0x225967(0xb8)]?.[_0x225967(0xb3)]||!_0x1feb2c[_0x225967(0xb1)]?.[_0x225967(0xaa)]?.['stableVersion'])return null;return _0x1feb2c;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;function a72_0x4f73(){const _0x5636fb=['sdk','30dUxbYj','stableVersion','1464kOAADk','1nmJVDn','3279460AcjWpr','11nYGbiR','cli','1605kWbDhX','200118TsaOnq','985537Wbtsih','552AbHjgE','json','node','280943Owpinu','application/json','996870xwIdBy','/config.json','157432FjSLTP','558MrRmJI'];a72_0x4f73=function(){return _0x5636fb;};return a72_0x4f73();}export async function getCdnConfig(){const _0x21f81b=Date['now']();if(cachedConfig&&_0x21f81b-cacheTime<CACHE_TTL)return cachedConfig;const _0xd5d257=await fetchCdnConfig();return _0xd5d257&&(cachedConfig=_0xd5d257,cacheTime=_0x21f81b),_0xd5d257;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
@@ -1 +1 @@
1
- function a70_0x500a(){const _0x1439f1=['all','4942dhYPdJ','1300250EmBIMd','2456xaCbMk','2780510hgpGPL','\x1b[1m','devDependencies','needsUpgrade','\x20\x20\x20升级命令:\x20npm\x20install\x20','1.2.0','dependencies','9XTyHqR','readFileSync','existsSync','node','sdk','package.json','join','@lovrabet/sdk','log','latest','utf8','version','24KvujNJ','\x20\x20\x20当前版本:\x20','node_modules','some','17094913vUftEF','packageName','\x1b[33m','stableVersion','coerce','912388OAxMmv','148474YKUOCw','323204urvzfG','6aQpTid','parse'];a70_0x500a=function(){return _0x1439f1;};return a70_0x500a();}const a70_0x505497=a70_0x2d4e;(function(_0x182d71,_0x3fcd35){const _0x4a369f=a70_0x2d4e,_0x51bc29=_0x182d71();while(!![]){try{const _0x193478=parseInt(_0x4a369f(0x1db))/0x1+parseInt(_0x4a369f(0x1da))/0x2*(-parseInt(_0x4a369f(0x1d0))/0x3)+-parseInt(_0x4a369f(0x1d9))/0x4+-parseInt(_0x4a369f(0x1e0))/0x5*(parseInt(_0x4a369f(0x1dc))/0x6)+parseInt(_0x4a369f(0x1df))/0x7*(-parseInt(_0x4a369f(0x1e1))/0x8)+parseInt(_0x4a369f(0x1c4))/0x9*(-parseInt(_0x4a369f(0x1e2))/0xa)+parseInt(_0x4a369f(0x1d4))/0xb;if(_0x193478===_0x3fcd35)break;else _0x51bc29['push'](_0x51bc29['shift']());}catch(_0x389a21){_0x51bc29['push'](_0x51bc29['shift']());}}}(a70_0x500a,0x495a3));import a70_0xcc05e3 from'node:fs';import a70_0x25908e from'node:path';import a70_0x552e17 from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a70_0x505497(0x1c2);function a70_0x2d4e(_0x44e6f3,_0x4d05f0){_0x44e6f3=_0x44e6f3-0x1c1;const _0x500aad=a70_0x500a();let _0x2d4e89=_0x500aad[_0x44e6f3];return _0x2d4e89;}function isNonNumericVersion(_0x28e945){const _0x34f762=a70_0x505497,_0x474a32=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x474a32[_0x34f762(0x1d3)](_0xedc2cc=>_0xedc2cc['test'](_0x28e945));}function getInstalledVersion(_0xf1276b,_0xdca16d){const _0x1f0867=a70_0x505497;try{const _0xea60a3=a70_0x25908e[_0x1f0867(0x1ca)](_0xf1276b,_0x1f0867(0x1d2),_0xdca16d,_0x1f0867(0x1c9));if(a70_0xcc05e3['existsSync'](_0xea60a3)){const _0x3e76e3=JSON[_0x1f0867(0x1dd)](a70_0xcc05e3[_0x1f0867(0x1c5)](_0xea60a3,'utf-8'));return _0x3e76e3[_0x1f0867(0x1cf)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5caffe=a70_0x505497;try{const _0x29826f=await getCdnConfig();return _0x29826f?.[_0x5caffe(0x1c8)]?.[_0x5caffe(0x1c7)]?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x5e65be=a70_0x505497;try{const _0xb7892d=await getCdnConfig();return _0xb7892d?.[_0x5e65be(0x1c8)]?.[_0x5e65be(0x1c7)]?.[_0x5e65be(0x1d5)]||_0x5e65be(0x1cb);}catch{return _0x5e65be(0x1cb);}}export async function checkSdkVersion(_0x10d990){const _0x1c024a=a70_0x505497,_0x29f5b4=a70_0x25908e[_0x1c024a(0x1ca)](_0x10d990,'package.json'),[_0x46d2a1,_0x3056ba]=await Promise[_0x1c024a(0x1de)]([getSdkStableVersion(),getSdkPackageName()]),_0x5219b3=_0x46d2a1||FALLBACK_MIN_SDK_VERSION;if(!a70_0xcc05e3[_0x1c024a(0x1c6)](_0x29f5b4))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5219b3,'packageName':_0x3056ba,'stableVersion':_0x46d2a1};try{const _0x2883db=JSON[_0x1c024a(0x1dd)](a70_0xcc05e3[_0x1c024a(0x1c5)](_0x29f5b4,_0x1c024a(0x1ce))),_0x55b47c=_0x2883db[_0x1c024a(0x1c3)]||{},_0x1d53bc=_0x2883db[_0x1c024a(0x1e4)]||{},_0x1368e0=_0x55b47c[_0x3056ba]||_0x1d53bc[_0x3056ba];if(!_0x1368e0)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5219b3,'packageName':_0x3056ba,'stableVersion':_0x46d2a1};let _0x5d2b52=getInstalledVersion(_0x10d990,_0x3056ba);!_0x5d2b52&&(_0x5d2b52=_0x1368e0);if(isNonNumericVersion(_0x1368e0))return{'installed':!![],'version':_0x5d2b52,'needsUpgrade':![],'minVersion':_0x5219b3,'packageName':_0x3056ba,'stableVersion':_0x46d2a1};const _0x434925=a70_0x552e17[_0x1c024a(0x1d8)](_0x5d2b52),_0x4f2e15=a70_0x552e17[_0x1c024a(0x1d8)](_0x5219b3),_0x57bb16=_0x434925&&_0x4f2e15?a70_0x552e17['lt'](_0x434925,_0x4f2e15):![];return{'installed':!![],'version':_0x5d2b52,'needsUpgrade':_0x57bb16,'minVersion':_0x5219b3,'packageName':_0x3056ba,'stableVersion':_0x46d2a1};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5219b3,'packageName':_0x3056ba,'stableVersion':_0x46d2a1};}}export function checkSdkVersionSync(_0x56dadb){const _0x1bf6ee=a70_0x505497,_0x47296b=a70_0x25908e[_0x1bf6ee(0x1ca)](_0x56dadb,_0x1bf6ee(0x1c9)),_0x5b50a0=_0x1bf6ee(0x1cb);if(!a70_0xcc05e3['existsSync'](_0x47296b))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b50a0,'stableVersion':null};try{const _0x50b471=JSON['parse'](a70_0xcc05e3[_0x1bf6ee(0x1c5)](_0x47296b,_0x1bf6ee(0x1ce))),_0x1e48e2=_0x50b471[_0x1bf6ee(0x1c3)]||{},_0x12f926=_0x50b471[_0x1bf6ee(0x1e4)]||{},_0x1facc0=_0x1e48e2[_0x5b50a0]||_0x12f926[_0x5b50a0];if(!_0x1facc0)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b50a0,'stableVersion':null};let _0x2c89ed=getInstalledVersion(_0x56dadb,_0x5b50a0);!_0x2c89ed&&(_0x2c89ed=_0x1facc0);if(isNonNumericVersion(_0x1facc0))return{'installed':!![],'version':_0x2c89ed,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b50a0,'stableVersion':null};const _0x583bfa=a70_0x552e17[_0x1bf6ee(0x1d8)](_0x2c89ed),_0x1e018d=_0x583bfa?a70_0x552e17['lt'](_0x583bfa,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2c89ed,'needsUpgrade':_0x1e018d,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b50a0,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b50a0,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x2d5370){const _0x28e9e1=a70_0x505497;if(!_0x2d5370[_0x28e9e1(0x1e5)])return;const _0x44bc63=_0x28e9e1(0x1d6),_0x159d24='\x1b[0m',_0x118ee5=_0x28e9e1(0x1e3),_0x59dd7b=_0x2d5370['packageName']||_0x28e9e1(0x1cb);console['log'](),console['log'](''+_0x44bc63+_0x118ee5+'↪\x20SDK\x20版本更新'+_0x159d24),console[_0x28e9e1(0x1cc)](_0x44bc63+_0x28e9e1(0x1d1)+_0x59dd7b+'@'+_0x2d5370[_0x28e9e1(0x1cf)]+_0x159d24),console['log'](_0x44bc63+'\x20\x20\x20稳定版本:\x20'+(_0x2d5370[_0x28e9e1(0x1d7)]||_0x2d5370['minVersion'])+_0x159d24),console[_0x28e9e1(0x1cc)](_0x44bc63+_0x28e9e1(0x1c1)+_0x59dd7b+'@'+(_0x2d5370['stableVersion']||_0x28e9e1(0x1cd))+_0x159d24),console[_0x28e9e1(0x1cc)]();}
1
+ const a73_0x1e23f9=a73_0x164e;(function(_0x16f4a5,_0x1d99ca){const _0x652b81=a73_0x164e,_0x18f0e1=_0x16f4a5();while(!![]){try{const _0x52f62d=parseInt(_0x652b81(0x160))/0x1+-parseInt(_0x652b81(0x16a))/0x2*(parseInt(_0x652b81(0x15d))/0x3)+-parseInt(_0x652b81(0x159))/0x4*(-parseInt(_0x652b81(0x15e))/0x5)+-parseInt(_0x652b81(0x163))/0x6*(parseInt(_0x652b81(0x155))/0x7)+parseInt(_0x652b81(0x16c))/0x8+parseInt(_0x652b81(0x161))/0x9+-parseInt(_0x652b81(0x151))/0xa;if(_0x52f62d===_0x1d99ca)break;else _0x18f0e1['push'](_0x18f0e1['shift']());}catch(_0x52ffd1){_0x18f0e1['push'](_0x18f0e1['shift']());}}}(a73_0x4c1a,0x7c32a));import a73_0xeeed99 from'node:fs';function a73_0x164e(_0x236f45,_0x4d9432){_0x236f45=_0x236f45-0x149;const _0x4c1a85=a73_0x4c1a();let _0x164e1f=_0x4c1a85[_0x236f45];return _0x164e1f;}import a73_0x2ad3bd from'node:path';import a73_0x3e61a1 from'semver';import{getCdnConfig}from'./cdn-config.js';import a73_0x16e6de from'../i18n/index.js';const t=a73_0x16e6de['t'][a73_0x1e23f9(0x15c)](a73_0x16e6de),FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0xd7092c){const _0x130388=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x130388['some'](_0x1d0107=>_0x1d0107['test'](_0xd7092c));}function getInstalledVersion(_0x286098,_0x118503){const _0x25ed93=a73_0x1e23f9;try{const _0x53892c=a73_0x2ad3bd[_0x25ed93(0x15a)](_0x286098,_0x25ed93(0x14a),_0x118503,_0x25ed93(0x152));if(a73_0xeeed99['existsSync'](_0x53892c)){const _0x3a9247=JSON[_0x25ed93(0x153)](a73_0xeeed99['readFileSync'](_0x53892c,'utf-8'));return _0x3a9247[_0x25ed93(0x149)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1fa686=a73_0x1e23f9;try{const _0xdbb4c1=await getCdnConfig();return _0xdbb4c1?.[_0x1fa686(0x14b)]?.[_0x1fa686(0x154)]?.[_0x1fa686(0x14d)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x40f4db=a73_0x1e23f9;try{const _0x4390aa=await getCdnConfig();return _0x4390aa?.[_0x40f4db(0x14b)]?.[_0x40f4db(0x154)]?.[_0x40f4db(0x16b)]||_0x40f4db(0x157);}catch{return _0x40f4db(0x157);}}function a73_0x4c1a(){const _0x42dd7f=['upgrade.sdk.current','stableVersion','npm\x20install\x20','readFileSync','dependencies','7221460egiVRM','package.json','parse','node','721TjomCa','upgrade.sdk.stable','@lovrabet/sdk','upgrade.sdk.command','4GMGCrF','join','devDependencies','bind','60iesera','1345915vmIgBG','upgrade.sdk.title','489576cGzzqh','6902100PuHsBF','log','30036bcFnQa','coerce','\x1b[1m','\x1b[0m','existsSync','\x1b[33m','utf8','834HufKAy','packageName','1833272knyQlr','version','node_modules','sdk'];a73_0x4c1a=function(){return _0x42dd7f;};return a73_0x4c1a();}export async function checkSdkVersion(_0x49fb45){const _0x451df6=a73_0x1e23f9,_0x3ec213=a73_0x2ad3bd['join'](_0x49fb45,_0x451df6(0x152)),[_0x59e6c2,_0xdd00d0]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0xbaac4d=_0x59e6c2||FALLBACK_MIN_SDK_VERSION;if(!a73_0xeeed99[_0x451df6(0x167)](_0x3ec213))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};try{const _0x14e98f=JSON[_0x451df6(0x153)](a73_0xeeed99[_0x451df6(0x14f)](_0x3ec213,'utf8')),_0x23d98f=_0x14e98f[_0x451df6(0x150)]||{},_0x45cba7=_0x14e98f[_0x451df6(0x15b)]||{},_0x2391a7=_0x23d98f[_0xdd00d0]||_0x45cba7[_0xdd00d0];if(!_0x2391a7)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};let _0x6d2df4=getInstalledVersion(_0x49fb45,_0xdd00d0);!_0x6d2df4&&(_0x6d2df4=_0x2391a7);if(isNonNumericVersion(_0x2391a7))return{'installed':!![],'version':_0x6d2df4,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};const _0x341239=a73_0x3e61a1[_0x451df6(0x164)](_0x6d2df4),_0x164912=a73_0x3e61a1[_0x451df6(0x164)](_0xbaac4d),_0x2bb276=_0x341239&&_0x164912?a73_0x3e61a1['lt'](_0x341239,_0x164912):![];return{'installed':!![],'version':_0x6d2df4,'needsUpgrade':_0x2bb276,'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};}}export function checkSdkVersionSync(_0x48ce04){const _0x275963=a73_0x1e23f9,_0x4a4f3f=a73_0x2ad3bd[_0x275963(0x15a)](_0x48ce04,_0x275963(0x152)),_0x1bcfdf='@lovrabet/sdk';if(!a73_0xeeed99[_0x275963(0x167)](_0x4a4f3f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};try{const _0xbdea37=JSON['parse'](a73_0xeeed99[_0x275963(0x14f)](_0x4a4f3f,_0x275963(0x169))),_0x909ce9=_0xbdea37[_0x275963(0x150)]||{},_0x1c425d=_0xbdea37[_0x275963(0x15b)]||{},_0xf6f6b8=_0x909ce9[_0x1bcfdf]||_0x1c425d[_0x1bcfdf];if(!_0xf6f6b8)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};let _0xdd1165=getInstalledVersion(_0x48ce04,_0x1bcfdf);!_0xdd1165&&(_0xdd1165=_0xf6f6b8);if(isNonNumericVersion(_0xf6f6b8))return{'installed':!![],'version':_0xdd1165,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};const _0x46c810=a73_0x3e61a1['coerce'](_0xdd1165),_0x382ae0=_0x46c810?a73_0x3e61a1['lt'](_0x46c810,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xdd1165,'needsUpgrade':_0x382ae0,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4eb45b){const _0x8e288c=a73_0x1e23f9;if(!_0x4eb45b['needsUpgrade'])return;const _0x3a193e=_0x8e288c(0x168),_0x3f2cbc=_0x8e288c(0x166),_0x3af19a=_0x8e288c(0x165),_0x2ff952=_0x4eb45b['packageName']||_0x8e288c(0x157),_0x8759e0=_0x4eb45b[_0x8e288c(0x14d)]||_0x4eb45b['minVersion'],_0x364114=_0x8e288c(0x14e)+_0x2ff952+'@'+(_0x8759e0||'latest');console[_0x8e288c(0x162)](),console[_0x8e288c(0x162)](''+_0x3a193e+_0x3af19a+t(_0x8e288c(0x15f))+_0x3f2cbc),console['log'](''+_0x3a193e+t(_0x8e288c(0x14c),{'package':_0x2ff952,'version':_0x4eb45b['version']})+_0x3f2cbc),console['log'](''+_0x3a193e+t(_0x8e288c(0x156),{'version':_0x8759e0})+_0x3f2cbc),console[_0x8e288c(0x162)](''+_0x3a193e+t(_0x8e288c(0x158),{'command':_0x364114})+_0x3f2cbc),console[_0x8e288c(0x162)]();}
@@ -1 +1 @@
1
- (function(_0x3919dc,_0x5aaaff){const _0x427621=a71_0x24e9,_0x13afb9=_0x3919dc();while(!![]){try{const _0x1cb6e0=parseInt(_0x427621(0x14a))/0x1+parseInt(_0x427621(0x15e))/0x2*(-parseInt(_0x427621(0x15f))/0x3)+-parseInt(_0x427621(0x156))/0x4*(-parseInt(_0x427621(0x158))/0x5)+parseInt(_0x427621(0x155))/0x6*(-parseInt(_0x427621(0x14e))/0x7)+parseInt(_0x427621(0x159))/0x8+-parseInt(_0x427621(0x14f))/0x9+parseInt(_0x427621(0x15c))/0xa*(-parseInt(_0x427621(0x14b))/0xb);if(_0x1cb6e0===_0x5aaaff)break;else _0x13afb9['push'](_0x13afb9['shift']());}catch(_0x58328f){_0x13afb9['push'](_0x13afb9['shift']());}}}(a71_0x1b81,0xbd1af));function a71_0x1b81(){const _0x72d298=['710bPWdfz','1.0.0','78922rxKxhy','3FgoAqP','../..','434085wARjxO','57497CuNPpY','some','\x20\x20\x20当前\x20CLI\x20版本:\x20','6384juRwMd','2610063WOPShL','\x1b[1m','coerce','stableVersion','package.json','cli','3462MytXsZ','4XHwxxm','parse','220755sqUEjV','12185184muLXfy','currentVersion','log'];a71_0x1b81=function(){return _0x72d298;};return a71_0x1b81();}import{readFileSync}from'node:fs';function a71_0x24e9(_0x20929a,_0x33c502){_0x20929a=_0x20929a-0x149;const _0x1b8160=a71_0x1b81();let _0x24e9fc=_0x1b8160[_0x20929a];return _0x24e9fc;}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a71_0x40d0c2 from'semver';import{getCdnConfig}from'./cdn-config.js';function getCurrentCliVersion(){const _0x2059e8=a71_0x24e9;try{const _0x4eecf9=fileURLToPath(import.meta.url),_0x57c1d6=resolve(dirname(_0x4eecf9),_0x2059e8(0x149)),_0x40838c=resolve(_0x57c1d6,_0x2059e8(0x153)),_0x3b3cb7=JSON[_0x2059e8(0x157)](readFileSync(_0x40838c,'utf-8'));return _0x3b3cb7['version']||_0x2059e8(0x15d);}catch{return _0x2059e8(0x15d);}}function isNonNumericVersion(_0x4fe75b){const _0x1bf9a4=a71_0x24e9,_0xdc9800=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0xdc9800[_0x1bf9a4(0x14c)](_0x428a57=>_0x428a57['test'](_0x4fe75b));}export async function checkCliVersion(){const _0x381d3c=a71_0x24e9,_0xc1622b=getCurrentCliVersion(),_0x4bf85f=await getCdnConfig(),_0x10612e=_0x4bf85f?.[_0x381d3c(0x154)]?.[_0x381d3c(0x152)]||null;let _0x392ff0=![];if(_0x10612e)try{const _0x5da40b=a71_0x40d0c2[_0x381d3c(0x151)](_0xc1622b),_0x5d77a7=a71_0x40d0c2[_0x381d3c(0x151)](_0x10612e);_0x5da40b&&_0x5d77a7&&(_0x392ff0=a71_0x40d0c2['lt'](_0x5da40b,_0x5d77a7));}catch{_0x392ff0=![];}return{'currentVersion':_0xc1622b,'stableVersion':_0x10612e,'needsUpgrade':_0x392ff0,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x3e1dcf){const _0x25ac7c=a71_0x24e9;if(!_0x3e1dcf['needsUpgrade'])return;const _0x296956='\x1b[33m',_0x2fe9da='\x1b[0m',_0x1cdea6=_0x25ac7c(0x150);console[_0x25ac7c(0x15b)](),console[_0x25ac7c(0x15b)](''+_0x296956+_0x1cdea6+'↪\x20新版本可用'+_0x2fe9da),console[_0x25ac7c(0x15b)](_0x296956+_0x25ac7c(0x14d)+_0x3e1dcf[_0x25ac7c(0x15a)]+_0x2fe9da),console[_0x25ac7c(0x15b)](_0x296956+'\x20\x20\x20稳定版本:\x20'+_0x3e1dcf['stableVersion']+_0x2fe9da),console[_0x25ac7c(0x15b)](_0x296956+'\x20\x20\x20升级命令:\x20npm\x20install\x20-g\x20@lovrabet/cli@latest'+_0x2fe9da),console[_0x25ac7c(0x15b)]();}
1
+ const a74_0x118a85=a74_0x5d85;(function(_0x337728,_0x1761d0){const _0x3387fb=a74_0x5d85,_0x16a2f9=_0x337728();while(!![]){try{const _0x42aac8=-parseInt(_0x3387fb(0x13f))/0x1*(-parseInt(_0x3387fb(0x133))/0x2)+parseInt(_0x3387fb(0x139))/0x3+-parseInt(_0x3387fb(0x145))/0x4*(-parseInt(_0x3387fb(0x14f))/0x5)+-parseInt(_0x3387fb(0x147))/0x6*(parseInt(_0x3387fb(0x14e))/0x7)+-parseInt(_0x3387fb(0x13b))/0x8+-parseInt(_0x3387fb(0x141))/0x9+parseInt(_0x3387fb(0x140))/0xa*(-parseInt(_0x3387fb(0x136))/0xb);if(_0x42aac8===_0x1761d0)break;else _0x16a2f9['push'](_0x16a2f9['shift']());}catch(_0x2205fc){_0x16a2f9['push'](_0x16a2f9['shift']());}}}(a74_0x2b24,0x84394));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a74_0x2f8539 from'semver';import{getCdnConfig}from'./cdn-config.js';import a74_0x5db28c from'../i18n/index.js';const t=a74_0x5db28c['t'][a74_0x118a85(0x13c)](a74_0x5db28c);function getCurrentCliVersion(){const _0x475f19=a74_0x118a85;try{const _0x2176be=fileURLToPath(import.meta.url),_0xb04173=resolve(dirname(_0x2176be),_0x475f19(0x14a)),_0x310692=resolve(_0xb04173,_0x475f19(0x137)),_0x21f89d=JSON[_0x475f19(0x131)](readFileSync(_0x310692,_0x475f19(0x135)));return _0x21f89d[_0x475f19(0x13e)]||_0x475f19(0x143);}catch{return'1.0.0';}}function a74_0x5d85(_0x216851,_0x4a179b){_0x216851=_0x216851-0x12f;const _0x2b24c5=a74_0x2b24();let _0x5d85cf=_0x2b24c5[_0x216851];return _0x5d85cf;}function isNonNumericVersion(_0xdb38f4){const _0x52e2a6=a74_0x118a85,_0x21941d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x21941d[_0x52e2a6(0x12f)](_0x32d94b=>_0x32d94b[_0x52e2a6(0x14d)](_0xdb38f4));}export async function checkCliVersion(){const _0x5db3cb=a74_0x118a85,_0x2e67d1=getCurrentCliVersion(),_0x10d2da=await getCdnConfig(),_0x2a3a48=_0x10d2da?.[_0x5db3cb(0x14b)]?.[_0x5db3cb(0x13d)]||null;let _0x18e43e=![];if(_0x2a3a48)try{const _0x2796d6=a74_0x2f8539[_0x5db3cb(0x14c)](_0x2e67d1),_0xfd5f86=a74_0x2f8539[_0x5db3cb(0x14c)](_0x2a3a48);_0x2796d6&&_0xfd5f86&&(_0x18e43e=a74_0x2f8539['lt'](_0x2796d6,_0xfd5f86));}catch{_0x18e43e=![];}return{'currentVersion':_0x2e67d1,'stableVersion':_0x2a3a48,'needsUpgrade':_0x18e43e,'isPreRelease':![]};}function a74_0x2b24(){const _0x131eb8=['63900tholSR','some','upgrade.cli.title','parse','upgrade.cli.command','1910882rdYgSx','needsUpgrade','utf-8','7557hIfmxM','package.json','upgrade.cli.current','2318748ylpqRf','currentVersion','2200464tLOhkH','bind','stableVersion','version','1qEXcOk','7960pUSucC','562446VvPENK','\x1b[0m','1.0.0','log','96XKBRjZ','npm\x20install\x20-g\x20@lovrabet/cli@latest','366KRMySm','upgrade.cli.stable','\x1b[33m','../..','cli','coerce','test','69895kalkiU'];a74_0x2b24=function(){return _0x131eb8;};return a74_0x2b24();}export function printCliUpgradeWarning(_0x4ef4b3){const _0x3e97b8=a74_0x118a85;if(!_0x4ef4b3[_0x3e97b8(0x134)])return;const _0x9accc8=_0x3e97b8(0x149),_0x43c450=_0x3e97b8(0x142),_0x10dd54='\x1b[1m',_0x5e71e8=_0x3e97b8(0x146);console[_0x3e97b8(0x144)](),console['log'](''+_0x9accc8+_0x10dd54+t(_0x3e97b8(0x130))+_0x43c450),console[_0x3e97b8(0x144)](''+_0x9accc8+t(_0x3e97b8(0x138),{'version':_0x4ef4b3[_0x3e97b8(0x13a)]})+_0x43c450),console['log'](''+_0x9accc8+t(_0x3e97b8(0x148),{'version':_0x4ef4b3['stableVersion']})+_0x43c450),console['log'](''+_0x9accc8+t(_0x3e97b8(0x132),{'command':_0x5e71e8})+_0x43c450),console[_0x3e97b8(0x144)]();}
@@ -1 +1 @@
1
- const a72_0x2c15e3=a72_0x58f1;(function(_0x22641b,_0x3a413f){const _0x453b19=a72_0x58f1,_0x193b12=_0x22641b();while(!![]){try{const _0x2cfb8a=-parseInt(_0x453b19(0x110))/0x1+parseInt(_0x453b19(0x113))/0x2*(-parseInt(_0x453b19(0x10d))/0x3)+parseInt(_0x453b19(0x10c))/0x4+parseInt(_0x453b19(0x116))/0x5*(parseInt(_0x453b19(0x111))/0x6)+-parseInt(_0x453b19(0x10f))/0x7+-parseInt(_0x453b19(0x10e))/0x8+parseInt(_0x453b19(0x10a))/0x9*(parseInt(_0x453b19(0x10b))/0xa);if(_0x2cfb8a===_0x3a413f)break;else _0x193b12['push'](_0x193b12['shift']());}catch(_0x2b7d30){_0x193b12['push'](_0x193b12['shift']());}}}(a72_0x4aef,0x8238a));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';function a72_0x58f1(_0x174409,_0x191bde){_0x174409=_0x174409-0x10a;const _0x4aefc0=a72_0x4aef();let _0x58f1c6=_0x4aefc0[_0x174409];return _0x58f1c6;}import{initEnv}from'../constant/env.js';export const projectConfigPath=resolve(process[a72_0x2c15e3(0x11d)](),a72_0x2c15e3(0x117));export const globalConfigPath=resolve(homedir(),'.lovrabetrc');export function readConfig(_0x12bd5c){const _0x57b8da=a72_0x2c15e3;let _0x1b0482={};try{if(existsSync(globalConfigPath)){const _0x2329f4=readFileSync(globalConfigPath,{'encoding':_0x57b8da(0x115)});_0x2329f4&&(_0x1b0482=JSON[_0x57b8da(0x119)](_0x2329f4));}}catch(_0x794a3b){}try{const _0x426e7e=_0x12bd5c?resolve(_0x12bd5c,_0x57b8da(0x117)):projectConfigPath;if(existsSync(_0x426e7e)){const _0x36f900=readFileSync(_0x426e7e,{'encoding':'utf8'});if(_0x36f900){const _0x335a7d=JSON[_0x57b8da(0x119)](_0x36f900);_0x1b0482={..._0x1b0482,..._0x335a7d};}}}catch(_0x34f093){}return _0x1b0482[_0x57b8da(0x11c)]&&typeof _0x1b0482[_0x57b8da(0x11c)]===_0x57b8da(0x11b)&&initEnv(_0x1b0482[_0x57b8da(0x11c)]),_0x1b0482;}export function getConfigAppCode(){const _0x15f0e1=a72_0x2c15e3;let _0x2d6a45={},_0x2c70ff={};try{if(existsSync(globalConfigPath)){const _0x58e02a=readFileSync(globalConfigPath,{'encoding':_0x15f0e1(0x115)});_0x58e02a&&(_0x2c70ff=JSON['parse'](_0x58e02a));}}catch(_0x169ecd){}try{if(existsSync(projectConfigPath)){const _0x5bf837=readFileSync(projectConfigPath,{'encoding':'utf8'});_0x5bf837&&(_0x2d6a45=JSON['parse'](_0x5bf837));}}catch(_0x50b732){}let _0x18981d;if(_0x15f0e1(0x11a)in _0x2d6a45)_0x18981d=_0x2d6a45[_0x15f0e1(0x11a)];else{if(_0x15f0e1(0x112)in _0x2d6a45)_0x18981d=_0x2d6a45['app'];else{if(_0x15f0e1(0x11a)in _0x2c70ff)_0x18981d=_0x2c70ff[_0x15f0e1(0x11a)];else _0x15f0e1(0x112)in _0x2c70ff&&(_0x18981d=_0x2c70ff[_0x15f0e1(0x112)]);}}if(typeof _0x18981d!==_0x15f0e1(0x11b)||_0x18981d['trim']()==='')return undefined;return _0x18981d;}function a72_0x4aef(){const _0x5d2769=['appcode','string','env','cwd','9873lKMRui','8180BlnozR','517772lNzKos','1217427lNZxbo','3977936FNSiFw','1264781xqSxWl','179309gBrmwI','1626GGBhih','app','2XeOzMJ','replace','utf8','14200BgsQQI','.lovrabetrc','template_base_url','parse'];a72_0x4aef=function(){return _0x5d2769;};return a72_0x4aef();}export function isInProject(){return existsSync(projectConfigPath);}export function getTemplateBaseUrl(){const _0x259a5b=a72_0x2c15e3,_0x92429a=readConfig();if(_0x92429a['template_base_url']&&typeof _0x92429a['template_base_url']===_0x259a5b(0x11b))return _0x92429a[_0x259a5b(0x118)][_0x259a5b(0x114)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-cli';}
1
+ const a75_0x10b03a=a75_0x49e7;(function(_0x4d8a6f,_0x263080){const _0x2f9667=a75_0x49e7,_0x1e9789=_0x4d8a6f();while(!![]){try{const _0x56072a=-parseInt(_0x2f9667(0x6b))/0x1*(parseInt(_0x2f9667(0x72))/0x2)+parseInt(_0x2f9667(0x6a))/0x3*(-parseInt(_0x2f9667(0x67))/0x4)+parseInt(_0x2f9667(0x69))/0x5+-parseInt(_0x2f9667(0x73))/0x6+parseInt(_0x2f9667(0x66))/0x7+-parseInt(_0x2f9667(0x70))/0x8+parseInt(_0x2f9667(0x6d))/0x9;if(_0x56072a===_0x263080)break;else _0x1e9789['push'](_0x1e9789['shift']());}catch(_0x460323){_0x1e9789['push'](_0x1e9789['shift']());}}}(a75_0x4f82,0x6a859));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';import{initEnv}from'../constant/env.js';export const projectConfigPath=resolve(process[a75_0x10b03a(0x6f)](),a75_0x10b03a(0x76));export const globalConfigPath=resolve(homedir(),a75_0x10b03a(0x76));export function readConfig(_0x3e11eb){const _0x5abbbb=a75_0x10b03a;let _0x47c6b5={};try{if(existsSync(globalConfigPath)){const _0x142ecb=readFileSync(globalConfigPath,{'encoding':_0x5abbbb(0x64)});_0x142ecb&&(_0x47c6b5=JSON[_0x5abbbb(0x77)](_0x142ecb));}}catch(_0x1e0f39){}try{const _0x5ad731=_0x3e11eb?resolve(_0x3e11eb,'.lovrabetrc'):projectConfigPath;if(existsSync(_0x5ad731)){const _0x58b8ae=readFileSync(_0x5ad731,{'encoding':'utf8'});if(_0x58b8ae){const _0x20b70c=JSON[_0x5abbbb(0x77)](_0x58b8ae);_0x47c6b5={..._0x47c6b5,..._0x20b70c};}}}catch(_0x262e94){}return _0x47c6b5[_0x5abbbb(0x6e)]&&typeof _0x47c6b5['env']===_0x5abbbb(0x68)&&initEnv(_0x47c6b5[_0x5abbbb(0x6e)]),_0x47c6b5;}export function getConfigAppCode(){const _0x5df1fb=a75_0x10b03a;let _0x13362a={},_0x2249e0={};try{if(existsSync(globalConfigPath)){const _0x42abdf=readFileSync(globalConfigPath,{'encoding':_0x5df1fb(0x64)});_0x42abdf&&(_0x2249e0=JSON['parse'](_0x42abdf));}}catch(_0x2e8ceb){}try{if(existsSync(projectConfigPath)){const _0x4575fc=readFileSync(projectConfigPath,{'encoding':'utf8'});_0x4575fc&&(_0x13362a=JSON[_0x5df1fb(0x77)](_0x4575fc));}}catch(_0x4f4cec){}let _0x52035e;if('appcode'in _0x13362a)_0x52035e=_0x13362a[_0x5df1fb(0x65)];else{if(_0x5df1fb(0x71)in _0x13362a)_0x52035e=_0x13362a[_0x5df1fb(0x71)];else{if(_0x5df1fb(0x65)in _0x2249e0)_0x52035e=_0x2249e0[_0x5df1fb(0x65)];else _0x5df1fb(0x71)in _0x2249e0&&(_0x52035e=_0x2249e0[_0x5df1fb(0x71)]);}}if(typeof _0x52035e!==_0x5df1fb(0x68)||_0x52035e[_0x5df1fb(0x75)]()==='')return undefined;return _0x52035e;}export function isInProject(){return existsSync(projectConfigPath);}function a75_0x4f82(){const _0x41b9f2=['24663eOgwKg','8poDwgL','template_base_url','14226048QDidhN','env','cwd','1402592SFKsKX','app','193370tIwHio','4533108YKRrPj','https://g.lovrabet.com/dist/lovrabet-cli','trim','.lovrabetrc','parse','utf8','appcode','3441907RrMqON','156UwPXht','string','1944405syLDUP'];a75_0x4f82=function(){return _0x41b9f2;};return a75_0x4f82();}function a75_0x49e7(_0x2c4339,_0x168853){_0x2c4339=_0x2c4339-0x64;const _0x4f8249=a75_0x4f82();let _0x49e74a=_0x4f8249[_0x2c4339];return _0x49e74a;}export function getTemplateBaseUrl(){const _0x2b630b=a75_0x10b03a,_0x57982d=readConfig();if(_0x57982d[_0x2b630b(0x6c)]&&typeof _0x57982d[_0x2b630b(0x6c)]===_0x2b630b(0x68))return _0x57982d['template_base_url']['replace'](/\/$/,'');return _0x2b630b(0x74);}
@@ -1 +1 @@
1
- (function(_0x4d7b6d,_0x4cc7dd){const _0x4225ba=a73_0x3008,_0x58ff3e=_0x4d7b6d();while(!![]){try{const _0x2d52da=-parseInt(_0x4225ba(0xb5))/0x1*(-parseInt(_0x4225ba(0xb7))/0x2)+-parseInt(_0x4225ba(0xad))/0x3*(-parseInt(_0x4225ba(0xb0))/0x4)+parseInt(_0x4225ba(0xb1))/0x5+-parseInt(_0x4225ba(0xaf))/0x6+parseInt(_0x4225ba(0xb6))/0x7+-parseInt(_0x4225ba(0xb8))/0x8*(parseInt(_0x4225ba(0xae))/0x9)+parseInt(_0x4225ba(0xb3))/0xa*(-parseInt(_0x4225ba(0xb2))/0xb);if(_0x2d52da===_0x4cc7dd)break;else _0x58ff3e['push'](_0x58ff3e['shift']());}catch(_0x531fb5){_0x58ff3e['push'](_0x58ff3e['shift']());}}}(a73_0x71a4,0xa71cf));function a73_0x3008(_0x337fa3,_0x3b20c6){_0x337fa3=_0x337fa3-0xab;const _0x71a4ad=a73_0x71a4();let _0x3008c4=_0x71a4ad[_0x337fa3];return _0x3008c4;}import a73_0x49fef9 from'node:path';function a73_0x71a4(){const _0x4bddd4=['name','mkdirSync','isDirectory','复制目录时出错:','join','1512012IfobNp','39339EgffYN','3291228gfEAHK','8XfZqmt','1922635fcSPrV','15323jGucjI','4710pMWCQV','copyFileSync','5739mBAaed','1383263mGMeJU','386etzOKI','1480NqQeIy','error'];a73_0x71a4=function(){return _0x4bddd4;};return a73_0x71a4();}import a73_0x1ebd0a from'node:fs';export async function copyDirectory(_0x34d99b,_0x3aeb6f){const _0x80517c=a73_0x3008;try{const _0x48af9d=a73_0x1ebd0a['readdirSync'](_0x34d99b,{'withFileTypes':!![]});a73_0x1ebd0a[_0x80517c(0xbb)](_0x3aeb6f,{'recursive':!![]});for(const _0x49bafc of _0x48af9d){const _0x717396=a73_0x49fef9['join'](_0x34d99b,_0x49bafc[_0x80517c(0xba)]),_0x4f7ddf=a73_0x49fef9[_0x80517c(0xac)](_0x3aeb6f,_0x49bafc[_0x80517c(0xba)]);_0x49bafc[_0x80517c(0xbc)]()?await copyDirectory(_0x717396,_0x4f7ddf):a73_0x1ebd0a[_0x80517c(0xb4)](_0x717396,_0x4f7ddf);}}catch(_0x3f9227){console[_0x80517c(0xb9)](_0x80517c(0xab),_0x3f9227);}}
1
+ (function(_0x5bf947,_0x38743e){const _0x310eeb=a76_0x53ad,_0x37edd6=_0x5bf947();while(!![]){try{const _0x2ffa17=-parseInt(_0x310eeb(0x7e))/0x1+parseInt(_0x310eeb(0x7c))/0x2+-parseInt(_0x310eeb(0x7f))/0x3+-parseInt(_0x310eeb(0x85))/0x4*(-parseInt(_0x310eeb(0x78))/0x5)+parseInt(_0x310eeb(0x83))/0x6*(parseInt(_0x310eeb(0x81))/0x7)+-parseInt(_0x310eeb(0x7d))/0x8+parseInt(_0x310eeb(0x7a))/0x9;if(_0x2ffa17===_0x38743e)break;else _0x37edd6['push'](_0x37edd6['shift']());}catch(_0x3bdfd0){_0x37edd6['push'](_0x37edd6['shift']());}}}(a76_0x33fe,0x690ca));import a76_0x223ee3 from'node:path';import a76_0xc270eb from'node:fs';function a76_0x53ad(_0x3ba3f5,_0x5a8d8a){_0x3ba3f5=_0x3ba3f5-0x77;const _0x33fe19=a76_0x33fe();let _0x53addc=_0x33fe19[_0x3ba3f5];return _0x53addc;}function a76_0x33fe(){const _0x399b49=['copyFileSync','2152fUCDXU','name','6085dEotyF','join','4951197lCnhjo','复制目录时出错:','1448292BjxGNB','6791384ipXvdX','182588QEHJTb','1588023SXZdET','error','63EiKYSN','isDirectory','41406nVakxS'];a76_0x33fe=function(){return _0x399b49;};return a76_0x33fe();}export async function copyDirectory(_0x357167,_0x466276){const _0x1f07b2=a76_0x53ad;try{const _0x2cd4de=a76_0xc270eb['readdirSync'](_0x357167,{'withFileTypes':!![]});a76_0xc270eb['mkdirSync'](_0x466276,{'recursive':!![]});for(const _0x53ff2b of _0x2cd4de){const _0x2cd34e=a76_0x223ee3[_0x1f07b2(0x79)](_0x357167,_0x53ff2b[_0x1f07b2(0x77)]),_0x34d434=a76_0x223ee3[_0x1f07b2(0x79)](_0x466276,_0x53ff2b[_0x1f07b2(0x77)]);_0x53ff2b[_0x1f07b2(0x82)]()?await copyDirectory(_0x2cd34e,_0x34d434):a76_0xc270eb[_0x1f07b2(0x84)](_0x2cd34e,_0x34d434);}}catch(_0x2c236){console[_0x1f07b2(0x80)](_0x1f07b2(0x7b),_0x2c236);}}
@@ -1 +1 @@
1
- function a74_0x1d45(_0x36400d,_0x404678){_0x36400d=_0x36400d-0x152;const _0x3ca5fe=a74_0x3ca5();let _0x1d45ca=_0x3ca5fe[_0x36400d];return _0x1d45ca;}(function(_0x14d6c9,_0x50e2ba){const _0x53c839=a74_0x1d45,_0x464e42=_0x14d6c9();while(!![]){try{const _0x17930e=-parseInt(_0x53c839(0x159))/0x1+-parseInt(_0x53c839(0x15a))/0x2*(-parseInt(_0x53c839(0x152))/0x3)+parseInt(_0x53c839(0x156))/0x4*(-parseInt(_0x53c839(0x157))/0x5)+-parseInt(_0x53c839(0x15c))/0x6*(-parseInt(_0x53c839(0x158))/0x7)+-parseInt(_0x53c839(0x153))/0x8+parseInt(_0x53c839(0x154))/0x9+parseInt(_0x53c839(0x155))/0xa;if(_0x17930e===_0x50e2ba)break;else _0x464e42['push'](_0x464e42['shift']());}catch(_0x31eaf0){_0x464e42['push'](_0x464e42['shift']());}}}(a74_0x3ca5,0xb35fc));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a74_0x3ca5(){const _0x508769=['7356hLRzsI','3fiSARy','6660840AZddXn','12062079BpBGEb','10840030DnyHlH','19300kmqkOU','320GZATMM','2009qSEZPX','1434153ZHTxfn','1068356RBihJA','isDirectory'];a74_0x3ca5=function(){return _0x508769;};return a74_0x3ca5();}export async function copyDir(_0x5d772f,_0x2de4ca){const _0x4a4c0f=a74_0x1d45,_0x615d1a=statSync(_0x5d772f);if(_0x615d1a[_0x4a4c0f(0x15b)]()){!existsSync(_0x2de4ca)&&mkdirSync(_0x2de4ca,{'recursive':!![]});const _0x192a4a=readdirSync(_0x5d772f);for(const _0x2c87f0 of _0x192a4a){await copyDir(join(_0x5d772f,_0x2c87f0),join(_0x2de4ca,_0x2c87f0));}}else copyFileSync(_0x5d772f,_0x2de4ca);}export function ensureDir(_0x5a0d35){!existsSync(_0x5a0d35)&&mkdirSync(_0x5a0d35,{'recursive':!![]});}export function pathExists(_0x4d0ccf){return existsSync(_0x4d0ccf);}
1
+ (function(_0x4d5935,_0x43ac8e){const _0x488a66=a77_0x3e31,_0x1e2cdd=_0x4d5935();while(!![]){try{const _0x111c96=parseInt(_0x488a66(0x126))/0x1*(-parseInt(_0x488a66(0x123))/0x2)+parseInt(_0x488a66(0x11f))/0x3+-parseInt(_0x488a66(0x129))/0x4*(parseInt(_0x488a66(0x128))/0x5)+parseInt(_0x488a66(0x124))/0x6+-parseInt(_0x488a66(0x11e))/0x7*(-parseInt(_0x488a66(0x127))/0x8)+parseInt(_0x488a66(0x122))/0x9*(parseInt(_0x488a66(0x121))/0xa)+-parseInt(_0x488a66(0x120))/0xb*(parseInt(_0x488a66(0x125))/0xc);if(_0x111c96===_0x43ac8e)break;else _0x1e2cdd['push'](_0x1e2cdd['shift']());}catch(_0x40dc64){_0x1e2cdd['push'](_0x1e2cdd['shift']());}}}(a77_0x4174,0xafee5));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x182df5,_0x2eb547){const _0x172d2e=statSync(_0x182df5);if(_0x172d2e['isDirectory']()){!existsSync(_0x2eb547)&&mkdirSync(_0x2eb547,{'recursive':!![]});const _0x5e795d=readdirSync(_0x182df5);for(const _0x59f605 of _0x5e795d){await copyDir(join(_0x182df5,_0x59f605),join(_0x2eb547,_0x59f605));}}else copyFileSync(_0x182df5,_0x2eb547);}function a77_0x4174(){const _0x481a7d=['586564ssuhvr','493300Emnqqt','234pjDMJZ','747896MhTmpG','7218084dQZcTg','108Vmgkyd','2YFXiIK','635288hXJFgA','165KpisVg','153528VHUlXA','28QcPBKC','1235379MgAiEz'];a77_0x4174=function(){return _0x481a7d;};return a77_0x4174();}function a77_0x3e31(_0x1ead6e,_0x5ce852){_0x1ead6e=_0x1ead6e-0x11e;const _0x417417=a77_0x4174();let _0x3e311f=_0x417417[_0x1ead6e];return _0x3e311f;}export function ensureDir(_0x52026f){!existsSync(_0x52026f)&&mkdirSync(_0x52026f,{'recursive':!![]});}export function pathExists(_0x148b50){return existsSync(_0x148b50);}
@@ -1 +1 @@
1
- const a75_0x21bc23=a75_0x465f;(function(_0x3dee26,_0x1e38c6){const _0x2669db=a75_0x465f,_0x355219=_0x3dee26();while(!![]){try{const _0x4351cf=-parseInt(_0x2669db(0x194))/0x1*(-parseInt(_0x2669db(0x1a6))/0x2)+-parseInt(_0x2669db(0x195))/0x3+-parseInt(_0x2669db(0x19d))/0x4+parseInt(_0x2669db(0x19a))/0x5*(-parseInt(_0x2669db(0x198))/0x6)+parseInt(_0x2669db(0x189))/0x7*(-parseInt(_0x2669db(0x17b))/0x8)+-parseInt(_0x2669db(0x18e))/0x9+-parseInt(_0x2669db(0x18c))/0xa*(-parseInt(_0x2669db(0x188))/0xb);if(_0x4351cf===_0x1e38c6)break;else _0x355219['push'](_0x355219['shift']());}catch(_0x2a3773){_0x355219['push'](_0x355219['shift']());}}}(a75_0x5637,0x6d70c));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x20824b=getTemplateBaseUrl();return _0x20824b+'/skills/guides.json';}function getGuidesExtendCdnUrl(){const _0x5b37e6=getTemplateBaseUrl();return _0x5b37e6+'/skills/guides-extend.json';}const CACHE_DIR=join(process[a75_0x21bc23(0x19c)][a75_0x21bc23(0x179)]||process[a75_0x21bc23(0x19c)][a75_0x21bc23(0x1a4)]||'',a75_0x21bc23(0x1a5),a75_0x21bc23(0x17a));function a75_0x5637(){const _0x2d0e1d=['skillTemplate','length','push','lastUpdated','trimEnd','some','USERPROFILE','.lovrabet','102ynXGYK','statusText','title','extendContent','HOME','cache','120IxzZBP','CDN\x20数据中缺少\x20skillTemplate','includes','<!--\x20GUIDES_APPEND\x20-->','CDN\x20返回数据格式错误','guides','object','sort','|\x20`','CDN\x20请求失败:\x20','path','content','guide.md','110yPHTtA','113127KrvsEV','entries','keys','2199850tcgzrv','\x0a\x0a>更新时间:','2563920pmMJkt','status','.lovrabet/skill/.shared/guides','replace','map','requireFlags','3125NhPpav','2563632bbcpiZ','json','join','312714bdeEdm','application/json','5ivxJIt','utf-8','env','1907996bJULAY'];a75_0x5637=function(){return _0x2d0e1d;};return a75_0x5637();}export async function fetchGuidesFromCDN(_0x61e7de=![]){const _0x543d6d=a75_0x21bc23,_0x3a09f5=getGuidesCdnUrl(),_0x36f442=await fetch(_0x3a09f5,{'headers':{'Accept':_0x543d6d(0x199)}});if(!_0x36f442['ok'])throw new Error(_0x543d6d(0x184)+_0x36f442[_0x543d6d(0x18f)]+'\x20'+_0x36f442[_0x543d6d(0x1a7)]);const _0x49bf96=await _0x36f442[_0x543d6d(0x196)]();if(!_0x49bf96[_0x543d6d(0x180)]||typeof _0x49bf96[_0x543d6d(0x180)]!==_0x543d6d(0x181))throw new Error(_0x543d6d(0x17f));if(!_0x61e7de)return _0x49bf96;try{const _0x28239b=getGuidesExtendCdnUrl(),_0x379ce5=await fetch(_0x28239b,{'headers':{'Accept':_0x543d6d(0x199)}});if(_0x379ce5['ok']){const _0x407ed8=await _0x379ce5[_0x543d6d(0x196)]();_0x407ed8[_0x543d6d(0x180)]&&typeof _0x407ed8[_0x543d6d(0x180)]===_0x543d6d(0x181)&&(_0x49bf96[_0x543d6d(0x180)]={..._0x49bf96[_0x543d6d(0x180)],..._0x407ed8[_0x543d6d(0x180)]});}}catch{}return _0x49bf96;}function a75_0x465f(_0x1751e4,_0x3563e6){_0x1751e4=_0x1751e4-0x177;const _0x5637c8=a75_0x5637();let _0x465fd1=_0x5637c8[_0x1751e4];return _0x465fd1;}export function writeGuidesToProject(_0x191900,_0x2f3625,_0x136db7=a75_0x21bc23(0x190),_0x5216e8){const _0x412b90=a75_0x21bc23,_0x5e1cb3=join(_0x2f3625,_0x136db7);for(const [_0x5b60b8,_0x29cd83]of Object[_0x412b90(0x18a)](_0x191900[_0x412b90(0x180)])){if(_0x29cd83['requireFlags']&&_0x29cd83[_0x412b90(0x193)][_0x412b90(0x19f)]>0x0){const _0x124586=_0x29cd83[_0x412b90(0x193)][_0x412b90(0x1a3)](_0x4985ab=>_0x5216e8?.['includes'](_0x4985ab));if(!_0x124586)continue;}const _0x3c6b54=join(_0x5e1cb3,_0x5b60b8);mkdirSync(_0x3c6b54,{'recursive':!![]});let _0x1946c4=_0x29cd83[_0x412b90(0x186)];_0x29cd83[_0x412b90(0x1a1)]&&(_0x1946c4=appendUpdateTime(_0x1946c4,_0x29cd83[_0x412b90(0x1a1)])),writeFileSync(join(_0x3c6b54,_0x412b90(0x187)),_0x1946c4,_0x412b90(0x19b));}}export function appendUpdateTime(_0x22abc5,_0x587c3c){const _0x7eec1=a75_0x21bc23;return _0x22abc5=_0x22abc5[_0x7eec1(0x191)](/\n*>更新时间:.*$/m,''),_0x22abc5[_0x7eec1(0x1a2)]()+(_0x7eec1(0x18d)+_0x587c3c);}export function getSkillTemplate(_0x34ecd0){const _0xba1c9d=a75_0x21bc23;return _0x34ecd0[_0xba1c9d(0x19e)]?.[_0xba1c9d(0x186)]||'';}export function appendExtendContents(_0x1b3578,_0x3124ad,_0x48b83b){const _0x1f63e6=a75_0x21bc23,_0x1e2d2e=[];for(const [_0x3e60ed,_0x20557f]of Object[_0x1f63e6(0x18a)](_0x3124ad[_0x1f63e6(0x180)])){if(_0x20557f[_0x1f63e6(0x193)]&&_0x20557f['requireFlags'][_0x1f63e6(0x19f)]>0x0){const _0x2cdffa=_0x20557f[_0x1f63e6(0x193)]['some'](_0x252a52=>_0x48b83b?.['includes'](_0x252a52));if(!_0x2cdffa)continue;}_0x20557f['extendContent']&&_0x1e2d2e[_0x1f63e6(0x1a0)](_0x20557f[_0x1f63e6(0x178)][_0x1f63e6(0x1a2)]());}if(_0x1e2d2e['length']===0x0)return _0x1b3578;return _0x1b3578[_0x1f63e6(0x1a2)]()+'\x0a\x0a'+_0x1e2d2e[_0x1f63e6(0x197)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x21cc1b,_0xc5d89d,_0x481d6f,_0x37a963){const _0x52541e=a75_0x21bc23,_0x1f84d4=getSkillTemplate(_0x21cc1b);if(!_0x1f84d4)throw new Error(_0x52541e(0x17c));const _0x1da539=dirname(_0xc5d89d);mkdirSync(_0x1da539,{'recursive':!![]});let _0x15a779=_0x1f84d4[_0x52541e(0x191)](/\{\{IDE_NAME\}\}/g,_0x481d6f);_0x15a779=insertGuidesSection(_0x15a779,_0x21cc1b,_0x37a963),_0x15a779=appendExtendContents(_0x15a779,_0x21cc1b,_0x37a963),_0x21cc1b[_0x52541e(0x19e)][_0x52541e(0x1a1)]&&(_0x15a779=appendUpdateTime(_0x15a779,_0x21cc1b[_0x52541e(0x19e)][_0x52541e(0x1a1)])),writeFileSync(_0xc5d89d,_0x15a779,_0x52541e(0x19b));}export function insertGuidesSection(_0x15561d,_0x367e5d,_0x29cd17){const _0x208bee=a75_0x21bc23,_0x553141=_0x208bee(0x17e),_0x536038=_0x15561d['indexOf'](_0x553141);if(_0x536038===-0x1)return _0x15561d;const _0xd0fb51=[],_0x25c9f9=Object[_0x208bee(0x18b)](_0x367e5d[_0x208bee(0x180)])[_0x208bee(0x182)]();for(const _0x53c2ad of _0x25c9f9){const _0x45ef7e=_0x367e5d[_0x208bee(0x180)][_0x53c2ad];if(!_0x45ef7e)continue;if(/^0[1-6]-/['test'](_0x53c2ad))continue;if(_0x45ef7e[_0x208bee(0x193)]&&_0x45ef7e[_0x208bee(0x193)]['length']>0x0){const _0x596fd1=_0x45ef7e[_0x208bee(0x193)][_0x208bee(0x1a3)](_0x57ca1e=>_0x29cd17?.[_0x208bee(0x17d)](_0x57ca1e));if(!_0x596fd1)continue;}const _0x14843c=_0x45ef7e[_0x208bee(0x185)][_0x208bee(0x191)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0xd0fb51[_0x208bee(0x1a0)](_0x208bee(0x183)+_0x14843c+'`\x20|\x20'+_0x45ef7e[_0x208bee(0x177)]+'\x20|');}if(_0xd0fb51[_0x208bee(0x19f)]===0x0)return _0x15561d[_0x208bee(0x191)](_0x553141,_0x208bee(0x17e));const _0x1a1c0e=_0xd0fb51[_0x208bee(0x197)]('\x0a');return _0x15561d[_0x208bee(0x191)](_0x553141,_0x1a1c0e+'\x0a<!--\x20GUIDES_APPEND\x20-->');}export async function installGuides(_0x5750aa){const _0x57d66b=a75_0x21bc23,_0x445416=await fetchGuidesFromCDN();return writeGuidesToProject(_0x445416,_0x5750aa),Object['keys'](_0x445416[_0x57d66b(0x180)])[_0x57d66b(0x19f)];}export function getGuidesSummary(_0xa48f8d){const _0x2fea3c=a75_0x21bc23;return Object[_0x2fea3c(0x18a)](_0xa48f8d[_0x2fea3c(0x180)])[_0x2fea3c(0x192)](([_0x42906c,_0x435cb0])=>({'key':_0x42906c,'title':_0x435cb0[_0x2fea3c(0x177)],'path':_0x435cb0[_0x2fea3c(0x185)]}));}
1
+ const a78_0x1ddbee=a78_0x488a;(function(_0x51c1ef,_0x4e5761){const _0x48e9d9=a78_0x488a,_0x4e13c5=_0x51c1ef();while(!![]){try{const _0x2840b7=-parseInt(_0x48e9d9(0x114))/0x1+-parseInt(_0x48e9d9(0x104))/0x2*(parseInt(_0x48e9d9(0xf3))/0x3)+parseInt(_0x48e9d9(0x110))/0x4+-parseInt(_0x48e9d9(0x10e))/0x5+parseInt(_0x48e9d9(0xee))/0x6*(-parseInt(_0x48e9d9(0x116))/0x7)+parseInt(_0x48e9d9(0xf5))/0x8*(-parseInt(_0x48e9d9(0xf4))/0x9)+-parseInt(_0x48e9d9(0x10c))/0xa*(-parseInt(_0x48e9d9(0xfd))/0xb);if(_0x2840b7===_0x4e5761)break;else _0x4e13c5['push'](_0x4e13c5['shift']());}catch(_0x2dd3a4){_0x4e13c5['push'](_0x4e13c5['shift']());}}}(a78_0x561c,0x4819f));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x3d1a0c=a78_0x488a,_0x3b2a1e=getTemplateBaseUrl();return _0x3b2a1e+_0x3d1a0c(0x105);}function getGuidesExtendCdnUrl(){const _0x54ab48=a78_0x488a,_0x31add2=getTemplateBaseUrl();return _0x31add2+_0x54ab48(0xe8);}function a78_0x488a(_0x1684b9,_0x5f3e93){_0x1684b9=_0x1684b9-0xe6;const _0x561c73=a78_0x561c();let _0x488a80=_0x561c73[_0x1684b9];return _0x488a80;}const CACHE_DIR=join(process[a78_0x1ddbee(0x115)]['HOME']||process[a78_0x1ddbee(0x115)][a78_0x1ddbee(0xea)]||'','.lovrabet',a78_0x1ddbee(0x10d));export async function fetchGuidesFromCDN(_0x58e6b5=![]){const _0x436b6f=a78_0x1ddbee,_0x17b9d2=getGuidesCdnUrl(),_0x5d0946=await fetch(_0x17b9d2,{'headers':{'Accept':'application/json'}});if(!_0x5d0946['ok'])throw new Error(_0x436b6f(0x112)+_0x5d0946['status']+'\x20'+_0x5d0946[_0x436b6f(0x10f)]);const _0x32d85e=await _0x5d0946[_0x436b6f(0xfc)]();if(!_0x32d85e['guides']||typeof _0x32d85e[_0x436b6f(0x10b)]!==_0x436b6f(0x108))throw new Error('CDN\x20返回数据格式错误');if(!_0x58e6b5)return _0x32d85e;try{const _0x2155a7=getGuidesExtendCdnUrl(),_0x5d3eae=await fetch(_0x2155a7,{'headers':{'Accept':_0x436b6f(0x102)}});if(_0x5d3eae['ok']){const _0x51e704=await _0x5d3eae[_0x436b6f(0xfc)]();_0x51e704['guides']&&typeof _0x51e704[_0x436b6f(0x10b)]===_0x436b6f(0x108)&&(_0x32d85e[_0x436b6f(0x10b)]={..._0x32d85e[_0x436b6f(0x10b)],..._0x51e704[_0x436b6f(0x10b)]});}}catch{}return _0x32d85e;}export function writeGuidesToProject(_0x350524,_0x299384,_0x81de99=a78_0x1ddbee(0xeb),_0x288ee1){const _0x564d1c=a78_0x1ddbee,_0x3949dd=join(_0x299384,_0x81de99);for(const [_0x3caba2,_0x41d292]of Object[_0x564d1c(0xfe)](_0x350524[_0x564d1c(0x10b)])){if(_0x41d292[_0x564d1c(0x10a)]&&_0x41d292[_0x564d1c(0x10a)][_0x564d1c(0xf8)]>0x0){const _0x395b0d=_0x41d292['requireFlags'][_0x564d1c(0xff)](_0x4ce180=>_0x288ee1?.[_0x564d1c(0x101)](_0x4ce180));if(!_0x395b0d)continue;}const _0x417d52=join(_0x3949dd,_0x3caba2);mkdirSync(_0x417d52,{'recursive':!![]});let _0x3461ed=_0x41d292[_0x564d1c(0xec)];_0x41d292[_0x564d1c(0xf2)]&&(_0x3461ed=appendUpdateTime(_0x3461ed,_0x41d292['lastUpdated'])),writeFileSync(join(_0x417d52,_0x564d1c(0xe7)),_0x3461ed,_0x564d1c(0xf6));}}export function appendUpdateTime(_0x171447,_0x5ab9b3){const _0x521819=a78_0x1ddbee;return _0x171447=_0x171447['replace'](/\n*>更新时间:.*$/m,''),_0x171447['trimEnd']()+(_0x521819(0xef)+_0x5ab9b3);}function a78_0x561c(){const _0x5cfb68=['entries','some','join','includes','application/json','trimEnd','46EEUImm','/skills/guides.json','title','replace','object','`\x20|\x20','requireFlags','guides','10dGGIFe','cache','1274635eNtKXI','statusText','736560oYGcsv','keys','CDN\x20请求失败:\x20','<!--\x20GUIDES_APPEND\x20-->','50290PLqlRP','env','2916767qVBIgr','test','guide.md','/skills/guides-extend.json','skillTemplate','USERPROFILE','.lovrabet/skill/.shared/guides','content','\x0a<!--\x20GUIDES_APPEND\x20-->','6srvrdH','\x0a\x0a>更新时间:','map','indexOf','lastUpdated','7251NNgizI','666evnXSj','57576FgzknW','utf-8','|\x20`','length','extendContent','path','sort','json','15633794qROwbx'];a78_0x561c=function(){return _0x5cfb68;};return a78_0x561c();}export function getSkillTemplate(_0x587ff4){const _0x579974=a78_0x1ddbee;return _0x587ff4[_0x579974(0xe9)]?.[_0x579974(0xec)]||'';}export function appendExtendContents(_0x4a75fe,_0x5440f7,_0x5365ed){const _0x4204a1=a78_0x1ddbee,_0x46ce24=[];for(const [_0x103a8f,_0x45cc89]of Object['entries'](_0x5440f7[_0x4204a1(0x10b)])){if(_0x45cc89[_0x4204a1(0x10a)]&&_0x45cc89['requireFlags'][_0x4204a1(0xf8)]>0x0){const _0x5b1cd7=_0x45cc89[_0x4204a1(0x10a)]['some'](_0x357071=>_0x5365ed?.[_0x4204a1(0x101)](_0x357071));if(!_0x5b1cd7)continue;}_0x45cc89[_0x4204a1(0xf9)]&&_0x46ce24['push'](_0x45cc89[_0x4204a1(0xf9)][_0x4204a1(0x103)]());}if(_0x46ce24[_0x4204a1(0xf8)]===0x0)return _0x4a75fe;return _0x4a75fe[_0x4204a1(0x103)]()+'\x0a\x0a'+_0x46ce24['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x5dd1da,_0x35cf5d,_0x5623f1,_0x48f240){const _0x3f32b0=a78_0x1ddbee,_0x160a1f=getSkillTemplate(_0x5dd1da);if(!_0x160a1f)throw new Error('CDN\x20数据中缺少\x20skillTemplate');const _0x53f2b1=dirname(_0x35cf5d);mkdirSync(_0x53f2b1,{'recursive':!![]});let _0x29c276=_0x160a1f[_0x3f32b0(0x107)](/\{\{IDE_NAME\}\}/g,_0x5623f1);_0x29c276=insertGuidesSection(_0x29c276,_0x5dd1da,_0x48f240),_0x29c276=appendExtendContents(_0x29c276,_0x5dd1da,_0x48f240),_0x5dd1da[_0x3f32b0(0xe9)][_0x3f32b0(0xf2)]&&(_0x29c276=appendUpdateTime(_0x29c276,_0x5dd1da[_0x3f32b0(0xe9)]['lastUpdated'])),writeFileSync(_0x35cf5d,_0x29c276,_0x3f32b0(0xf6));}export function insertGuidesSection(_0x545adb,_0x3c635d,_0x40bf67){const _0x3649a2=a78_0x1ddbee,_0x1d8a91=_0x3649a2(0x113),_0x3e0bf6=_0x545adb[_0x3649a2(0xf1)](_0x1d8a91);if(_0x3e0bf6===-0x1)return _0x545adb;const _0x2fba37=[],_0x3b6f87=Object[_0x3649a2(0x111)](_0x3c635d[_0x3649a2(0x10b)])[_0x3649a2(0xfb)]();for(const _0x2e8a48 of _0x3b6f87){const _0xb85744=_0x3c635d[_0x3649a2(0x10b)][_0x2e8a48];if(!_0xb85744)continue;if(/^0[1-6]-/[_0x3649a2(0xe6)](_0x2e8a48))continue;if(_0xb85744[_0x3649a2(0x10a)]&&_0xb85744[_0x3649a2(0x10a)][_0x3649a2(0xf8)]>0x0){const _0x49b9e2=_0xb85744['requireFlags'][_0x3649a2(0xff)](_0xca07f4=>_0x40bf67?.['includes'](_0xca07f4));if(!_0x49b9e2)continue;}const _0x5f047a=_0xb85744[_0x3649a2(0xfa)][_0x3649a2(0x107)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x2fba37['push'](_0x3649a2(0xf7)+_0x5f047a+_0x3649a2(0x109)+_0xb85744['title']+'\x20|');}if(_0x2fba37[_0x3649a2(0xf8)]===0x0)return _0x545adb['replace'](_0x1d8a91,_0x3649a2(0x113));const _0x3255dc=_0x2fba37[_0x3649a2(0x100)]('\x0a');return _0x545adb[_0x3649a2(0x107)](_0x1d8a91,_0x3255dc+_0x3649a2(0xed));}export async function installGuides(_0x150819){const _0x4d64a7=a78_0x1ddbee,_0x5540a5=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5540a5,_0x150819),Object[_0x4d64a7(0x111)](_0x5540a5[_0x4d64a7(0x10b)])['length'];}export function getGuidesSummary(_0x48c08a){const _0x1e58eb=a78_0x1ddbee;return Object[_0x1e58eb(0xfe)](_0x48c08a[_0x1e58eb(0x10b)])[_0x1e58eb(0xf0)](([_0x4e2709,_0x49a758])=>({'key':_0x4e2709,'title':_0x49a758[_0x1e58eb(0x106)],'path':_0x49a758[_0x1e58eb(0xfa)]}));}
@@ -1 +1 @@
1
- (function(_0x2467d2,_0x5746a5){const _0x1e7ad2=a76_0x7ad5,_0x7f3753=_0x2467d2();while(!![]){try{const _0x4e25cf=parseInt(_0x1e7ad2(0x1fa))/0x1+parseInt(_0x1e7ad2(0x1f3))/0x2+parseInt(_0x1e7ad2(0x1ed))/0x3+parseInt(_0x1e7ad2(0x1fd))/0x4*(parseInt(_0x1e7ad2(0x1fc))/0x5)+parseInt(_0x1e7ad2(0x203))/0x6+parseInt(_0x1e7ad2(0x1f6))/0x7*(-parseInt(_0x1e7ad2(0x1ef))/0x8)+parseInt(_0x1e7ad2(0x1ea))/0x9*(-parseInt(_0x1e7ad2(0x1f5))/0xa);if(_0x4e25cf===_0x5746a5)break;else _0x7f3753['push'](_0x7f3753['shift']());}catch(_0x1c819f){_0x7f3753['push'](_0x7f3753['shift']());}}}(a76_0xaa52,0xf1105));export async function httpRequest(_0x54293e,_0x5a2188={}){const _0x311ff4=a76_0x7ad5,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x5a2188;let _0x4c25e2=null;for(let _0x50805d=0x0;_0x50805d<=retries;_0x50805d++){try{const _0x599669=new AbortController(),_0x5c11f2=setTimeout(()=>_0x599669[_0x311ff4(0x1eb)](),timeout),_0x141120=await fetch(_0x54293e,{'headers':headers,'signal':_0x599669[_0x311ff4(0x202)]});clearTimeout(_0x5c11f2);let _0x3bb207;const _0x333543=_0x141120[_0x311ff4(0x1f9)][_0x311ff4(0x1ee)]('content-type');return _0x333543?.['includes'](_0x311ff4(0x1e8))?_0x3bb207=await _0x141120['json']():_0x3bb207=await _0x141120['text'](),{'ok':_0x141120['ok'],'status':_0x141120[_0x311ff4(0x1ec)],'statusText':_0x141120['statusText'],'data':_0x3bb207,'headers':_0x141120[_0x311ff4(0x1f9)],'url':_0x141120['url'],'text':()=>_0x141120[_0x311ff4(0x1fb)]()};}catch(_0x123415){_0x4c25e2=_0x123415 instanceof Error?_0x123415:new Error(String(_0x123415));if(_0x50805d===retries)break;if(shouldRetry(_0x123415)){console['log'](_0x311ff4(0x200)+retryDelay+_0x311ff4(0x1ff)+(_0x50805d+0x1)+_0x311ff4(0x1e9)),await sleep(retryDelay);continue;}else break;}}throw _0x4c25e2||new Error(_0x311ff4(0x1f7));}function a76_0xaa52(){const _0x1e882d=['get','109264UuWcqx','ECONNRESET','includes','message','1076382oIJYki','AbortError','10QrvZFn','7ermVQq','Request\x20failed','name','headers','312090ghTBnp','text','235AYKVdl','146712GfExaJ','fetch','ms\x20后进行第\x20','*\x20请求失败,','ENOTFOUND','signal','3747864kzpfpw','application/json','\x20次重试...','22058955apANBB','abort','status','759777UhGwzx'];a76_0xaa52=function(){return _0x1e882d;};return a76_0xaa52();}function shouldRetry(_0x4496dd){const _0x47b36c=a76_0x7ad5;if(_0x4496dd instanceof Error){if(_0x4496dd[_0x47b36c(0x1f8)]===_0x47b36c(0x1f4))return![];if(_0x4496dd[_0x47b36c(0x1f8)]==='TypeError'&&_0x4496dd[_0x47b36c(0x1f2)]['includes'](_0x47b36c(0x1fe)))return!![];if(_0x4496dd['message'][_0x47b36c(0x1f1)](_0x47b36c(0x1f0)))return!![];if(_0x4496dd[_0x47b36c(0x1f2)][_0x47b36c(0x1f1)](_0x47b36c(0x201)))return![];}return![];}function a76_0x7ad5(_0x23497e,_0x415198){_0x23497e=_0x23497e-0x1e8;const _0xaa52d5=a76_0xaa52();let _0x7ad52e=_0xaa52d5[_0x23497e];return _0x7ad52e;}function sleep(_0x48b78e){return new Promise(_0x1e4e8f=>setTimeout(_0x1e4e8f,_0x48b78e));}export function validateUrl(_0x1d0d24){try{return new URL(_0x1d0d24),!![];}catch{return![];}}
1
+ (function(_0x1ebdcd,_0x1165de){const _0x35eeb4=a79_0x345f,_0x29b0e9=_0x1ebdcd();while(!![]){try{const _0x151b29=-parseInt(_0x35eeb4(0xf0))/0x1*(parseInt(_0x35eeb4(0xfd))/0x2)+parseInt(_0x35eeb4(0xea))/0x3+parseInt(_0x35eeb4(0xf8))/0x4+parseInt(_0x35eeb4(0xf2))/0x5+parseInt(_0x35eeb4(0xfc))/0x6+-parseInt(_0x35eeb4(0x100))/0x7+-parseInt(_0x35eeb4(0xf5))/0x8*(parseInt(_0x35eeb4(0xf7))/0x9);if(_0x151b29===_0x1165de)break;else _0x29b0e9['push'](_0x29b0e9['shift']());}catch(_0x4de681){_0x29b0e9['push'](_0x29b0e9['shift']());}}}(a79_0x3b45,0xa7a67));export async function httpRequest(_0x8338,_0x254ed8={}){const _0x1760df=a79_0x345f,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x254ed8;let _0x3f335c=null;for(let _0x2b244a=0x0;_0x2b244a<=retries;_0x2b244a++){try{const _0x2a1c3b=new AbortController(),_0x40a71a=setTimeout(()=>_0x2a1c3b[_0x1760df(0xee)](),timeout),_0x30505d=await fetch(_0x8338,{'headers':headers,'signal':_0x2a1c3b['signal']});clearTimeout(_0x40a71a);let _0x3d2ca2;const _0x581c78=_0x30505d[_0x1760df(0xed)][_0x1760df(0xef)]('content-type');return _0x581c78?.['includes']('application/json')?_0x3d2ca2=await _0x30505d[_0x1760df(0xf1)]():_0x3d2ca2=await _0x30505d[_0x1760df(0xf3)](),{'ok':_0x30505d['ok'],'status':_0x30505d['status'],'statusText':_0x30505d[_0x1760df(0xfa)],'data':_0x3d2ca2,'headers':_0x30505d[_0x1760df(0xed)],'url':_0x30505d[_0x1760df(0xff)],'text':()=>_0x30505d[_0x1760df(0xf3)]()};}catch(_0x1c107a){_0x3f335c=_0x1c107a instanceof Error?_0x1c107a:new Error(String(_0x1c107a));if(_0x2b244a===retries)break;if(shouldRetry(_0x1c107a)){console['log'](_0x1760df(0xeb)+retryDelay+_0x1760df(0xf6)+(_0x2b244a+0x1)+_0x1760df(0xfe)),await sleep(retryDelay);continue;}else break;}}throw _0x3f335c||new Error('Request\x20failed');}function a79_0x345f(_0x3445a3,_0x37a8b8){_0x3445a3=_0x3445a3-0xea;const _0x3b453d=a79_0x3b45();let _0x345fd8=_0x3b453d[_0x3445a3];return _0x345fd8;}function shouldRetry(_0xe17a15){const _0x2d8be6=a79_0x345f;if(_0xe17a15 instanceof Error){if(_0xe17a15[_0x2d8be6(0xf4)]===_0x2d8be6(0x103))return![];if(_0xe17a15[_0x2d8be6(0xf4)]===_0x2d8be6(0x101)&&_0xe17a15[_0x2d8be6(0xfb)]['includes'](_0x2d8be6(0x102)))return!![];if(_0xe17a15[_0x2d8be6(0xfb)][_0x2d8be6(0xec)](_0x2d8be6(0x104)))return!![];if(_0xe17a15['message'][_0x2d8be6(0xec)](_0x2d8be6(0xf9)))return![];}return![];}function sleep(_0x12608a){return new Promise(_0x463e1a=>setTimeout(_0x463e1a,_0x12608a));}export function validateUrl(_0x51f1cb){try{return new URL(_0x51f1cb),!![];}catch{return![];}}function a79_0x3b45(){const _0x5cf721=['statusText','message','4424988RYeLwR','15002CYbhiI','\x20次重试...','url','3708824ZqYXMT','TypeError','fetch','AbortError','ECONNRESET','3640473OsonrB','*\x20请求失败,','includes','headers','abort','get','34MwpADc','json','6179490zrFyrQ','text','name','30288SPrdzm','ms\x20后进行第\x20','6030KgJxlf','3285176YIyLZv','ENOTFOUND'];a79_0x3b45=function(){return _0x5cf721;};return a79_0x3b45();}
@@ -1 +1 @@
1
- const a77_0x668ae5=a77_0x52c0;(function(_0x127370,_0x5d5c22){const _0x336d58=a77_0x52c0,_0x3f9dd5=_0x127370();while(!![]){try{const _0x289afb=parseInt(_0x336d58(0xd8))/0x1+-parseInt(_0x336d58(0xef))/0x2*(parseInt(_0x336d58(0x104))/0x3)+-parseInt(_0x336d58(0xdf))/0x4+-parseInt(_0x336d58(0xea))/0x5*(parseInt(_0x336d58(0xf8))/0x6)+-parseInt(_0x336d58(0xf4))/0x7*(parseInt(_0x336d58(0xe7))/0x8)+-parseInt(_0x336d58(0x109))/0x9*(parseInt(_0x336d58(0xe9))/0xa)+parseInt(_0x336d58(0x102))/0xb;if(_0x289afb===_0x5d5c22)break;else _0x3f9dd5['push'](_0x3f9dd5['shift']());}catch(_0x9bfff6){_0x3f9dd5['push'](_0x3f9dd5['shift']());}}}(a77_0x4a0d,0x9d26c));function a77_0x52c0(_0x10515d,_0x5526a7){_0x10515d=_0x10515d-0xd4;const _0x4a0d1d=a77_0x4a0d();let _0x52c01a=_0x4a0d1d[_0x10515d];return _0x52c01a;}import a77_0x5a369c from'winston';import a77_0x16976d from'node:fs';import a77_0x187aac from'node:path';class Logger{[a77_0x668ae5(0xfd)];[a77_0x668ae5(0xf0)];[a77_0x668ae5(0xeb)]='';constructor(){const _0x3d1c82=a77_0x668ae5;this[_0x3d1c82(0xf0)]='';}['setRawCommand'](_0x3202c2){this['currentRawCommand']=_0x3202c2;}[a77_0x668ae5(0x108)](){const _0x347821=a77_0x668ae5,_0x1a39da=a77_0x187aac[_0x347821(0xda)](this[_0x347821(0xf0)]);!a77_0x16976d['existsSync'](_0x1a39da)&&a77_0x16976d[_0x347821(0xe0)](_0x1a39da,{'recursive':!![]});const _0x925101=a77_0x5a369c[_0x347821(0xfb)][_0x347821(0xe5)](a77_0x5a369c[_0x347821(0xfb)]['timestamp'](),a77_0x5a369c[_0x347821(0xfb)]['errors']({'stack':!![]}),a77_0x5a369c['format'][_0x347821(0xf9)](_0x4a0a4b=>{const _0x399c95=_0x347821,_0x5b990c={'timestamp':_0x4a0a4b[_0x399c95(0xec)]||new Date()[_0x399c95(0x107)](),'level':_0x4a0a4b[_0x399c95(0xd4)]||'info','command':_0x4a0a4b[_0x399c95(0x105)]||_0x399c95(0x10b),'rawCommand':_0x4a0a4b['rawCommand']||this[_0x399c95(0xeb)]||undefined,'message':_0x4a0a4b[_0x399c95(0xfc)]||'','duration':_0x4a0a4b[_0x399c95(0x10c)]||undefined,'details':_0x4a0a4b[_0x399c95(0xe4)]||undefined};return JSON['stringify'](_0x5b990c);}));this[_0x347821(0xfd)]=a77_0x5a369c[_0x347821(0xff)]({'level':_0x347821(0xed),'format':_0x925101,'transports':[new a77_0x5a369c['transports'][(_0x347821(0xdd))]({'filename':this[_0x347821(0xf0)],'level':_0x347821(0xed)})],'silent':![]}),a77_0x5a369c[_0x347821(0xe6)]({'success':_0x347821(0xf7),'error':_0x347821(0x106),'warn':_0x347821(0xe2),'info':_0x347821(0x100)});}[a77_0x668ae5(0xf3)](_0x305e15){const _0x57ef7b=a77_0x668ae5;this[_0x57ef7b(0xf0)]=a77_0x187aac['join'](_0x305e15,'.lovrabet.log'),this[_0x57ef7b(0xfd)]&&this[_0x57ef7b(0xfd)][_0x57ef7b(0xfe)](),this[_0x57ef7b(0x108)]();}[a77_0x668ae5(0xed)](_0x560bf1,_0x92f46a,_0x203dc5){const _0x1e0931=a77_0x668ae5;if(!this[_0x1e0931(0xf0)]||!this[_0x1e0931(0xfd)])return;this[_0x1e0931(0xfd)]['info'](_0x92f46a,{'command':_0x560bf1,'details':_0x203dc5});}[a77_0x668ae5(0xdc)](_0x2da4d0,_0x2de6e8,_0x37d2dc,_0x158f3f){const _0x589602=a77_0x668ae5;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x589602(0xfd)][_0x589602(0xd7)]('info',_0x2de6e8,{'level':'success','command':_0x2da4d0,'duration':_0x37d2dc,'details':_0x158f3f});}['error'](_0x582a3e,_0x2506ee,_0x489e51){const _0x4af0cb=a77_0x668ae5;if(!this[_0x4af0cb(0xf0)]||!this['winstonLogger'])return;this[_0x4af0cb(0xfd)][_0x4af0cb(0x103)](_0x2506ee,{'command':_0x582a3e,'details':_0x489e51});}[a77_0x668ae5(0xe8)](_0x440a2c,_0x967b08,_0xf32369){const _0x4dd6ea=a77_0x668ae5;if(!this[_0x4dd6ea(0xf0)]||!this[_0x4dd6ea(0xfd)])return;this[_0x4dd6ea(0xfd)][_0x4dd6ea(0xe8)](_0x967b08,{'command':_0x440a2c,'details':_0xf32369});}async[a77_0x668ae5(0xfa)](_0x1c2e2c,_0x4c208f,_0x4ecb38){const _0x207d2f=a77_0x668ae5,_0xb66631=Date['now']();this['info'](_0x1c2e2c,_0x207d2f(0xe1)+_0x4c208f);try{const _0x49bb0c=await _0x4ecb38(),_0x3f2d3b=Date['now']()-_0xb66631;return this[_0x207d2f(0xdc)](_0x1c2e2c,'完成:\x20'+_0x4c208f,_0x3f2d3b),_0x49bb0c;}catch(_0x2c0322){const _0x18d056=Date[_0x207d2f(0x101)]()-_0xb66631;this[_0x207d2f(0x103)](_0x1c2e2c,_0x207d2f(0xd9)+_0x4c208f,{'error':_0x2c0322 instanceof Error?_0x2c0322[_0x207d2f(0xfc)]:String(_0x2c0322),'duration':_0x18d056});throw _0x2c0322;}}[a77_0x668ae5(0x10a)](){const _0x24b992=a77_0x668ae5;try{if(!a77_0x16976d[_0x24b992(0xf1)](this[_0x24b992(0xf0)]))return[];const _0x598bdb=a77_0x16976d[_0x24b992(0xd6)](this[_0x24b992(0xf0)],'utf8');return _0x598bdb[_0x24b992(0xde)]('\x0a')[_0x24b992(0xf5)](_0x2a411e=>_0x2a411e[_0x24b992(0x10d)]())[_0x24b992(0xd5)](_0x3471b=>JSON['parse'](_0x3471b));}catch(_0x176a62){return console[_0x24b992(0xe8)](_0x24b992(0xee),_0x176a62),[];}}[a77_0x668ae5(0xdb)](){const _0x1f7d39=a77_0x668ae5;try{a77_0x16976d[_0x1f7d39(0xf1)](this['logFilePath'])&&a77_0x16976d[_0x1f7d39(0xf6)](this['logFilePath'],'',_0x1f7d39(0xf2));}catch(_0x264f66){console[_0x1f7d39(0xe8)](_0x1f7d39(0xe3),_0x264f66);}}['getWinstonInstance'](){const _0x2d0979=a77_0x668ae5;return this[_0x2d0979(0xfd)];}}export const logger=new Logger();function a77_0x4a0d(){const _0x135215=['2028120vIgzCp','mkdirSync','开始执行:\x20','yellow','Failed\x20to\x20clear\x20logs:','details','combine','addColors','8696vwgOME','warn','680ZNgkTK','5FyhVoj','currentRawCommand','timestamp','info','Failed\x20to\x20read\x20logs:','148iIbSLD','logFilePath','existsSync','utf8','setLogPath','7833bETFsg','filter','writeFileSync','green','3582696XcLdmO','printf','logTask','format','message','winstonLogger','clear','createLogger','blue','now','43246115rOeozk','error','38949HkrKTz','command','red','toISOString','initWinstonLogger','111123unpyWl','readLogs','unknown','duration','trim','level','map','readFileSync','log','833064EjGfwl','失败:\x20','dirname','clearLogs','success','File','split'];a77_0x4a0d=function(){return _0x135215;};return a77_0x4a0d();}
1
+ const a80_0x4451c8=a80_0x1e5d;(function(_0x57229e,_0x45eaa9){const _0x3d4e86=a80_0x1e5d,_0x436ad8=_0x57229e();while(!![]){try{const _0x4361ae=-parseInt(_0x3d4e86(0x76))/0x1+parseInt(_0x3d4e86(0x69))/0x2*(parseInt(_0x3d4e86(0x8d))/0x3)+parseInt(_0x3d4e86(0x95))/0x4+-parseInt(_0x3d4e86(0x73))/0x5+parseInt(_0x3d4e86(0x6d))/0x6*(-parseInt(_0x3d4e86(0x87))/0x7)+parseInt(_0x3d4e86(0x77))/0x8+parseInt(_0x3d4e86(0x90))/0x9;if(_0x4361ae===_0x45eaa9)break;else _0x436ad8['push'](_0x436ad8['shift']());}catch(_0x5bb0d6){_0x436ad8['push'](_0x436ad8['shift']());}}}(a80_0x509e,0xe31f2));import a80_0x2580a2 from'winston';function a80_0x509e(){const _0x47b3ff=['getWinstonInstance','details','writeFileSync','clear','currentRawCommand','success','logFilePath','addColors','timestamp','2xFEIKA','errors','createLogger','initWinstonLogger','42IFsRPc','now','readFileSync','info','filter','transports','5270515cGetIX','format','winstonLogger','1587460fIhehA','2274224VyLaQG','setRawCommand','.lovrabet.log','readLogs','error','split','message','utf8','green','blue','失败:\x20','map','开始执行:\x20','clearLogs','logTask','red','1754543cZDHUY','printf','join','warn','File','log','1506390mhKUeT','完成:\x20','existsSync','37279485YEyIoK','mkdirSync','toISOString','trim','rawCommand','1591292BuuDSq'];a80_0x509e=function(){return _0x47b3ff;};return a80_0x509e();}function a80_0x1e5d(_0x476571,_0x402d4e){_0x476571=_0x476571-0x66;const _0x509e32=a80_0x509e();let _0x1e5d9c=_0x509e32[_0x476571];return _0x1e5d9c;}import a80_0x205377 from'node:fs';import a80_0x473284 from'node:path';class Logger{[a80_0x4451c8(0x75)];[a80_0x4451c8(0x66)];['currentRawCommand']='';constructor(){const _0x38af4e=a80_0x4451c8;this[_0x38af4e(0x66)]='';}[a80_0x4451c8(0x78)](_0x29723c){const _0x62e81a=a80_0x4451c8;this[_0x62e81a(0x9a)]=_0x29723c;}[a80_0x4451c8(0x6c)](){const _0x722f75=a80_0x4451c8,_0x51d9ac=a80_0x473284['dirname'](this[_0x722f75(0x66)]);!a80_0x205377[_0x722f75(0x8f)](_0x51d9ac)&&a80_0x205377[_0x722f75(0x91)](_0x51d9ac,{'recursive':!![]});const _0x2c068e=a80_0x2580a2[_0x722f75(0x74)]['combine'](a80_0x2580a2[_0x722f75(0x74)][_0x722f75(0x68)](),a80_0x2580a2['format'][_0x722f75(0x6a)]({'stack':!![]}),a80_0x2580a2[_0x722f75(0x74)][_0x722f75(0x88)](_0x20825e=>{const _0xf3375d=_0x722f75,_0x57cdf1={'timestamp':_0x20825e[_0xf3375d(0x68)]||new Date()[_0xf3375d(0x92)](),'level':_0x20825e['level']||_0xf3375d(0x70),'command':_0x20825e['command']||'unknown','rawCommand':_0x20825e[_0xf3375d(0x94)]||this[_0xf3375d(0x9a)]||undefined,'message':_0x20825e[_0xf3375d(0x7d)]||'','duration':_0x20825e['duration']||undefined,'details':_0x20825e[_0xf3375d(0x97)]||undefined};return JSON['stringify'](_0x57cdf1);}));this[_0x722f75(0x75)]=a80_0x2580a2[_0x722f75(0x6b)]({'level':_0x722f75(0x70),'format':_0x2c068e,'transports':[new a80_0x2580a2[(_0x722f75(0x72))][(_0x722f75(0x8b))]({'filename':this[_0x722f75(0x66)],'level':'info'})],'silent':![]}),a80_0x2580a2[_0x722f75(0x67)]({'success':_0x722f75(0x7f),'error':_0x722f75(0x86),'warn':'yellow','info':_0x722f75(0x80)});}['setLogPath'](_0x1c0794){const _0x528747=a80_0x4451c8;this[_0x528747(0x66)]=a80_0x473284[_0x528747(0x89)](_0x1c0794,_0x528747(0x79)),this[_0x528747(0x75)]&&this['winstonLogger'][_0x528747(0x99)](),this[_0x528747(0x6c)]();}[a80_0x4451c8(0x70)](_0x59af71,_0x5d33d9,_0x145878){const _0x18952d=a80_0x4451c8;if(!this['logFilePath']||!this[_0x18952d(0x75)])return;this['winstonLogger'][_0x18952d(0x70)](_0x5d33d9,{'command':_0x59af71,'details':_0x145878});}[a80_0x4451c8(0x9b)](_0x28b2a8,_0x2ed5c7,_0x1ed853,_0x1e7a54){const _0x4caeae=a80_0x4451c8;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x4caeae(0x75)][_0x4caeae(0x8c)](_0x4caeae(0x70),_0x2ed5c7,{'level':_0x4caeae(0x9b),'command':_0x28b2a8,'duration':_0x1ed853,'details':_0x1e7a54});}[a80_0x4451c8(0x7b)](_0x4fa609,_0x36d327,_0x5ec1cb){const _0x301a04=a80_0x4451c8;if(!this[_0x301a04(0x66)]||!this[_0x301a04(0x75)])return;this[_0x301a04(0x75)]['error'](_0x36d327,{'command':_0x4fa609,'details':_0x5ec1cb});}[a80_0x4451c8(0x8a)](_0x17d66c,_0x12530b,_0x2bc158){const _0x522c51=a80_0x4451c8;if(!this[_0x522c51(0x66)]||!this[_0x522c51(0x75)])return;this[_0x522c51(0x75)][_0x522c51(0x8a)](_0x12530b,{'command':_0x17d66c,'details':_0x2bc158});}async[a80_0x4451c8(0x85)](_0x2b7ab6,_0x4999d5,_0x9c4095){const _0x275f55=a80_0x4451c8,_0x3557fa=Date[_0x275f55(0x6e)]();this['info'](_0x2b7ab6,_0x275f55(0x83)+_0x4999d5);try{const _0x476913=await _0x9c4095(),_0x101cbf=Date[_0x275f55(0x6e)]()-_0x3557fa;return this[_0x275f55(0x9b)](_0x2b7ab6,_0x275f55(0x8e)+_0x4999d5,_0x101cbf),_0x476913;}catch(_0x22b620){const _0x596478=Date[_0x275f55(0x6e)]()-_0x3557fa;this['error'](_0x2b7ab6,_0x275f55(0x81)+_0x4999d5,{'error':_0x22b620 instanceof Error?_0x22b620[_0x275f55(0x7d)]:String(_0x22b620),'duration':_0x596478});throw _0x22b620;}}[a80_0x4451c8(0x7a)](){const _0x57707c=a80_0x4451c8;try{if(!a80_0x205377[_0x57707c(0x8f)](this['logFilePath']))return[];const _0x15206a=a80_0x205377[_0x57707c(0x6f)](this[_0x57707c(0x66)],_0x57707c(0x7e));return _0x15206a[_0x57707c(0x7c)]('\x0a')[_0x57707c(0x71)](_0x102ea3=>_0x102ea3[_0x57707c(0x93)]())[_0x57707c(0x82)](_0x1bc1a7=>JSON['parse'](_0x1bc1a7));}catch(_0x3212b3){return console[_0x57707c(0x8a)]('Failed\x20to\x20read\x20logs:',_0x3212b3),[];}}[a80_0x4451c8(0x84)](){const _0xae559d=a80_0x4451c8;try{a80_0x205377['existsSync'](this[_0xae559d(0x66)])&&a80_0x205377[_0xae559d(0x98)](this[_0xae559d(0x66)],'',_0xae559d(0x7e));}catch(_0x208784){console[_0xae559d(0x8a)]('Failed\x20to\x20clear\x20logs:',_0x208784);}}[a80_0x4451c8(0x96)](){const _0x13f17b=a80_0x4451c8;return this[_0x13f17b(0x75)];}}export const logger=new Logger();
@@ -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 a81_0x293839=a81_0x2002;(function(_0x40988a,_0x328125){const _0x3aed10=a81_0x2002,_0xc1319b=_0x40988a();while(!![]){try{const _0x55fe3e=-parseInt(_0x3aed10(0x94))/0x1+parseInt(_0x3aed10(0x97))/0x2*(parseInt(_0x3aed10(0x9e))/0x3)+-parseInt(_0x3aed10(0x9f))/0x4*(parseInt(_0x3aed10(0x96))/0x5)+parseInt(_0x3aed10(0x9a))/0x6+-parseInt(_0x3aed10(0xa1))/0x7*(parseInt(_0x3aed10(0x98))/0x8)+parseInt(_0x3aed10(0x95))/0x9*(parseInt(_0x3aed10(0x93))/0xa)+parseInt(_0x3aed10(0xa3))/0xb*(parseInt(_0x3aed10(0xa0))/0xc);if(_0x55fe3e===_0x328125)break;else _0xc1319b['push'](_0xc1319b['shift']());}catch(_0x2254d0){_0xc1319b['push'](_0xc1319b['shift']());}}}(a81_0x4f6b,0x6118e));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a81_0x4f6b(){const _0x414503=['CDN\x20返回数据格式错误','content','126657QSQgIV','4YVOSad','918444ZQFvqx','2291086poBZyW','string','66EYsraI','catch','CDN\x20请求失败:\x20','status','utf-8','application/json','agents.md','.cursor/rules','statusText','690QcLoUn','735649oSrwKb','100053WhpVlN','1394245DvhMrt','6GutBHh','16xpBIWR','lastUpdated','4283112WVlCmQ','../../cdn-source/rules/lovrabet_rules.mdc.tpl'];a81_0x4f6b=function(){return _0x414503;};return a81_0x4f6b();}import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';function a81_0x2002(_0x5bd37d,_0x536305){_0x5bd37d=_0x5bd37d-0x8f;const _0x4f6b90=a81_0x4f6b();let _0x2002fa=_0x4f6b90[_0x5bd37d];return _0x2002fa;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0xe92173=getTemplateBaseUrl();return _0xe92173+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a81_0x293839(0x9b));export async function fetchRulesFromCDN(){const _0x56e111=a81_0x293839,_0x126f32=getRulesCdnUrl(),_0x100988=await fetch(_0x126f32,{'headers':{'Accept':_0x56e111(0x8f)}});if(!_0x100988['ok'])throw new Error(_0x56e111(0xa5)+_0x100988[_0x56e111(0xa6)]+'\x20'+_0x100988[_0x56e111(0x92)]);const _0x4aecbe=await _0x100988['json']();if(!_0x4aecbe['content']||typeof _0x4aecbe[_0x56e111(0x9d)]!==_0x56e111(0xa2))throw new Error(_0x56e111(0x9c));return _0x4aecbe;}export async function getRulesContent(){const _0x581535=a81_0x293839;try{const _0x231e27=await fetchRulesFromCDN();return _0x231e27[_0x581535(0x9d)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5a1264=a81_0x293839;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5a1264(0xa7));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x41560d){const _0x39e2f6=a81_0x293839,_0x4663f8=await fetchRulesFromCDN()[_0x39e2f6(0xa4)](()=>null);let _0x11dd7d;_0x4663f8?(_0x11dd7d=_0x4663f8[_0x39e2f6(0x9d)],_0x4663f8[_0x39e2f6(0x99)]&&(_0x11dd7d=appendUpdateTime(_0x11dd7d,_0x4663f8[_0x39e2f6(0x99)]))):_0x11dd7d=readLocalTemplate();const _0x4317ba=dirname(_0x41560d);!existsSync(_0x4317ba)&&mkdirSync(_0x4317ba,{'recursive':!![]}),writeFileSync(_0x41560d,_0x11dd7d,_0x39e2f6(0xa7));}export async function copyRulesToCursor(_0x37e14f){const _0x154c78=a81_0x293839,_0x5c556d=join(_0x37e14f,_0x154c78(0x91)),_0x55ac4e=join(_0x5c556d,'lovrabet_rules.mdc');if(existsSync(_0x55ac4e))return![];return await writeRulesFile(_0x55ac4e),!![];}export async function copyRulesToAgentsMd(_0x5dbddd){const _0x399455=a81_0x293839,_0x3ab814=join(_0x5dbddd,_0x399455(0x90));if(existsSync(_0x3ab814))return![];return await writeRulesFile(_0x3ab814),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x221758){return new Promise(_0x560584=>setTimeout(_0x560584,_0x221758));}
1
+ export function sleep(_0x41af7e){return new Promise(_0x48ab01=>setTimeout(_0x48ab01,_0x41af7e));}
@@ -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
+ function a83_0x4972(){const _0x175458=['模板内容替换完成','promises','isDirectory','slice','replace','split','2611953kUtZJa','processFile','charAt','../../package.json','toComponentName','.json','.ts','2808078NkvfKU','.tpl','numeric','push','.css','651686pIoTWS','isFile','alias','toLocaleString','103891MMlxQe','writeFile','.js','now','模板内容替换失败','extname','\x0a\x20\x20\x20\x20{\x20','alias:\x20\x22','2-digit','replaceApiContent','name','readFile','utf8','datasetCode:\x20\x22','toDisplayTitle','8QrZbef','replaceContent','success','.scss','tableName:\x20\x22','datasetCode','join','1165KsnDwB','processDirectory','.jsx','mkdir','toLocaleTimeString','2220084KTptLV','toISOString','endsWith','YourModel','15390ZyHObD','includes','default','info','1164840HEfxoo','message','pop','toLowerCase','version','\x20},','map','开始处理模板内容替换','toUpperCase','name:\x20\x22'];a83_0x4972=function(){return _0x175458;};return a83_0x4972();}const a83_0x2de1cb=a83_0x3467;(function(_0x45146f,_0x2c5b11){const _0x2357e6=a83_0x3467,_0x42aa8b=_0x45146f();while(!![]){try{const _0x2d4762=-parseInt(_0x2357e6(0x133))/0x1+-parseInt(_0x2357e6(0x12f))/0x2+parseInt(_0x2357e6(0x14e))/0x3+parseInt(_0x2357e6(0x113))/0x4+-parseInt(_0x2357e6(0x149))/0x5*(parseInt(_0x2357e6(0x10f))/0x6)+parseInt(_0x2357e6(0x12a))/0x7+parseInt(_0x2357e6(0x142))/0x8*(parseInt(_0x2357e6(0x123))/0x9);if(_0x2d4762===_0x2c5b11)break;else _0x42aa8b['push'](_0x42aa8b['shift']());}catch(_0x1b1c9c){_0x42aa8b['push'](_0x42aa8b['shift']());}}}(a83_0x4972,0xa9bbe));import a83_0x51389b from'node:fs';function a83_0x3467(_0x33d7f4,_0x295709){_0x33d7f4=_0x33d7f4-0x10d;const _0x4972fe=a83_0x4972();let _0x3467d9=_0x4972fe[_0x33d7f4];return _0x3467d9;}import a83_0x35b46c from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a83_0x2de1cb(0x126))[a83_0x2de1cb(0x117)];export class TemplateReplacer{static['toComponentName'](_0x13aa29){const _0x165ea4=a83_0x2de1cb,_0x2b780f=_0x13aa29['split']('/')[_0x165ea4(0x115)]()||_0x13aa29;return _0x2b780f['split']('-')[_0x165ea4(0x119)](_0x3321ac=>_0x3321ac[_0x165ea4(0x125)](0x0)[_0x165ea4(0x11b)]()+_0x3321ac['slice'](0x1)[_0x165ea4(0x116)]())[_0x165ea4(0x148)]('');}static['toDisplayTitle'](_0xa89ad0){const _0xcf1268=a83_0x2de1cb,_0x48b373=_0xa89ad0[_0xcf1268(0x122)]('/')[_0xcf1268(0x115)]()||_0xa89ad0;return _0x48b373[_0xcf1268(0x122)]('-')['map'](_0x10bdc0=>_0x10bdc0[_0xcf1268(0x125)](0x0)['toUpperCase']()+_0x10bdc0[_0xcf1268(0x120)](0x1)[_0xcf1268(0x116)]())[_0xcf1268(0x148)]('\x20');}static[a83_0x2de1cb(0x143)](_0x537ba0,_0x35c3a9,_0x4aefb9){const _0x251e76=a83_0x2de1cb,_0x27f0ae=this[_0x251e76(0x127)](_0x35c3a9),_0x2117a4=this[_0x251e76(0x141)](_0x35c3a9),_0x3b3da1=new Date(),_0x480a46=_0x3b3da1[_0x251e76(0x132)](undefined,{'year':_0x251e76(0x12c),'month':_0x251e76(0x13b),'day':_0x251e76(0x13b),'hour':_0x251e76(0x13b),'minute':_0x251e76(0x13b),'second':_0x251e76(0x13b),'hour12':![]})[_0x251e76(0x121)](/\//g,'-'),_0x3c3eb3=_0x3b3da1['toLocaleDateString'](undefined,{'year':_0x251e76(0x12c),'month':_0x251e76(0x13b),'day':_0x251e76(0x13b)})[_0x251e76(0x121)](/\//g,'-'),_0x28aea3=_0x3b3da1[_0x251e76(0x14d)](undefined,{'hour12':![]});let _0x3b64d7=_0x537ba0['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x251e76(0x121)](/\{ComponentName\}/g,_0x27f0ae)[_0x251e76(0x121)](/\{DisplayTitle\}/g,_0x2117a4)[_0x251e76(0x121)](/\{PageName\}/g,_0x35c3a9)[_0x251e76(0x121)](/\{TemplateName\}/g,_0x4aefb9)[_0x251e76(0x121)](/\{CreatedAt\}/g,_0x480a46)[_0x251e76(0x121)](/\{CreatedDate\}/g,_0x3c3eb3)[_0x251e76(0x121)](/\{CreatedTime\}/g,_0x28aea3);return _0x3b64d7;}static[a83_0x2de1cb(0x13c)](_0x164b82,_0xeb5e19,_0x31810e,_0x4877da,_0x3654fe,_0x5432ba,_0x5d0d6a){const _0x346f27=a83_0x2de1cb,_0x4d4afe=new Date(),_0x3452e8=_0x4d4afe[_0x346f27(0x14f)](),_0x47ef1d=_0x31810e[_0x346f27(0x119)](_0x1e40e8=>{const _0x32b00b=_0x346f27,_0x55154a=[_0x32b00b(0x140)+_0x1e40e8[_0x32b00b(0x147)]+'\x22',_0x32b00b(0x146)+_0x1e40e8['tableName']+'\x22',_0x32b00b(0x11c)+_0x1e40e8[_0x32b00b(0x13d)]+'\x22'];return _0x1e40e8[_0x32b00b(0x131)]&&_0x55154a[_0x32b00b(0x12d)](_0x32b00b(0x13a)+_0x1e40e8[_0x32b00b(0x131)]+'\x22'),_0x32b00b(0x139)+_0x55154a['join'](',\x20')+_0x32b00b(0x118);})['join'](''),_0x4746d5=_0x4877da||_0x31810e[0x0]?.[_0x346f27(0x131)]||_0x346f27(0x10e);let _0x577460=_0x164b82[_0x346f27(0x121)](/\{AppCode\}/g,_0xeb5e19)[_0x346f27(0x121)](/\{ModelConfigs\}/g,_0x47ef1d)[_0x346f27(0x121)](/\{ExampleModelName\}/g,_0x4746d5)[_0x346f27(0x121)](/\{ApiFileName\}/g,_0x3654fe||'api')[_0x346f27(0x121)](/\{ConfigName\}/g,_0x5432ba||_0x346f27(0x111))['replace'](/\{ClientConfigParam\}/g,_0x5d0d6a||'')[_0x346f27(0x121)](/\{CreatedAt\}/g,_0x3452e8);return _0x577460;}static async['processTemplate'](_0x31e472,_0x410fd2,_0x57782f,_0x35b7b4,_0x46f9bc=!![]){const _0xadccb=a83_0x2de1cb,_0x39c8c7=Date[_0xadccb(0x136)]();try{_0x46f9bc&&logger[_0xadccb(0x112)]('template',_0xadccb(0x11a),{'templatePath':_0x31e472,'targetPath':_0x410fd2,'pageName':_0x57782f,'templateName':_0x35b7b4});await a83_0x51389b[_0xadccb(0x11e)][_0xadccb(0x14c)](_0x410fd2,{'recursive':!![]}),await this[_0xadccb(0x14a)](_0x31e472,_0x410fd2,_0x57782f,_0x35b7b4);if(_0x46f9bc){const _0xe95082=Date['now']()-_0x39c8c7;logger[_0xadccb(0x144)]('template',_0xadccb(0x11d),_0xe95082,{'pageName':_0x57782f,'templateName':_0x35b7b4});}}catch(_0x169a50){if(_0x46f9bc){const _0x562cb0=Date[_0xadccb(0x136)]()-_0x39c8c7;logger['error']('template',_0xadccb(0x137),{'templatePath':_0x31e472,'targetPath':_0x410fd2,'pageName':_0x57782f,'templateName':_0x35b7b4,'error':_0x169a50 instanceof Error?_0x169a50[_0xadccb(0x114)]:String(_0x169a50),'duration':_0x562cb0});}throw _0x169a50;}}static async[a83_0x2de1cb(0x14a)](_0x1694fe,_0x11dfc6,_0x1c012c,_0x37860){const _0x1a5ceb=a83_0x2de1cb,_0x4e54a9=await a83_0x51389b[_0x1a5ceb(0x11e)]['readdir'](_0x1694fe,{'withFileTypes':!![]});for(const _0x575b46 of _0x4e54a9){const _0x135411=a83_0x35b46c[_0x1a5ceb(0x148)](_0x1694fe,_0x575b46[_0x1a5ceb(0x13d)]);let _0x502b6f=a83_0x35b46c[_0x1a5ceb(0x148)](_0x11dfc6,_0x575b46['name']);_0x575b46[_0x1a5ceb(0x13d)][_0x1a5ceb(0x10d)](_0x1a5ceb(0x12b))&&(_0x502b6f=a83_0x35b46c['join'](_0x11dfc6,_0x575b46[_0x1a5ceb(0x13d)][_0x1a5ceb(0x121)](/\.tpl$/,'')));if(_0x575b46[_0x1a5ceb(0x11f)]())await a83_0x51389b['promises'][_0x1a5ceb(0x14c)](_0x502b6f,{'recursive':!![]}),await this[_0x1a5ceb(0x14a)](_0x135411,_0x502b6f,_0x1c012c,_0x37860);else _0x575b46[_0x1a5ceb(0x130)]()&&await this[_0x1a5ceb(0x124)](_0x135411,_0x502b6f,_0x1c012c,_0x37860);}}static async[a83_0x2de1cb(0x124)](_0x522c71,_0xa0e69a,_0x59089f,_0x9ed625){const _0x5ec27d=a83_0x2de1cb,_0x1d63cf=a83_0x35b46c[_0x5ec27d(0x138)](_0x522c71)['toLowerCase']();_0x522c71[_0x5ec27d(0x10d)](_0x5ec27d(0x12b))&&(_0xa0e69a=_0xa0e69a[_0x5ec27d(0x121)](/\.tpl$/,''));const _0x20f750=['.tsx',_0x5ec27d(0x129),_0x5ec27d(0x14b),_0x5ec27d(0x135),_0x5ec27d(0x128),'.md',_0x5ec27d(0x12e),_0x5ec27d(0x145),'.tpl'];if(_0x20f750[_0x5ec27d(0x110)](_0x1d63cf)||_0x522c71[_0x5ec27d(0x10d)](_0x5ec27d(0x12b))){const _0x4b064c=await a83_0x51389b[_0x5ec27d(0x11e)][_0x5ec27d(0x13e)](_0x522c71,_0x5ec27d(0x13f)),_0x293992=this[_0x5ec27d(0x143)](_0x4b064c,_0x59089f,_0x9ed625);await a83_0x51389b[_0x5ec27d(0x11e)][_0x5ec27d(0x134)](_0xa0e69a,_0x293992,'utf8');}else await a83_0x51389b[_0x5ec27d(0x11e)]['copyFile'](_0x522c71,_0xa0e69a);}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.4-beta.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"
@@ -27,6 +27,9 @@
27
27
  "test:unit": "vitest run test/unit",
28
28
  "test:integration": "vitest run test/integration",
29
29
  "test:e2e": "vitest run test/e2e",
30
+ "test:windows": "node test/run-windows-tests.js",
31
+ "test:windows:unit": "node test/run-windows-tests.js unit",
32
+ "test:windows:integration": "node test/run-windows-tests.js integration",
30
33
  "typecheck": "tsc --noEmit",
31
34
  "lint": "echo 'No linter configured yet'",
32
35
  "ci": "npm run typecheck && npm run test:run && npm run build"
@@ -38,6 +41,7 @@
38
41
  "dependencies": {
39
42
  "@types/winston": "^2.4.4",
40
43
  "execa": "^9.6.0",
44
+ "i18next": "^25.8.4",
41
45
  "ink": "^6.2.3",
42
46
  "ink-spinner": "^5.0.0",
43
47
  "javascript-obfuscator": "^4.1.1",
@@ -45,6 +49,7 @@
45
49
  "meow": "^13.2.0",
46
50
  "prettier": "^3.6.2",
47
51
  "react": "^19.2.0",
52
+ "react-i18next": "^16.5.4",
48
53
  "semver": "^7.7.3",
49
54
  "winston": "^3.17.0"
50
55
  },
@@ -7,59 +7,14 @@
7
7
  ```
8
8
  templates/
9
9
  ├── README.md # 本说明文档
10
- ├── pages/ # 页面模板,用于 `lovrabet add page` 命令
11
- │ ├── blank/ # 简单空白页面模板
12
- │ └── hello-world/ # 功能丰富的演示页面模板
13
- └── projects/ # 项目模板,用于 `lovrabet create project` 命令
10
+ ├── generate-api/ # API 生成模板
11
+ └── projects/ # 项目模板,用于 `lovrabet create` 命令
14
12
  └── sub-app-react-demo/ # Git 子模块,指向主模板仓库
15
13
  ```
16
14
 
17
- ## 页面模板
15
+ ## API 生成模板
18
16
 
19
- ### 可用占位符标签
20
-
21
- 创建页面模板(`.tsx.tpl` 文件)时,可以使用以下占位符标签,它们会被自动替换:
22
-
23
- | 标签 | 说明 | 示例 |
24
- |-----|------|------|
25
- | `{ComponentName}` | PascalCase 组件名 | `UserProfile` |
26
- | `{DisplayTitle}` | 人类可读的标题 | `User Profile` |
27
- | `{PageName}` | 原始的 kebab-case 页面名 | `user-profile` |
28
- | `{TemplateName}` | 使用的模板名称 | `blank` |
29
- | `{CreatedAt}` | 创建时的 ISO 时间戳 | `2024-09-14T15:30:45.123Z` |
30
- | `{CreatedDate}` | 创建日期 | `2024-09-14` |
31
- | `{CreatedTime}` | 创建时间 | `15:30:45` |
32
-
33
- ### 模板文件命名
34
-
35
- - 模板文件应使用 `.tpl` 扩展名(如 `index.tsx.tpl`)
36
- - 生成时会自动移除 `.tpl` 扩展名
37
- - CLI 会处理所有文本文件(`.tsx`, `.ts`, `.jsx`, `.js`, `.json`, `.md`, `.css`, `.scss`, `.tpl`)
38
-
39
- ### 模板使用示例
40
-
41
- ```tsx
42
- /**
43
- * Generated by Lovrabet CLI
44
- * Template: {TemplateName}
45
- * Created: {CreatedAt}
46
- * Page: {PageName}
47
- */
48
- import React from "react";
49
-
50
- function {ComponentName}() {
51
- return <div>{DisplayTitle} 页面</div>;
52
- }
53
-
54
- export default {ComponentName};
55
- ```
56
-
57
- ### 添加新页面模板
58
-
59
- 1. 在 `templates/pages/` 下创建新目录(如 `templates/pages/my-template/`)
60
- 2. 添加带 `.tpl` 扩展名的模板文件
61
- 3. 使用上述文档化的占位符标签
62
- 4. 无需修改 CLI 代码 - 任何新模板都会自动工作!
17
+ `generate-api/` 目录包含用于生成 API 配置的模板。
63
18
 
64
19
  ## 项目模板
65
20
 
@@ -101,18 +56,18 @@ git submodule update --init --recursive
101
56
 
102
57
  添加新模板时:
103
58
 
104
- 1. **页面模板**:放置在 `templates/pages/[template-name]/` 中
105
- 2. **使用占位符标签**:遵循文档化的标签系统
106
- 3. **文件扩展名**:需要处理的模板文件使用 `.tpl`
107
- 4. **本地测试**:提交前使用新模板生成页面进行测试
108
- 5. **更新此 README**:记录任何新功能或标签
59
+ 1. **项目模板**:放置在 `templates/projects/` 中
60
+ 2. **文件扩展名**:需要处理的模板文件使用 `.tpl`
61
+ 3. **本地测试**:提交前使用新模板生成项目进行测试
62
+ 4. **更新此 README**:记录任何新功能
109
63
 
110
64
  ## 注意事项
111
65
 
112
- - 模板在页面/项目生成过程中被复制和处理
66
+ - 模板在项目生成过程中被复制和处理
113
67
  - CLI 使用 `TemplateReplacer` 工具进行标签替换
114
68
  - 生成的文件包含显示生成元数据的头部注释
115
69
  - 所有模板支持国际化并可根据需要扩展
70
+
116
71
  ## Cursor Rules 模板
117
72
 
118
73
  ### 用途
@@ -1 +0,0 @@
1
- function a0_0x3c67(_0x1674b1,_0x173f5e){_0x1674b1=_0x1674b1-0x69;const _0x4b2515=a0_0x4b25();let _0x3c672e=_0x4b2515[_0x1674b1];return _0x3c672e;}(function(_0x54dfc7,_0x466fc5){const _0x2ba359=a0_0x3c67,_0x2bb85a=_0x54dfc7();while(!![]){try{const _0x4c67f5=-parseInt(_0x2ba359(0x73))/0x1+-parseInt(_0x2ba359(0x79))/0x2+-parseInt(_0x2ba359(0x70))/0x3*(parseInt(_0x2ba359(0x7b))/0x4)+parseInt(_0x2ba359(0x86))/0x5*(-parseInt(_0x2ba359(0x6b))/0x6)+parseInt(_0x2ba359(0x8a))/0x7*(parseInt(_0x2ba359(0x74))/0x8)+parseInt(_0x2ba359(0x6e))/0x9+parseInt(_0x2ba359(0x80))/0xa;if(_0x4c67f5===_0x466fc5)break;else _0x2bb85a['push'](_0x2bb85a['shift']());}catch(_0x1acf2b){_0x2bb85a['push'](_0x2bb85a['shift']());}}}(a0_0x4b25,0x22936));import{jsx as a0_0x2524fa,jsxs as a0_0x108e7c}from'react/jsx-runtime';import{useState}from'react';function a0_0x4b25(){const _0x1b2327=['startsWith','454530BbJLcf','\x20←\x20','107760pooFFW','delete','\x20Step2:\x20','includes','路径不能包含连续的\x20/','4540240aqcdzT','slice','gray','test','length','column','15275CfuhWj','\x20直接回车确认,或输入自定义路由地址','split','red','55363qybxun','页面路由地址:\x20','页面路径不合法','return','138GFgRLQ','路径中的每个段只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','页面路径长度不能超过\x20100\x20个字符','1844955fWhdWn','backspace','24BWXPPL','trim','\x20已存在,请使用其他路径','146709qePSHF','144guwfBc','路径不能以\x20/\x20开头或结尾','green','页面路径\x20'];a0_0x4b25=function(){return _0x1b2327;};return a0_0x4b25();}import{Text,Box,useInput}from'ink';import a0_0x553fff from'node:fs';export function InputProjectCode(_0x3dcbda){const _0x53f18e=a0_0x3c67,{onSubmit:_0x9acde8,pagePath:_0x448fbd}=_0x3dcbda,[_0x737c8b,_0x2fffa9]=useState(''),[_0xd31d1c,_0x33589f]=useState(''),_0x5c596c='my-page';function _0x125ad1(_0x118992){const _0x36d99c=a0_0x3c67;if(_0x118992[_0x36d99c(0x84)]>0x64)return{'valid':![],'message':_0x36d99c(0x6d)};if(_0x118992[_0x36d99c(0x78)]('/')||_0x118992['endsWith']('/'))return{'valid':![],'message':_0x36d99c(0x75)};if(_0x118992[_0x36d99c(0x7e)]('//'))return{'valid':![],'message':_0x36d99c(0x7f)};const _0x15cbe9=_0x118992[_0x36d99c(0x88)]('/');for(const _0xbb95ae of _0x15cbe9){if(!_0xbb95ae)continue;const _0x45debf=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(!_0x45debf[_0x36d99c(0x83)](_0xbb95ae))return{'valid':![],'message':_0x36d99c(0x6c)};}return{'valid':!![]};}return useInput((_0x26af1f,_0x59d2ca)=>{const _0x3a8657=a0_0x3c67;if(_0x59d2ca[_0x3a8657(0x6a)]){const _0x59a873=_0x737c8b[_0x3a8657(0x71)]()||_0x5c596c;if(_0xd31d1c)return;const _0x5f1334=_0x448fbd+'/'+_0x59a873;if(a0_0x553fff['existsSync'](_0x5f1334)){_0x33589f(_0x3a8657(0x77)+_0x59a873+_0x3a8657(0x72));return;}_0x9acde8(_0x59a873),_0x2fffa9(''),_0x33589f('');}else _0x59d2ca[_0x3a8657(0x6f)]||_0x59d2ca[_0x3a8657(0x7c)]?_0x2fffa9(_0xa670d8=>{const _0x26946c=_0x3a8657,_0x121b4e=_0xa670d8[_0x26946c(0x81)](0x0,-0x1),{valid:_0x4e51d1,message:_0x2e05d4}=_0x125ad1(_0x121b4e);return _0x33589f(_0x4e51d1?'':_0x2e05d4||_0x26946c(0x69)),_0x121b4e;}):_0x2fffa9(_0x3751ee=>{const _0xa03254=_0x3a8657,_0x3bd871=_0x3751ee+_0x26af1f,{valid:_0x22115a,message:_0xf47a85}=_0x125ad1(_0x3bd871);return _0x33589f(_0x22115a?'':_0xf47a85||_0xa03254(0x69)),_0x3bd871;});}),a0_0x108e7c(Box,{'flexDirection':_0x53f18e(0x85),'children':[a0_0x108e7c(Box,{'children':[a0_0x2524fa(Text,{'color':_0x53f18e(0x82),'children':_0x53f18e(0x7d)}),a0_0x2524fa(Text,{'children':_0x53f18e(0x8b)}),_0x737c8b?a0_0x2524fa(Text,{'color':_0x53f18e(0x76),'children':_0x737c8b}):a0_0x2524fa(Text,{'color':_0x53f18e(0x82),'children':_0x5c596c}),_0xd31d1c&&a0_0x108e7c(Text,{'color':_0x53f18e(0x89),'children':[_0x53f18e(0x7a),_0xd31d1c]})]}),!_0xd31d1c&&!_0x737c8b&&a0_0x2524fa(Box,{'children':a0_0x2524fa(Text,{'color':_0x53f18e(0x82),'children':_0x53f18e(0x87)})})]});}